Jump to content
Sign in to follow this  
skyee

Send event

Recommended Posts

skyee

So presumably, I have this line of code:

RunWait("\\server.local\Software\_Install\_Default\1\AdbeRdr811_en_US.exe ")

This command executes the installer. Along with this command, I'm wondering if it's possible using send() function to allow AutoIT to click buttons "Next" or "Agree" instead of user intervention? Like a recorded macro or something? Suggestions welcome :D

Share this post


Link to post
Share on other sites
Thatsgreat2345

Check out controlsend and controlclick

Share this post


Link to post
Share on other sites
skyee

So it should be:

RunWait("\\server.local\Software\_Install\_Default\1\AdbeRdr811_en_US.exe")
controlclick("Adobe Reader 8.1.1 - Setup", "text", controlID [, Next [, 4 [, x [, y ]]]]

I'm not quite sure what to put in "text" and ControlID and x,y? How do you know coordinates? :D

Edited by skyee

Share this post


Link to post
Share on other sites
ryantollefson

So it should be:

RunWait("\\server.local\Software\_Install\_Default\1\AdbeRdr811_en_US.exe")
controlclick("Adobe Reader 8.1.1 - Setup", "text", controlID [, Next [, 4 [, x [, y ]]]]

I'm not quite sure what to put in "text" and ControlID and x,y? How do you know coordinates? :D

AutoIt Window Info

(also check out the help file - it is very helpful) :P

Share this post


Link to post
Share on other sites
skyee

Mhh, this is furstrating me :D

RunWait("\\server.local\Software\_Install\_Default\1\AdbeRdr811_en_US.exe")
        ControlClick("Adobe Reader 8.1.1 - Setup", "&Next >",4081 [,Button1 [, 1, 382, 281 ]]]] )
        ControlClick("Adobe Reader 8.1.1 - Setup", "&Install >",4334 [,Button1 [, 1, 306, 324 ]]]] )

This is what i came up with, but i'm guessing it's way wrong since ControlClick should be somehow integrated with RunWait command? I know this looks stupid but I've only started using AutoIt few days ago... :P Besides, isn't there simplier way to do this or do you really need coordinates and all that? ;) that's why I was thinking about send() function...

Edited by skyee

Share this post


Link to post
Share on other sites
ryantollefson

No, you don't need the coordinates, just the numbers should do it. Also, it looks like you had the wrong Control ID (you had the one for the cancel button).

RunWait("\\server.local\Software\_Install\_Default\1\AdbeRdr811_en_US.exe")
ControlClick("Adobe Reader 8.1.1 - Setup", "",4276)
ControlClick("Adobe Reader 8.1.1 - Setup", "",4334)

Now you might also need to put some Sleep codes in there to make sure it doesn't click too fast.

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  

×