Jump to content

Help with a Script


padmag
 Share

Recommended Posts

;------------------------------------Installation Begins-------------------------------------;
 
WinWaitActive("XYZ Server Software", "Start Installation")
Sleep(250)
ControlClick("XYZ Server Software", "Start Installation", "[CLASS:Button; TEXT:&Install >]")
 
;--------------------------------------------------------------------------------------------;
 
If NOT(WinWait("Error", "ignore",4)=0) Then
   ; A window pops up that requires user input... leaving that window for now
   sleep(1000)
   WinActivate("Error", "ignore")
   WinWaitActive("Error", "ignore")
   sleep(500)
   ControlClick("Error", "ignore", "[CLASS:Button; TEXT:&Ignore >]")
EndIf
 
 
This is part of the script trying to use for an installation. I added the second part to handle the error popup that comes up for subsequent installation(Not with first time installation).
 
The error pop heading is Error and it has a message which contains word ignore , so I added ignore.
And it gives three options to choose abort , try again and ignore.
 
So, I want to select ignore if this comes up. I am unable to get this working, Any suggestions?
 
 
Link to comment
Share on other sites

  • Moderators

Hi padmag, what is the software you're trying to install? If it supports (as most apps do) some form of command line options, you may be able to save yourself the grief of trying to manipulate the GUI.

"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

Back in the day (get off my lawn :) ), there didn't used to be a "ControlClick".  It used to be that one had to engineer a series of tabs and etcetera to navigate normal window focus to the place to click and then send keystrokes.

Absolutely, unquestionably, "ControlClick" is more reliable.  But it may very well be that you can solve this problem, this time, by looking at which control starts with focus, how many tabs you need to send until you are on the correct button, and then send a space character to select the button.

EDIT: Or alternatively, if the ignore button has an accelerator, you might just send that.  For example, if it looks like "Ignore", try Send("^i") and Send("!i").

Again, this is NOT as reliable as "ControlClick".  But it may be the way you need to go in this instance.

Edited by mrider

How's my riding? Dial 1-800-Wait-There

Trying to use a computer with McAfee installed is like trying to read a book at a rock concert.

Link to comment
Share on other sites

  • Moderators

pagmag,

 

Its an exe

Really? How unusual! :o

Seriously, what is it that you are installing? The more detail you give us, the better the help you are likely get. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...