yellowpower Posted March 31, 2012 Share Posted March 31, 2012 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 Link to comment Share on other sites More sharing options...
water Posted March 31, 2012 Share Posted March 31, 2012 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 Link to comment Share on other sites More sharing options...
yellowpower Posted March 31, 2012 Author Share Posted March 31, 2012 (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 March 31, 2012 by yellowpower Link to comment Share on other sites More sharing options...
VixinG Posted March 31, 2012 Share Posted March 31, 2012 Function Run -> http://www.autoitscript.com/autoit3/docs/functions/Run.htmfor running external programBut 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.htmThere 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 = HANDNumber 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 [indent=3][/indent] Link to comment Share on other sites More sharing options...
water Posted March 31, 2012 Share Posted March 31, 2012 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 Link to comment Share on other sites More sharing options...
VixinG Posted March 31, 2012 Share Posted March 31, 2012 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 yellowpower 1 [indent=3][/indent] Link to comment Share on other sites More sharing options...
yellowpower Posted March 31, 2012 Author Share Posted March 31, 2012 I found something helpful here: Check it out That's very helpful VixinG! let me try itThanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now