Sign in to follow this  
Followers 0
yellowpower

Running an external application

7 posts in this topic

Hi guys,

Some really basic questions:

If I want to open an external program, wait do something else after I HAVE opened it, how should i do that?

Is there any function to return me a value when the program had finish loading?

Many thanks

Share this post


Link to post
Share on other sites



You want to start an external program, wait till it has finished loading (how do you know when it has finished to load) and then return to the AutoIt script while the external program is still running?


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)

You want to start an external program, wait till it has finished loading (how do you know when it has finished to load) and then return to the AutoIt script while the external program is still running?

Yeh exactly! I want to start an external program, wait till finished loading, and when the program knows that it had finish loading, it will carry out some other operation.

Tat posssible?

Edited by yellowpower

Share this post


Link to post
Share on other sites

Function Run -> http://www.autoitscript.com/autoit3/docs/functions/Run.htm

for running external program

But I don't know how you can know if program finished loading.. :/

Maybe it is using the Loading cursor? The Sandglass?

If yes, then use: MouseGetCursor -> http://www.autoitscript.com/autoit3/docs/functions/MouseGetCursor.htm

There are cursors:

Returns a cursor ID Number:
    0 = UNKNOWN (this includes pointing and grabbing hand icons)
    1 = APPSTARTING
    2 = ARROW
    3 = CROSS
    4 = HELP
    5 = IBEAM
    6 = ICON
    7 = NO
    8 = SIZE
    9 = SIZEALL
  10 = SIZENESW
  11 = SIZENS
  12 = SIZENWSE
  13 = SIZEWE
  14 = UPARROW
  15 = WAIT
  16 = HAND

Number 15 = WAIT will be Sandglass I think.

But if your program isn't using sandglass, then you need to ask others or use Sleep function:

Sleep(delay in ms) e.g. Sleep(2500) - 2,5 sec.

The rest is yours.

Hope I helped :oops:


[indent=3][/indent]

Share this post


Link to post
Share on other sites

Maybe. How can you tell that the program finished loading and how long does this usually take?


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

Maybe. How can you tell that the program finished loading and how long does this usually take?

I found something helpful here:

Check it out :oops:

1 person likes this

[indent=3][/indent]

Share this post


Link to post
Share on other sites

I found something helpful here:

Check it out :oops:

That's very helpful VixinG! let me try it

Thanks

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