Jump to content
Sign in to follow this  
yellowpower

Running an external application

Recommended Posts

yellowpower

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
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
yellowpower

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
VixinG

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
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
VixinG

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:

  • Like 1

[indent=3][/indent]

Share this post


Link to post
Share on other sites
yellowpower

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  

×