Jump to content

Recommended Posts

Posted (edited)

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
Posted

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.
  • 2 weeks later...
Posted

Problem will be fixed when I come home... So second window will be called "Stopwatch - Backgrouding" and first "Windows Stopwatch".

i542

P.S. Or it will be...

I can do signature me.

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
  • Recently Browsing   0 members

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