Sign in to follow this  
Followers 0
bruno2

run + controlclick

4 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



#2 ·  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

[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

#3 ·  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

Share this post


Link to post
Share on other sites

#4 ·  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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0