Jump to content

motherbrainz

Members
  • Posts

    5
  • Joined

  • Last visited

motherbrainz's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks John, That works perfectly for what I am trying to do! I really appreciate it!!!
  2. I am using the following command to trigger overwriting a value in the registry right after the OK button appears. It works great as long as the "OK" button appears. However, in some cases the "OK" button never appears because the machine does not meet a certain criteria. My goal is to wrap this command around a timeout so that if the button never appears It wont get stuck waiting for the button indefinitely. Maybe my approach is wrong but I can't seem to use WinWaitActive because all the window titles are the same so my command does not get triggered at the correct moment. Thanks in advance to all. ;Wait & Import Registry Then Click Ok While 1 $var = ControlGetText("[CLASS:#32770]", "", "Button1") Sleep(1000) If $var = "OK" Then Run("ImportReg.bat") Sleep(1000) Send("{SPACE}") ExitLoop EndIf WEnd
  3. Ok, now I found this and got the desired result using the following code... ;Wait & Import Registry Then Click Ok While 1 $var = ControlGetText("[CLASS:#32770]", "", "Button1") Sleep(1000) If $var = "OK" Then Run("ImportReg.bat") Sleep(1000) Send("{SPACE}") ExitLoop EndIf WEnd Now another question, if the popup window never appears, is there a way to have the wait timeout after a given amount of time so that the script can continue to a couple extra keystrokes? Thanks!
  4. Thanks for the responses, I have been attempting to use the examples in the help file, but no luck so far, Would there be a way to have the script wait for text that appears in the popup instead of the popup itself ?
  5. I am very new to AutoIT and I have a program which I am trying to uninstall in a specific fashion. All of the window Titles are exactly the same including a popup window prompting for a restart. My goal is to wait until the popup window is displayed so I can overwrite a value that was set in the registry before it restarts on its own. When I use a command such as ;Wait & Click Next WinWaitActive("ExampleProgram") While Not ControlCommand('ExampleProgram','','Button1','IsEnabled','') Sleep(1000) WEnd Run("ImportRegistry.bat") The ImportRegistry.bat fires off immediately because the Title of all the windows are "ExampleProgram". The only value that I have found unique to the popup window is the Handle Value. So my question is, can I use the Handle Value instead of the Title Value to identify the window to wait for? If not, is there another value or way to do this that is more feasible. Another issue is that based on how the program runs against a given computer it may or may not prompt for a restart, so if I implement the wait successfully, if the restart prompt window never appears will the script hang indefinitely? Thanks for your patience and assistance in advance!
×
×
  • Create New...