bruno2 Posted August 23, 2009 Share Posted August 23, 2009 (edited) Hey I'm trying to run exe, and install it but it starts and ends right away, I have tried many ways nothing works. Here is example, it doesnt count even the sleep, #RequireAdmin Run("musicoasis.exe") ControlFocus("install","",1020) ControlClick("","",1020) Sleep(2000) ControlFocus("install","",1021) ControlClick("","",1021) Sleep(2000) ControlFocus("install","",1001) ControlClick("","",1001) Sleep(200) ControlFocus("install","",1026) ControlClick("","",1026) Sleep(30000) ControlFocus("install","",1027) ControlClick("","",1027) Sleep(2000) >Running:(3.3.0.0):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\xxx\Desktop\xxxx\xxxx.au3" +>04:23:53 AutoIT3.exe ended.rc:0 +>04:23:54 AutoIt3Wrapper Finished >Exit code: 0 Time: 2.776 I dont know what to do please help I have tried anythink from search and help file! >_< edit: I did try with winwait, winactive :/ Thanks! Edited August 23, 2009 by bruno2 Link to comment Share on other sites More sharing options...
dantay9 Posted August 23, 2009 Share Posted August 23, 2009 (edited) Did you try using the built in mouse recorder? If that doesn't work or isn't robust enough, use a combination of WinWait(), WinActivate(), ControlFocus(), ControlClick, and ControlSend(). Looking at the code you have, the problem is probably not waiting for the first window to open. Instead of sleeping, use WinWait and WinActivate. Edited August 23, 2009 by dantay9 Link to comment Share on other sites More sharing options...
bruno2 Posted August 23, 2009 Author Share Posted August 23, 2009 (edited) Just tried with recorder, it's weird, cant run with out #RequireAdmin. and when I run it after i recorder agian ends sooner before the program itself shows up. EDIT: It's like the exe has Anti Macro (bot) on it dam really weird!!! Edited August 23, 2009 by bruno2 Link to comment Share on other sites More sharing options...
bruno2 Posted August 23, 2009 Author Share Posted August 23, 2009 (edited) I think I know whats wrong , The Application when I run it the Install Pop Up Before the window it self where are the button, and both of them same "Title" (Install) Run("C:\Users\xxx\Desktop\pic\xxx.exe") WinWaitActive ( "Install" , "" ) ControlClick ( "Install" , "" , "Button4" ) So it ends before it start how can I make it sleep? Sleep doesnt work is there other command? Edited August 23, 2009 by bruno2 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