Iznogoud Posted October 11, 2005 Share Posted October 11, 2005 (edited) I am writing executables wich will be executed after an unattended install of Windows Xp.So i have a couple programs wich i wanna install automatically en update so it will be ready if everything is done.So this is my problem:My codeRun("C:\Microsoft AntiSpyware Beta\MicrosoftAntiSpywareInstall.exe") ; ---------------------- Installation of MS AntiSpyware --------------------------------- WinWaitActive("Microsoft AntiSpyware", "powerful anti-spyware software that") ControlClick("Microsoft AntiSpyware", "", "Button1") WinWaitActive("Microsoft AntiSpyware", "license agreement") ControlClick("Microsoft AntiSpyware", "", "Button3") ControlClick("Microsoft AntiSpyware", "", "Button5") WinWaitActive("Microsoft AntiSpyware", "Change to install to a different folder") ControlClick("Microsoft AntiSpyware", "", "Button1") WinWaitActive("Microsoft AntiSpyware", "wizard is ready to begin") ControlClick("Microsoft AntiSpyware", "", "Button1") WinWaitActive("Microsoft AntiSpyware", "Installation Complete") ControlClick("Microsoft AntiSpyware", "", "Button5") ControlClick("Microsoft AntiSpyware", "", "Button1") ; ---------------------- Updating of MS AntiSpyware ------------------------------------ WinWaitActive("Microsoft AntiSpyware (Beta 1)", "") ControlClick("Microsoft AntiSpyware (Beta 1)", "", "ThunderRT6PictureBoxDC9") WinWaitActive("Microsoft AntiSpyware AutoUpdater", "") Sleep(10000) ControlClick("Microsoft AntiSpyware (Beta 1)", "", "ThunderRT6UserControlDC4")I have made a screenshot of the field i wanna click:Wich commands can i use to click this field? Or does anyone already have a script wich can do this so i can study it and learn how you guys are using the good commands etc.The problem in the code begins at:.. ; ---------------------- Updating of MS AntiSpyware ------------------------------------ WinWaitActive("Microsoft AntiSpyware (Beta 1)", "") ControlClick("Microsoft AntiSpyware (Beta 1)", "", "ThunderRT6PictureBoxDC9") ..I have used the WinWaitActive command and the correct classname, but it won't work. Do you guys have some idea?Maybe you can say look for text "Spyware definitions" and click? or something like that. Sorry for my simple minded solutions Edited October 11, 2005 by Iznogoud Link to comment Share on other sites More sharing options...
jefhal Posted October 11, 2005 Share Posted October 11, 2005 (edited) Sorry for my simple minded solutions Forget Simple Minded. How about Brute Force? Add this code to your script just when you need to click on that "invisible" control:$realsize = WinGetPos("Microsoft AntiSpyware") MouseClick("Left",$realsize[0]+107,$realsize[1]+425); Press Spyware Definitions linkWhere 107 and 425 are the distance in x and y that your button is from the top left corner of the dialog box. (These numbers are correct --- I measured on my system). It's easy to find this dimension by dragging the dialog box up into the top left corner of your screen and then, with AutoIT Info, check the exact x/y of the control. I do this all the time when I can't communicate with the interface (most Autodesk products)... Edited October 11, 2005 by jefhal ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
Valuater Posted October 11, 2005 Share Posted October 11, 2005 Forget Simple Minded. How about Brute Force? .... I do this all the time when I can't communicate with the interface (most Autodesk products)...Good one jefhal8) Link to comment Share on other sites More sharing options...
Iznogoud Posted October 12, 2005 Author Share Posted October 12, 2005 (edited) Hahahaha, i was woundering how people will do that with coordinates within a dialog box. Finally i know This will be handy for sure. But the coordinates can be find also in the Active Windows info tool. If you use it you don't need to drag you active window to the upper left of your screen. Or am i wrong? Edited October 12, 2005 by Iznogoud 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