StoneMountain Posted September 27, 2008 Share Posted September 27, 2008 I'm converting MANY files from one format to another format. launching with run, using send keys to set everything up ( alt+f for file.... ) When the program get to the export routine, a separate window appears showing the progress of the export.... I've since learned that - it isn't a window ( wingethandle("[ACTIVE]") = same as the main window ) Could it be a control? - a control that turns my mouse into a hour glass ( so I can't get information from AU3Info.exe ) { yes I'm new to this stuff, I don't know what a progress window is ( I do know it is modal ) Problem, it I don't wait long enough, the routine locks up ( sending wrong key strokes to the windows ) I've used WinWaitActive, which is useless, because that window is active. I've tried to use ControlGet..... But without more information about the text (I think that should be "Saving.." ) but I do not know what class it might be or what its handle is... Please help... Link to comment Share on other sites More sharing options...
StoneMountain Posted September 27, 2008 Author Share Posted September 27, 2008 Here is my code: Send("!f") ; alt File Send("o") ; Open WinWaitActive("Open a") ; waits for the Open a measurement dialog window to load Send("!n") ; alt Name activates name field Send($filesSelected[1] & $filesSelected[$i+1]) ;one file selected [1]="" & [2]=DrivePathFileName : two or more selected [1]=DrivePath & [2 ....]=FileName Send("{ENTER}") WinWaitActive($MainGageWindow) ; waits for the file to load Send("{ESC}") ; when an error occurs at open, esc will close the dialog box Send("!f") ; alt File Send("e") ; Export WinWaitActive("Save in") ; waits for the Save in CSV dialog window to open $SaveIn=WinGetHandle("[ACTIVE]") ; Saving does not return a different windo than the main window MsgBox(4096,"","This was the handle from the 'Save In' window: " & $SaveIn); produces the same handle as the main window Send("!a") ; alt All fields Sleep(200) ; pause half a second ( 500 milliseconds) Send("{ENTER}") ;next Send("{ENTER}") ;next Send("{ENTER}") ;save csv file ;$Saving=ControlGetHandle($MainGageWindow,"Saving") ; error I don't know its ID? ;WinGetHandle("[ACRIVE]") produces the same handle as the main window ;WinWaitNotActive($Saving) ; I want to pause script until the saving window is NOT active BUT is is not a real window? WinActivate($MainGageWindow) ; waits for the main window to be active again - problem it is active... Sleep(100) ; pause half a second ( 500 milliseconds) ;This is were it gets out of sync. Send("!f") ; alt File Send("c") ; Close Sleep(100) ; pause Send("n") ; no, do not save it Sleep(200) ; pause 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