Jump to content

Recommended Posts

Posted

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

Posted

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 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)

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
Posted

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]

Posted

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 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

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...