Sign in to follow this  
Followers 0
focksie

BRAND NEW! need help!

8 posts in this topic

I have no idea what commands to use to get this script running for the problem I'm trying to solve...

The problem is this: I have around 70 laptops that I need to have programs installed and uninstalled on...

I figured I would write the script to click on buttons on the screen, like the buttons in the uninstall menu.

Could anyone get me started on some commands I could use to get this completed quickly?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

the help file has tutorials exactly like this. Check out the winzip one that is in the help file. (search winzip)

; Run the winzip installer
Run("winzip90.exe")

; Initial Setup Screen
WinWaitActive("WinZip® 9.0 SR-1 Setup", "&Setup")
Send("!s")

; Install location
WinWaitActive("WinZip Setup", "into the following folder")
Send("{ENTER}")

; Features overview
WinWaitActive("WinZip Setup", "WinZip features include")
Send("!n")

; License agreement
WinWaitActive("License Agreement")
Send("!y")

; Quick start
WinWaitActive("WinZip Setup", "Quick Start Guide")
Send("!n")

; Choose interface
WinWaitActive("WinZip Setup", "switch between the two interfaces")
Send("!c")
Send("!n")

; Installation type (custom/express)
WinWaitActive("WinZip Setup", "&Express setup (recommended)")
Send("!e")
Send("!n")

; Select file associations
WinWaitActive("WinZip Setup", "WinZip needs to associate itself with your archives")
Send("!n")

; Completed installation screen
WinWaitActive("WinZip Setup", "Thank you for installing this evaluation version")
Send("{ENTER}")

; Wait for winzip to load then close it
WinWaitActive("WinZip (Evaluation Version)")
WinClose("WinZip (Evaluation Version)")
Edited by Pantera975

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I found "mouseclick" and figured out how to get the cursor to click a specific pixel...

I would imagine that this doesn't work on computers with different screen resolutions as the OP.

Edited by focksie

Share this post


Link to post
Share on other sites

See here, MouseCoordMode (Option)

BTW, in forums, OP means 'Original Poster', as in, the person who started the thread.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

I have been undertaking a very similar project. You need to get familiar with the Au3 Window Info Tool. Open the editor, open the Au3 Window Info (Tools->Au3Info in the Scite editor), then manually go through the install process. On each screen use the infor tool to determine which controls you want to interact with. The simplest to get started seems to be keyboard (Send commands as in the winZip example). the Help files are pretty good.

You can also use Control commands. Overlap the window tool a little on the target screen, click the Control tab, then drag the little bullseye over the control you are trying to operate on. The tool will display all the information available about the control. I have found that specifying controls using [CLASS: button Instance: 1] has been very unreliable in what I tried - the instance number may change depending on what else is happening on the computer. I have been using [iD: nn] (also occasionally unreliable) and [Text: textname]. Using control commands will help you to avoid trying to precisely specify mouse click positions. If you want to do MouseClick, get the X,Y position of the window and then add the window X,Y position to the relative X,Y, position within the window (using the Au3 window Info Tool). resolution does not seem to matter, as a pixel is a pixel. Higher res just has more pixels on the screen, right?

Below is an example using control commands for a winzip extraction on a zip2exe file on the desktop. You can look up each command in the Help file for a description.

Run(@DesktopDir & "\myzipfile.exe")
WinWaitActive("WinZip Self-Extractor")
ControlClick("WinZip Self-Extractor","","[Text:OK]","Primary")
WinWaitActive("WinZip Self-Extractor","&Unzip")
ControlClick("WinZip Self-Extractor","&Unzip","[Text:&Unzip]","Primary")
WinWaitActive("WinZip Self-Extractor","unzipped successfully")
ControlClick("WinZip Self-Extractor","unzipped successfully","[Text:OK]","Primary")

Share this post


Link to post
Share on other sites

I think he meant OS? (Operating System)

Anyways back to the problem at hand. I am going to recommend you look at a couple of functions in the help file that will help you accomplish what you're wishing. You can also research, but a lot of uninstallers have a command-line argument you can call that will uninstall them silently. Installers are the same way. Check this first as that will make your life easier. Otherwise, look up the commands and get to scripting.

ControlClick()

ControlCommand()

ControlSend()

WinGetHandle()

AutoItSetOption - "WinTitleMatchMode"

Then I would use the AutoIt Window Info Tool to search out the control ID's, and window information.

That should be good to get you started in a positive direction.

Jarvis


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Yes I know that OP means Original Poster... I'm posting this script on the network that I help run so that people can

perform this task with little to no hassle

Share this post


Link to post
Share on other sites

also consider seriously "silent" installs and uninstalls.

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

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