Sign in to follow this  
Followers 0
MikeDub

I just need help

9 posts in this topic

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)

post-44988-12767890815152_thumb.gif

Share this post


Link to post
Share on other sites



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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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 ****

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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. :P

Other than that I am afraid that I am out of ideas. :mellow:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

MikeDub,

Delighted we got there! :mellow:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0