mim Posted January 3, 2012 Share Posted January 3, 2012 Hi all, I would like to use autoit to be able to install an application. I am trying to use the ControlClick command for clicking the "next" button or for selecting a checkbox and i am using the ControlSend command to enter text in a text box. I have tried using ID as a parameter, however, it seems the ID changes next time i try and run my script. Also i have tried using CLASSNN as a parameter, but it also seems this changes next time i run the script. Could you please advise me on what is the best approach to this problem? Thanks in advance. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 3, 2012 Moderators Share Posted January 3, 2012 Hi, Mim. Welcome to the forum. What is the product you're trying to install? It is quite often (99%) easier to script a silent install rather than attempting to script your way through all of the windows to select the options you would like. Depending on the product, there are a couple of ways to go about it, but if you can give us an idea of what you're trying to install we can gladly assist. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Country73 Posted January 3, 2012 Share Posted January 3, 2012 I've had to do several automated installations for my work and I've found that http://www.appdeploy.com is a great place to start.You may find that the software you are trying to automate has already been done and members have posted what they used to automate it.Other places to look on their site:MSI installations: http://www.appdeploy.com/articles/commandline.aspInstallShield installations: http://www.appdeploy.com/tips/detail.asp?id=18 If you try to fail and succeed which have you done?AutoIt Forum Search Link to comment Share on other sites More sharing options...
mim Posted January 4, 2012 Author Share Posted January 4, 2012 Hi guys, Thanks for the replies...much appreciated. So the product i need to install is an propriety product we produce at work and my aim is to automate installation of it for testing purposes. After searching around, i found that i could use the "Send("!n")" command on most of my screens. However i have 1 window that pops up with a OK button which i dunno how to click. I have tried the following: ControlClick("Ack Screen", "", "[CLASS:Button; TEXT:OK; INSTANCE:1]") but with no luck...could it be cos this is maybe like a jsp popup? Regards, Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 4, 2012 Moderators Share Posted January 4, 2012 Hi, Mim. Can you please use the AutoIT Window Info tool on that particular pop-up, and then post what you get as a result? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
mim Posted January 4, 2012 Author Share Posted January 4, 2012 (edited) Hi JLogan, Below is what i get using the Window Info tool: Regards Edited January 4, 2012 by mim Link to comment Share on other sites More sharing options...
mim Posted January 4, 2012 Author Share Posted January 4, 2012 I cant seem to see the screenshot i pasted earlier...how do i add an attachment? Link to comment Share on other sites More sharing options...
mim Posted January 4, 2012 Author Share Posted January 4, 2012 In the Control Tab i see the following: Class Button Instance 1 ClassnameNN Button1 Name Advanced Mode [CLASS:Button; INSTANCE:1] ID 525258 Text OK Position 215, 75 Size 76, 23 ControlClickCoords 15, 17 Style 0x54010301 ExStyle 0x00100000 Handle 0x00000000000803CA Regards, Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 4, 2012 Moderators Share Posted January 4, 2012 Hi, Mim. Have you attempted your ControlClick, removing either the TEXT or INSTANCE designation? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
mim Posted January 4, 2012 Author Share Posted January 4, 2012 No i have not. Link to comment Share on other sites More sharing options...
shornw Posted January 4, 2012 Share Posted January 4, 2012 mim I prefer, wherever possible, to use a Send() command, as it isn't then subject to screen resolution Try: Use the Window info tool (in SciTE ctrl+F6) to identify the window name and text, then use WinWait("windowname", "windowtext") WinActivate("windowname", "text") Send("{TAB n}") ; n= however many you need to get to the OK button Send("{SPACE}") I have used this many times for software installs [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] Link to comment Share on other sites More sharing options...
mim Posted January 4, 2012 Author Share Posted January 4, 2012 Hi Shornw, Thanks for the reply...seems like an interesting way to do it.. will try it. Regards, Link to comment Share on other sites More sharing options...
mim Posted January 5, 2012 Author Share Posted January 5, 2012 So what i did was just use WinActivate and then ControlClick and it worked. Thanks. 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