Sign in to follow this  
Followers 0
MrMax

Newbie question, but how does AutoIT read the script?

11 posts in this topic

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.

Share this post


Link to post
Share on other sites



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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

The answer to your question is 'no'.

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

Edited by MouseSpotter

Share this post


Link to post
Share on other sites

#4 ·  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

Share this post


Link to post
Share on other sites

Thanks, as I thought :)

Share this post


Link to post
Share on other sites

Q. Do you want both these to run at same time?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Edited by MrMax

Share this post


Link to post
Share on other sites

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Most excellent, I will try AdLibRegister out.

Thanks bunches

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0