Jump to content

Crazy Control Click Issue


Recommended Posts

For some crazy reason I cannot ControlClick on this GUI, in fact, I can't even WinWaitActivate the GUI window. Any ideas?

It is a Stopwatch script from Scripts and Scraps made by i542. I just want to be able to Click on Start and Stop buttons. Thanks in Advance.

Download/View Here

My Code:

Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)

WinWait("Stopwatch","")
If Not WinActive("Stopwatch","") Then WinActivate("Stopwatch","")
WinWaitActive("Stopwatch","")

ControlClick ("Stopwatch", "", "Button1")

Info on Start Button:

Control ID: 3

ClassNameNN: Button1

Text: Start

Style: 0x50034001

ExStyle: 0x00000000

Info on Stop Button:

Control ID: 4

ClassNameNN: Button2

Text: Stop

Style: 0x50014001

ExStyle: 0x00000000

Edited by litlmike
Link to comment
Share on other sites

He creates 2 GUIs with the Title "Stopwatch"... you are clicking the hidden one.

Lar.

Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)

WinWait("Stopwatch","Start")
If Not WinActive("Stopwatch","Start") Then WinActivate("Stopwatch","Start")
WinWaitActive("Stopwatch","Start")

ControlClick ("Stopwatch", "Start", "Button1")
Thank your kindly. Learn something new every day. How did you pick up on that? By looking through the code, or using the Window Tool that comes with AutoIt.
Link to comment
Share on other sites

  • 2 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

  • Recently Browsing   0 members

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