MrMax Posted April 21, 2013 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.
water Posted April 21, 2013 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
MouseSpotter Posted April 21, 2013 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
Noddle Posted April 22, 2013 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
MouseSpotter Posted April 22, 2013 Posted April 22, 2013 Q. Do you want both these to run at same time?
MrMax Posted April 22, 2013 Author 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
water Posted April 22, 2013 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
MouseSpotter Posted April 23, 2013 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.
Bert Posted April 23, 2013 Posted April 23, 2013 In other words - AutoIt is single threaded. The Vollatran project My blog: http://www.vollysinterestingshit.com/
MrMax Posted April 23, 2013 Author Posted April 23, 2013 Most excellent, I will try AdLibRegister out.Thanks bunches
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