Jump to content

Recommended Posts

Posted

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.

Posted

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

 

Posted (edited)

The answer to your question is 'no'.

Until the Example() loop has exited - the script will not execute Example2()

post-9789-0-30309400-1366596397_thumb.jp

Edited by Noddle
Posted (edited)

MouseSpotter, Is that possible to execute two functions at the same time without running it as two separate scripts?

Edited by MrMax
Posted

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

 

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...