Jump to content

Can't click button


Recommended Posts

I have been looking at examples of mouse clicks.  Trying to silent uninstall an app, but there is a dialog prompt.  I want to click no, but it's not clicking it.  I am sure I am doing something wrong, but can't get it.

Runwait(@ComSpec & " /c " & '"C:\Program Files (x86)\RivaTuner Statistics Server\Uninstall.exe" /S',"","@SW_HIDE")
WinWaitActive("RivaTuner Statistics Server Uninstall","")
ControlClick("RivaTuner Statistics Server Uninstall", "", "[CLASS:Button; INSTANCE:2]")

Attached is the window info

Capture.PNG

Thanks for any help.

Edited by esullivan
Link to comment
Share on other sites

Now I am trying to simply sleep and send a tab, won't even do that.  Something special with that window?

If I tab manually it will tab over.  I thought I could just send a tab and enter instead of a mouse click

Edited by esullivan
Link to comment
Share on other sites

Was the script running on the other machine at the time it wasn't working?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

shouldn't you use Run instead of RunWait?
also you could try to use CLASS:#32770 within ControlClick like this:

Run(@ComSpec & " /c " & '"C:\Program Files (x86)\RivaTuner Statistics Server\Uninstall.exe" /S', "", "@SW_HIDE")
ConsoleWrite("Debug: 1) run ok" & @CRLF)

WinWaitActive("RivaTuner Statistics Server Uninstall", "")
ConsoleWrite("Debug: 2) window found" & @CRLF)

ControlClick("[TITLE:RivaTuner Statistics Server Uninstall; CLASS:#32770]", "", "[CLASS:Button; INSTANCE:2]")
; ControlClick("[CLASS:#32770]", "", "[CLASS:Button; INSTANCE:2]") ; <-- or just this
ConsoleWrite("Debug: 3) done" & @CRLF)

 

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

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