MrMax Posted April 21, 2013 Share Posted April 21, 2013 So I got this script with Some while, some Ifs and some functions. I am curious how AutoIT reads them? Can autoIT read two segments of a script file at the same time or does it only go through step by step? Like for example If I do something like this: example() example2() Func example while ----Some code here wend endfunc func example2 While ---Some code here wend endfunc My question is basically, if I call "example" will autoIT only read within the functions While-Wend or will it also execute Example2 and read those while/wends at the same time? Maybe my explanation is bad, if so ill try and correct it. Thanks for any answers. Link to comment Share on other sites More sharing options...
water Posted April 21, 2013 Share Posted April 21, 2013 What do yo mean by "read"? AutoIt executes statement by statement. When you start a script the directives (#include etc.) are executed first then the rest of the script is executed/run step by step. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
MouseSpotter Posted April 21, 2013 Share Posted April 21, 2013 (edited) The answer to your question is 'no'. Until the Example() loop has exited - the script will not execute Example2() Edited April 21, 2013 by MouseSpotter Link to comment Share on other sites More sharing options...
Noddle Posted April 22, 2013 Share Posted April 22, 2013 (edited) The answer to your question is 'no'.Until the Example() loop has exited - the script will not execute Example2() Edited April 22, 2013 by Noddle Link to comment Share on other sites More sharing options...
MrMax Posted April 22, 2013 Author Share Posted April 22, 2013 Thanks, as I thought Link to comment Share on other sites More sharing options...
MouseSpotter Posted April 22, 2013 Share Posted April 22, 2013 Q. Do you want both these to run at same time? Link to comment Share on other sites More sharing options...
MrMax Posted April 22, 2013 Author Share Posted April 22, 2013 (edited) MouseSpotter, Is that possible to execute two functions at the same time without running it as two separate scripts? Edited April 22, 2013 by MrMax Link to comment Share on other sites More sharing options...
water Posted April 22, 2013 Share Posted April 22, 2013 In short: No Pseudo parallel by using AdLibRegister. Stops execution every x miliseconds to execute a function and then return to the main script. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
MouseSpotter Posted April 23, 2013 Share Posted April 23, 2013 MouseSpotter, Is that possible to execute two functions at the same time without running it as two separate scripts?It is as water has stated - you can simulate parallel execution using AdLibRegister.Simply remove the While conditions in you first script and add AdLibRegister calls instead. Link to comment Share on other sites More sharing options...
Bert Posted April 23, 2013 Share Posted April 23, 2013 In other words - AutoIt is single threaded. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
MrMax Posted April 23, 2013 Author Share Posted April 23, 2013 Most excellent, I will try AdLibRegister out.Thanks bunches 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