Jump to content

Recommended Posts

Posted (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 by bruno2
Posted (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 by dantay9
Posted (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 by bruno2
Posted (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 by bruno2

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
×
×
  • Create New...