MikeDub Posted June 17, 2010 Share Posted June 17, 2010 OK Hiya All Feel like an ID10T here.... Have a script that I compile to an exe ( I just need to automate a software install). I can get the app to start the setup routine. I use the info tool to get the controls and what not. There are two buttons in the setup routine (of the app I'm trying to install) - 'Begin installation' and 'Cancel' (shown in capture.gif attachment) When I use the info tool, the hidden text comes up as all question marks >>>> Hidden Text <<<< ????? ?????? ?? ?????? ?????????: 60 So, I'm having problems getting a keyboard stroke to send. I've tried Send("{ENTER}") and the install window simply sits there with no change. Unfortunately, the setup has no cmdline switches I can use or anything. All my script is ShellExecute(my exe file) WinWaitActive("title.", "&Begin installation") Send("{ENTER}") I can't get past that point. Can anyone help, please (thanks) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 17, 2010 Moderators Share Posted June 17, 2010 MikeDub,Try using ControlClick - you can define the control to click on in many different ways (click on the Controls link in the controlID parameter box.For example, you can use the TEXT of the control, the CLASS, the X \ Y \ W \ H coordinates.......M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
jfcby Posted June 17, 2010 Share Posted June 17, 2010 MikeDub, After the window is active you may need to use Send("{TAB}") to give the button focus then Send("{ENTER}"). jfcby Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB **** Link to comment Share on other sites More sharing options...
MikeDub Posted June 17, 2010 Author Share Posted June 17, 2010 jfcby, That's one of the first things I tried - Thanks MikeDub, Try using ControlClick - you can define the control to click on in many different ways (click on the Controls link in the controlID parameter box. For example, you can use the TEXT of the control, the CLASS, the X \ Y \ W \ H coordinates....... M23 Thanks Melba OK here's what I have now, and I still can't get it working... ShellExecute("\\NETSHARE\Kaspersky\setup.exe") WinWaitActive("Installing Kaspersky Lab applications.", "&Begin installation") ControlClick("Installing Kaspersky Lab applications.","","[ID:6]") If I run the autoit exe from the command line with the below code, I get the setup.exe file to load and the 'Begin installation' button is highlighted; however, I just can't seem to figure out how to get that enter key pushed on the button, or a mouse click to get there. Run("\\NETSHARE\Kaspersky\setup.exe") WinWaitActive("Installing Kaspersky Lab applications.", "&Begin installation") Send("{ENTER}") I have attached a copy of my summary (txt file)Summary.txt Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 17, 2010 Moderators Share Posted June 17, 2010 MikeDub,ControlIds can be variable from instance to instance. Try this:ControlClick("Installing Kaspersky Lab applications.","","[CLASS:Button; INSTANCE:1]")M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MikeDub Posted June 17, 2010 Author Share Posted June 17, 2010 MikeDub, ControlIds can be variable from instance to instance. Try this: ControlClick("Installing Kaspersky Lab applications.","","[CLASS:Button; INSTANCE:1]") M23 Grrowl.... Doesn't seem to help much Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 17, 2010 Moderators Share Posted June 17, 2010 MikeDub,Kludgy but a possible workaround.Use WinGetPos to find the coords of the window and add the coords of the button within the window so as to get the screen coords of the button - best aim for the centre! Then use MouseClick.Brute force, but who cares if it works. Other than that I am afraid that I am out of ideas. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MikeDub Posted June 17, 2010 Author Share Posted June 17, 2010 WOOHOOOOO Thanks for all your help Melba23... Finally got it to work - The trick was going with WinWaitActive("Installing Kaspersky Lab applications.") ControlClick("Installing Kaspersky Lab applications.","","[CLASS:Button; INSTANCE:1]") I think having that '"&Begin installation"' in the WinWaitActive might have been hosing it (maybe) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 17, 2010 Moderators Share Posted June 17, 2010 MikeDub, Delighted we got there! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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