gnomic Posted October 25, 2012 Share Posted October 25, 2012 Hey, How can i run two functions at the same time? i read that, if i use two .Au3 at the same time, then it will use multiple processors? and not multithreating - i dont know the difference? thanks Link to comment Share on other sites More sharing options...
JohnOne Posted October 25, 2012 Share Posted October 25, 2012 Hey,How can i run two functions at the same time? i read that, if i use two .Au3 at the same time, then it will use multiple processors? and not multithreating - i dont know the difference?thanks You cannotIt will use tow processesCorrectTry a web search AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
stormbreaker Posted October 25, 2012 Share Posted October 25, 2012 (edited) Multi-threading... is basically, calling multiple functions within ur script (not supported in AU3) at the same time, ideally using a single process. You can get help on your subject reading this: http://www.autoitscript.com/wiki/Interrupting_a_running_function Not upto the mark, but something useful. Edited October 25, 2012 by MKISH ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1 Link to comment Share on other sites More sharing options...
gnomic Posted October 25, 2012 Author Share Posted October 25, 2012 (edited) @JohnOneIf they each run on a different processor, then my guess would be, it was posible to run at the same time? else i dont see the point, atleast @MKISHThanks Edited October 25, 2012 by gnomic Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted October 25, 2012 Moderators Share Posted October 25, 2012 @JohnOneIf they each run on a different processor, then my guess would be, it was posible to run at the same time? else i dont see the point, atleast Not different processor different process. As JohnOne suggested, do some searching online for multithreading. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
gnomic Posted October 25, 2012 Author Share Posted October 25, 2012 This worked, when i ran them at the same time, so i guess this is enough. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) $hWnd = GUICreate("", 200, 200, 200, 200) $label = GUICtrlCreateLabel("", 0, 0, 50, 50) GUISetState(@SW_SHOW) Local $i = 0 While $i <= 5000 GUICtrlSetData ($label, $i) $i = $i + 1 sleep(20) WEnd While 1 $msg = GUIGetMsg() WEnd Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 25, 2012 Moderators Share Posted October 25, 2012 gnomic, Can you explain what you are trying to do that requires you to run 2 scripts? Then we might be able to offer some concrete help rather than vague hints. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
jdelaney Posted October 25, 2012 Share Posted October 25, 2012 (edited) In help file, search for 'command Line Parameters'...you can do a Run () command with the Form4 type:Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi!'')"')or, you can call a seperate exe you compiled, to initiate that script while the current still runs also.edit...oh, just noticed what you are doing...you just want a switch case within one of your while loops, or conditional steps#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hWnd = GUICreate("", 200, 200, 200, 200) $label = GUICtrlCreateLabel("", 0, 0, 50, 50) GUISetState(@SW_SHOW) Local $i = 0 While 1 $msg = GUIGetMsg() If $i <= 5000 Then GUICtrlSetData ($label, $i) $i = $i + 1 sleep(20) EndIf ; add in any messages you are looking for here...use switch case when lots If $msg = $GUI_EVENT_CLOSE Then Exit EndIf WEnd Edited October 25, 2012 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now