kudrow Posted March 9, 2017 Share Posted March 9, 2017 (edited) Hello, I am trying to automate an installer by sending commands (enter, left arrow etc) and the simple send script does not work. I have tried setting a sleep for 5 seconds so that I could manually activate the window before the send command is processed and it still does not work. I have also tried WinActivate with no luck as well. Not sure what else to try. Thanks for any help! Edited March 9, 2017 by kudrow Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 9, 2017 Moderators Share Posted March 9, 2017 @kudrow it is a little difficult to help with such a vague explanation. How about a screenshot of the installer window? Is it an InstallShield installation? You may not need to automate the GUI at all. What do you get when you over over the buttons/controls with the Autoit Window Info Tool (in the same directory where you installed AutoIt)? The answers to these questions will help us help you "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...
kudrow Posted March 9, 2017 Author Share Posted March 9, 2017 (edited) @JLogan3o13, sorry for being vague. It is not an installshield installation. Please let me know what else I can provide to help. Thank you for trying to help me. Edited March 9, 2017 by kudrow Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 9, 2017 Moderators Share Posted March 9, 2017 So have you tried ControlClick (check out the good example in the help file) on that button? I see you stated Send doesn't work, but the Control* commands are usually more reliable. "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...
kudrow Posted March 9, 2017 Author Share Posted March 9, 2017 @JLogan3o13, I am not sure I am doing it right.. This is what I have. RunWait(@COMSPEC & " /c Start c:\climax\climaxsetup.exe") Sleep(2000) $win = WinActive("[Title:Welcome]") ControlClick($win, "", "1017") Also tried RunWait(@COMSPEC & " /c Start c:\climax\climaxsetup.exe") Sleep(2000) $win = WinActive("[Title:Welcome]") ControlClick($win, "", "1017","",1) I bet I am missing something. It does not work with above example. Thanks! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 9, 2017 Moderators Share Posted March 9, 2017 Try something like this: ControlClick("Welcome", "", "Button1") "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...
kudrow Posted March 9, 2017 Author Share Posted March 9, 2017 @JLogan3o13 Still not getting anything. I will keep trying different things Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 9, 2017 Moderators Share Posted March 9, 2017 @kudrow are you able to share what the product is? Don't particularly want to Google "Climax" "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...
kudrow Posted March 9, 2017 Author Share Posted March 9, 2017 @JLogan3o13 it is custom software for a client of mine. They use it for importing and exporting. The issue I am trying to resolve is that there are 3 exe files that need to be ran in order and I am just trying to automate it. Thanks again! Link to comment Share on other sites More sharing options...
kudrow Posted March 10, 2017 Author Share Posted March 10, 2017 @JLogan3o13 one thing I failed to mention is that there is a bigger window behind the smaller one. Not sure if that is useful information or not. See attached. Link to comment Share on other sites More sharing options...
kudrow Posted March 10, 2017 Author Share Posted March 10, 2017 (edited) Getting a little closer. I can read text from these boxes with the below code but I cannot set the text with _GUICtrlEDit_SetText $winname= "User Information" $sControlIdentifier= 1039 $hControl = ControlGetHandle($winname,"",$sControlIdentifier) $first=_GUICtrlEdit_GetText($hControl) MsgBox("0","test",$first) Edited March 10, 2017 by kudrow Link to comment Share on other sites More sharing options...
kudrow Posted March 10, 2017 Author Share Posted March 10, 2017 @JLogan3o13 sorry to bug you, quick question. I can't even get a Mousemove command to work while this installer is active, any idea why? Thanks! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 10, 2017 Moderators Share Posted March 10, 2017 Can you define "not working"? Does the mouse not move to where you expect, or is it not moving at all? It sounds as though you have a blocking function (WinWaitActive, perhaps) stepping on it. "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...
kudrow Posted March 10, 2017 Author Share Posted March 10, 2017 It does not move at all while the installer is active. I can alt+tab out of it and the mouse will move as expected. Does that make sense? Link to comment Share on other sites More sharing options...
kudrow Posted March 10, 2017 Author Share Posted March 10, 2017 So my new plan to automate this installer was to control the on screen keyboard with mouse moves and clicks. I tested that it works when I manually move the mouse and click letters. Then when I try to use autoit to do it, it does absolutely nothing. I can test my autoit script on anything else and it works. 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