eekhoorn12 Posted January 5, 2006 Posted January 5, 2006 I have the following code While 1 $s_Result = "D:\films" IniWrite ( "POWRPOST.ini", "Settings", "LastDir", $s_Result) run("pp.exe") sleep(2000) ControlSend(' YENC-POWER-POST-A&A-v11b', "", "", Chr(94)& Chr(113)) msgbox(0,"test","Map getyptd") sleep(50) ControlSend('Openen', "FolderView", 1, Chr(94)& Chr(97)) msgbox(0,"test","Alles geselecteerd") sleep(50) ControlSend('Openen', "", 1, "{ENTER}",0) msgbox(0,"test","druk op enter") exitloop Wend It is supposed to select all the files in a specific folder, $s_Result. When the program is in focus it works fine. It opens the open dialog box of the program, opens the folder and selects all the files. But when I minimize the program it doesn´t select all the files. Marcel
seandisanti Posted January 5, 2006 Posted January 5, 2006 I have the following code While 1 $s_Result = "D:\films" IniWrite ( "POWRPOST.ini", "Settings", "LastDir", $s_Result) run("pp.exe") sleep(2000) ControlSend(' YENC-POWER-POST-A&A-v11b', "", "", Chr(94)& Chr(113)) msgbox(0,"test","Map getyptd") sleep(50) ControlSend('Openen', "FolderView", 1, Chr(94)& Chr(97)) msgbox(0,"test","Alles geselecteerd") sleep(50) ControlSend('Openen', "", 1, "{ENTER}",0) msgbox(0,"test","druk op enter") exitloop Wend It is supposed to select all the files in a specific folder, $s_Result. When the program is in focus it works fine. It opens the open dialog box of the program, opens the folder and selects all the files. But when I minimize the program it doesn´t select all the files. Marcelfirst i'd change your sleep(50)'s to winwait()'s so that incase the window isn't ready (more possible when the window is in the background and running at lower priority) it doesn't try to continue before the program is ready to receive what you're sending. Let me know if that doesn't fix it...
eekhoorn12 Posted January 5, 2006 Author Posted January 5, 2006 I´ve tried it and unfortunately that didn´t help. But thanks for the tip. It made me look up again what controlsend did and then I saw ControlListView. I tried that and it worked. Thanks
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