esullivan Posted November 6, 2015 Posted November 6, 2015 (edited) 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 infoThanks for any help. Edited November 6, 2015 by esullivan
esullivan Posted November 6, 2015 Author Posted November 6, 2015 (edited) 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 November 6, 2015 by esullivan
esullivan Posted November 6, 2015 Author Posted November 6, 2015 I was was doing a team viewer session into a virtual box machine. Decided to compile the script and try it on my machine and it works. Must not like something, either teamviewer, virtualbox or both combined.Sorry!
BrewManNH Posted November 6, 2015 Posted November 6, 2015 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 GudeHow 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
esullivan Posted November 6, 2015 Author Posted November 6, 2015 Yeah it would run. It would start the uninstall installer, just wouldn't click or send keys.
Gianni Posted November 6, 2015 Posted November 6, 2015 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) Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
esullivan Posted November 6, 2015 Author Posted November 6, 2015 I did switch it to run, thanks.Like it said it's working now, without teamviewering into a virtualbox VM. Autoit must not like that.
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