Sign in to follow this  
Followers 0
Britbadboy

Help with Automation

15 posts in this topic

Hello people,

am a complete newbie will please someone help me out on this. I want to automate a download process for some computers. Well in oue office we use certain programs which have to be contasntly downloaded for any1 new joining in. What i want to do is just to automate the process with AutoIT.

So the user come n click on this .exe file [AutoIT file] and the application goes to the webpage n just downlaods this application without the users's need to enter anything at all. This means it moves through the setup program itself. Well i have managed to start the setup program but dont have any clue as how to auto click on next to move through the diff windows. Will please someone help me.

Regards,

Badboy.

Share this post


Link to post
Share on other sites



Try using

WinWait ( "title" [, "text" [, timeout]] )
ControlClick ( "title", "text", "classnameNN" [, button] [, clicks]] )
to get you through each window. [] are optional.

Or you could download Scite4Autoit3, which has Au3Record in it. You can record the install. Link in signature of my post.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Try using

WinWait ( "title" [, "text" [, timeout]] )
ControlClick ( "title", "text", "classnameNN" [, button] [, clicks]] )
to get you through each window. [] are optional.

Or you could download Scite4Autoit3, which has Au3Record in it. You can record the install. Link in signature of my post.

<{POST_SNAPBACK}>

Hi there,

well please can you be more specific / helpful as said am a real novice in this AutoIT stuff.

regards,

Badboy.

p.s. this is what am trying to do now....

Run("\\Gbm04efd\archive\Agent\ClientInstall\setup.exe")

WinWaitActive("CLientView Setup")

Send("{Enter}")

Edited by Britbadboy

Share this post


Link to post
Share on other sites

Run("\\Gbm04efd\archive\Agent\ClientInstall\setup.exe")

WinWaitActive("CLientView Setup")

Send("{Enter}")

What does it not work? I would assume your next line would be another WinWaitActive. To catch the next window. Then send to your next button.

Share this post


Link to post
Share on other sites

What does it not work? I would assume your next line would be another WinWaitActive. To catch the next window. Then send to your next button.

<{POST_SNAPBACK}>

Hi,

yes eaxctly ... it doesnt work and not even this.....

Run("\\Gbm04efd\archive\Agent\ClientInstall\setup.exe")

If WinExists("ClientView Setup") Then

MouseMove(630, 553, 0)

MouseClick("middle")

EndIf

any ideas as what might be going wrong!???

regards,

Badboy.

Share this post


Link to post
Share on other sites

Hi there,

i liked the first example better, cause mouseclicks are never good for automating on other computers. I'm not sure where exactly your problem is? You just say it doesn't work, maybe you can be more specific? Does it hit the wrong button? Doesn't it do anything? Does it quit before your setup is appearing?

Greetings,

ZeD

Share this post


Link to post
Share on other sites

Hi there,

well to be more sure I just took away all the code and just put in:

If WinActive("ClientView Setup") Then

MsgBox(0, "", "Window was active")

but it doesnt give me any msg... so thats suppose to mean that its just not recognising that the window is active.....

what to do now?

regards,

Badboy.

Share this post


Link to post
Share on other sites

Hi.

Use AutoIt3Spy.exe, to be sure, the name of this Window is really "ClientView Setup", if it is mispelled, Autoit couldnt find the window..

mfg

Share this post


Link to post
Share on other sites

Just two more thoughts:

WinActive only responds if the window is ACTIVE. So if it is there but in background you won't get any message.

How did you get the window title? Try using the Autoit Window-Spy, which can be found in the program folder of Autoit.

Greetings,

ZeD

Share this post


Link to post
Share on other sites

Hi there,

well ok on to the next step, I finally manage to move through the windows, till i come where I need to eneter a Server name. The name is set [preset for every preson] so how do I fill in this value to the field ?

I tried doing clipput but this doesnt put the value in the field...... so what next?

regards,

Badboy.

Share this post


Link to post
Share on other sites

Hi..

i recommend, reading the helpfile...

clipput(), puts the text into the clipboard, not an input field.

Use Send() or ControlSetText()...

..and read the help file !! :-)

mfg

Share this post


Link to post
Share on other sites

Hi..

i recommend, reading the helpfile...

clipput(), puts the text into the clipboard, not an input field.

Use Send() or ControlSetText()...

..and read the help file !! :-)

mfg

<{POST_SNAPBACK}>

thanx a ton, but I guessed it right before u posted, but mch appreciated. :)

regards,

Badboy.

Share this post


Link to post
Share on other sites

Hi there,

allright one last Q how can i move around feilds without the need to point tht mouse onto it and then sending enter command.... i m using this at the moment:

If WinWaitActive("ClientView Setup") Then

MouseMove ( 630, 553)

Send("{Enter}")

EndIf

but isn't there a way where i can just eleminate this mousemove command ???

regards,

Badboy.

Share this post


Link to post
Share on other sites

Hi..

this depends on the Field/controls you are using..

mostly, you could use TAB to jump between the Fields, or if AutoIt3Spy.exe could detect the control, you can sent commands directly to this control. (with controlfocus i think).

mfg

Share this post


Link to post
Share on other sites

Replace MouseMove with MouseClick, the mouse will travel to this location and click it.

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