seco Posted December 19, 2005 Share Posted December 19, 2005 Has anyone made a working autoit script for photoshop cs2 that will install and cancel activation so it can be done later? If you have please post it so i can use it , i have searched the forums for like 2 days now and i haven't found anything and i also tried to make the script myself but i couldn't figure it out.Attached is what i came up with but don't work. I am new at it so you will probably find errors and that probably why it doesn't work.photoshop.txt Link to comment Share on other sites More sharing options...
bobthenob Posted December 19, 2005 Share Posted December 19, 2005 hitry thisI personaly like photoshop cs better; ----------------------------------------------------------------------------;; AutoIt Version: 3.1.0; Author: A.N.Other <myemail@nowhere.com>;; Script Function:; Template AutoIt script.;; ----------------------------------------------------------------------------; Script Start - Add your code below hererun ("setup.exe")winwaitactive("Adobe Photoshop CS2 - Setup")send('{ENter}')winwaitactive("Adobe Photoshop CS2 - License Agreement")send('{tab 4}')send('{ENter}')winwaitactive("Adobe Photoshop CS2 - Setup")send('{ENter}')winwaitactive("Adobe Photoshop CS2 - Setup","Change to install to a different folder")send('{ENter}')winwaitactive("Adobe Photoshop CS2 - Setup","Select the file types you would like")send('{ENter}')winwaitactive("Adobe Photoshop CS2 - Setup","The wizard is ready to begin installation")send('{ENter}')winwaitactive("Adobe Photoshop Installer")send('{tab}')send('{ENter}')winwaitactive("Adobe Activation")send('{tab}')send('{ENter}')winwaitactive("Adobe Photoshop CS2 - Setup"," want to cancel Adobe Photoshop")send('{tab}')send('{ENter}')winwaitactive("Adobe Photoshop CS2 - Setup","Wizard has successfully installed"))send('{ENter}')EXIT Link to comment Share on other sites More sharing options...
seco Posted December 20, 2005 Author Share Posted December 20, 2005 ; ----------------------------------------------------------------------------;; AutoIt Version: 3.1.0; Author: A.N.Other <myemail@nowhere.com>;; Script Function:; Template AutoIt script.;; ----------------------------------------------------------------------------; Script Start - Add your code below hererun ("setup.exe")winwaitactive("Adobe Photoshop CS2 - Setup")send('{ENter}')winwaitactive("Adobe Photoshop CS2 - License Agreement")send('{tab 4}')send('{ENter}')winwaitactive("Adobe Photoshop CS2 - Setup")send('{ENter}')winwaitactive("Adobe Photoshop CS2 - Setup","Change to install to a different folder")send('{ENter}')winwaitactive("Adobe Photoshop CS2 - Setup","Select the file types you would like")send('{ENter}')winwaitactive("Adobe Photoshop CS2 - Setup","The wizard is ready to begin installation")send('{ENter}')winwaitactive("Adobe Photoshop Installer")send('{tab}')send('{ENter}')winwaitactive("Adobe Activation")send('{tab}')send('{ENter}')winwaitactive("Adobe Photoshop CS2 - Setup"," want to cancel Adobe Photoshop")send('{tab}')send('{ENter}')winwaitactive("Adobe Photoshop CS2 - Setup","Wizard has successfully installed"))send('{ENter}')EXITthanks this works expect for the end it doesn't click finish, also where do you get the highlighted parts from? Link to comment Share on other sites More sharing options...
MHz Posted December 20, 2005 Share Posted December 20, 2005 winwaitactive("Adobe Photoshop CS2 - Setup","Wizard has successfully installed"))send('{ENter}')EXITthanks this works expect for the end it doesn't click finish, also where do you get the highlighted parts from?The highlighted text parameter can be easily obtained from the Window Info Tool.Example:Press CTRL-ALT-F to pause the display.>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: AutoIt v3.1.1 SetupClass: #32770Size: X: 493 Y: 113 W: 503 H: 393>>>>>>>>>>> Mouse Details <<<<<<<<<<<Screen: X: 851 Y: 478Cursor ID: 2>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: 0xF8FCFD Dec: 16317693>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size: X: 324 Y: 327 W: 75 H: 23Control ID: 1ClassNameNN: Button2Text: &Next >Style: 0x50010001ExStyle: 0x00000004>>>>>>>>>>> Status Bar Text <<<<<<<<<<<>>>>>>>>>>> Visible Window Text <<<<<<<<<<<&Next >CancelWelcome to the AutoIt v3.1.1 Setup WizardThis wizard will guide you through the installation of AutoIt v3.1.1.It is recommended that you close all other applications before starting Setup. This will make it possible to update relevant system files without having to reboot your computer.Click Next to continue.>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<Nullsoft Install System v2.02 Nullsoft Install System v2.02License AgreementPlease review the license terms before installing AutoIt v3.1.1.ControlClick('AutoIt v3.1.1 Setup', 'Welcome to the AutoIt v3.1.1 Setup Wizard', 'Button2')WinWaitActive('AutoIt v3.1.1 Setup', 'Welcome to the AutoIt v3.1.1 Setup Wizard') Link to comment Share on other sites More sharing options...
seco Posted December 21, 2005 Author Share Posted December 21, 2005 (edited) For some reason i cant get it to uncheck the read-me file and click finish can someone help me here's what i've tried winwaitactive("Adobe Photoshop CS2 - Setup","The InstallShield Wizard has successfully installed Adobe Photoshop CS2.")controlclick("Adobe Photoshop CS2 - Setup","The InstallShield Wizard has successfully installed Adobe Photoshop CS2.","Button3")controlclick("Adobe Photoshop CS2 - Setup","The InstallShield Wizard has successfully installed Adobe Photoshop CS2.","Button4")and i also tried thiswinwaitactive("Adobe Photoshop CS2 - Setup","InstallShield Wizard Completed")controlclick("Adobe Photoshop CS2 - Setup","InstallShield Wizard Completed,"Button3")controlclick("Adobe Photoshop CS2 - Setup","InstallShield Wizard Completed,"Button4")none of the two work, what am i doing wrong? Edited December 21, 2005 by seco Link to comment Share on other sites More sharing options...
bobthenob Posted December 21, 2005 Share Posted December 21, 2005 Hi sorry thats my fault ill have another go at it later I just get fed up installing it a reinstalling it on my virtual machine its such a lonfg winded install unistall prosessas soon as i can ill fix it I thinkits somthing like send('{ALT}')Send('{space}')Send('{Enter}') Link to comment Share on other sites More sharing options...
seco Posted December 21, 2005 Author Share Posted December 21, 2005 i tried that too for some reason it doesn't detect when the window is active. Link to comment Share on other sites More sharing options...
MHz Posted December 22, 2005 Share Posted December 22, 2005 none of the two work, what am i doing wrong?From the missing quotes in your 2nd example, I hope your not using notepad ? A free useful editor is here if needed, that will help you avoid making such mistakes.See if AutoIt Info Tool shows you if the control is hidden. The editor above has AutoItMacroGenerator in it. Start AutoItMacroGenerator in recording mode and click the checkbox and see the line it records. Sometimes 2 controls occupy the same space and 1 maybe hidden. You could then be trying to uncheck the wrong control which is hidden.ControlCommand() can also be used to un/check checkboxes as example below.WinWait("Adobe Photoshop CS2 - Setup", "The InstallShield Wizard has successfully installed Adobe Photoshop CS2.")ControlCommand("Adobe Photoshop CS2 - Setup", "The InstallShield Wizard has successfully installed Adobe Photoshop CS2.", "Button3", "UnCheck", "")ControlClick("Adobe Photoshop CS2 - Setup", "The InstallShield Wizard has successfully installed Adobe Photoshop CS2.", "Button4") Link to comment Share on other sites More sharing options...
seco Posted December 22, 2005 Author Share Posted December 22, 2005 i tried fixing my quotes and it didn't work. I tried the way mhz said and it doesn't work i also tried a script generated by script writer and it doesn't work either, im goin nuts trying to figure it out.any other ideas? Link to comment Share on other sites More sharing options...
MHz Posted December 23, 2005 Share Posted December 23, 2005 You have not mentioned it yet, but I am guessing that the checkbox maybe hidden. If so then you may need to send in the mouse to do it for you.; Use AutoIt Info Tool and set it to window coord mode.; Get the x & y coords of the checkbox and replace the 5's below.Opt('MouseCoordMode', 0)MouseClick('left', 5, 5); You could also add a processclose at the end of install, as a backup ?If ProcessExists('notepad.exe') Then ProcessClose('notepad.exe') Link to comment Share on other sites More sharing options...
seco Posted December 24, 2005 Author Share Posted December 24, 2005 (edited) i forgot to say but no the control is not hidden, but i finally figured it out here it is for whoever might need it Opt("WinTitleMatchMode", 4)Run("setup.exe")WinWait("Adobe Photoshop CS2 - Setup","The InstallShield(R) Wizard wi")ControlClick("Adobe Photoshop CS2 - Setup","The InstallShield(R) Wizard wi","Button1")WinWait("Adobe Photoshop CS2 - License Agreement","&Decline")ControlClick("Adobe Photoshop CS2 - License Agreement","&Decline","Button5")WinWait("Adobe Photoshop CS2 - Setup","&Next >")ControlClick("Adobe Photoshop CS2 - Setup","&Next >","Button1")WinWait("Adobe Photoshop CS2 - Setup","NewBinary12")ControlClick("Adobe Photoshop CS2 - Setup","NewBinary12","Button1")WinWait("Adobe Photoshop CS2 - Setup","All to PS")ControlClick("Adobe Photoshop CS2 - Setup","All to PS","Button1")WinWait("Adobe Photoshop CS2 - Setup","Click Install to begin the ins")ControlClick("Adobe Photoshop CS2 - Setup","Click Install to begin the ins","Button1")WinWait("Adobe Photoshop Installer","To activate by telephone via a")ControlClick("Adobe Photoshop Installer","To activate by telephone via a","Button6")WinWait("Adobe Activation","The 30-day grace period during")ControlClick("Adobe Activation","The 30-day grace period during","Button1")WinWait("Adobe Photoshop CS2 - Setup","InstallShield Wizard Completed")ControlClick("Adobe Photoshop CS2 - Setup","InstallShield Wizard Completed","Static2")ControlCommand("Adobe Photoshop CS2 - Setup","InstallShield Wizard Completed","Button4","UnCheck","")ControlClick("Adobe Photoshop CS2 - Setup","InstallShield Wizard Completed","Button3")i used the autoitmacro generator as mhz said and it finally worked. Thanks to MHZ and bobthenob for helping me on this. Edited December 24, 2005 by seco Link to comment Share on other sites More sharing options...
MHz Posted December 24, 2005 Share Posted December 24, 2005 i forgot to say but no the control is not hidden, but i finally figured it out here it is for whoever might need it WinWait("Adobe Photoshop CS2 - Setup","InstallShield Wizard Completed")ControlClick("Adobe Photoshop CS2 - Setup","InstallShield Wizard Completed","Static2")ControlCommand("Adobe Photoshop CS2 - Setup","InstallShield Wizard Completed","Button4","UnCheck","")ControlClick("Adobe Photoshop CS2 - Setup","InstallShield Wizard Completed","Button3")i used the autoitmacro generator as mhz said and it finally worked. Thanks to MHZ and bobthenob for helping me on this.Thanks for the reply on whether it was hidden.I can see on the last window that the last 2 Button numbers have reversed. That may explain why the readme checkbox was not unchecked as the script was clicking on the finish button instead. The ControlClick() with the "Static2" looks like a possible unneeded click while recording ?AutoItMacroGenerator can record a nice install script, quick and easy sometimes. Glad you have a working solution, seco. 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