Jump to content

ControlClick not clicking?


 Share

Recommended Posts

I used the window info tool to get what I've got below, but it just doesn't click the button. I run the script, nothing happens. 

WinActivate("SELECTION")
Sleep(200)
ControlClick("SELECTION", "", "[CLASS:Button;INSTANCE:2]")

i think maybe the autoit cannot detect the windows. So what i do:
 

MouseClick( "", 503, 500)
local $blanktitle = WinGetTitle("[ACTIVE]")
  If StringInStr($blanktitle, "SELECTION") Then
       msgbox("","", "got")
       WinActivate($blanktitle)
       ControlClick($blanktitle, "", "[CLASS:Button;INSTANCE:2]")
       
   Endif

The script can detect the windows as the it is prompt "got" message. But it just doesn't click the button.

Please help.
Thanks for any help you can offer.

Link to comment
Share on other sites

if the autoit win info tool is giving you window info then the script should be able to detect the window just fine.

maybe play with your wintitlematchmode opt to be more generic.

also instead of sleep, use winwaitactive

If @error Then
    MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!")
EndIf

"Yeah yeah yeah patience, how long will that take?"  -Ed Gruberman

REAL search results  |  SciTE4AutoIt3 Editor Full Version

Link to comment
Share on other sites

  • 3 weeks later...

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

×
×
  • Create New...