focksie Posted August 20, 2009 Share Posted August 20, 2009 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? Link to comment Share on other sites More sharing options...
Pantera975 Posted August 20, 2009 Share Posted August 20, 2009 (edited) the help file has tutorials exactly like this. Check out the winzip one that is in the help file. (search winzip) expandcollapse popup; 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 August 20, 2009 by Pantera975 Link to comment Share on other sites More sharing options...
focksie Posted August 20, 2009 Author Share Posted August 20, 2009 (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 August 20, 2009 by focksie Link to comment Share on other sites More sharing options...
somdcomputerguy Posted August 20, 2009 Share Posted August 20, 2009 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. Link to comment Share on other sites More sharing options...
ctyankeeinok Posted August 20, 2009 Share Posted August 20, 2009 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") Link to comment Share on other sites More sharing options...
JSThePatriot Posted August 20, 2009 Share Posted August 20, 2009 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) Link to comment Share on other sites More sharing options...
focksie Posted August 20, 2009 Author Share Posted August 20, 2009 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 Link to comment Share on other sites More sharing options...
LarryDalooza Posted August 21, 2009 Share Posted August 21, 2009 also consider seriously "silent" installs and uninstalls. Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now