10-09-2007, 01:49 PM
I'm trying to trigger an event based on the state of a button in a media player. The button normally says "Play", but it says "Pause" after it's pressed while a file is playing. At the end of the file the button reverts to "Play", and that's the event I want to trigger on.
---------------------------------------------------
According to WinDowse:
(in the Children tab):
#005 Class Name=Button Text=Play
(in the Window tab):
Control ID=3FF
---------------------------------------------------
My best guess is something like this:
But, of course, this doesn't work. I'm a noob--can someone help me with the logic on how to detect the Text attribute for this Button object?
---------------------------------------------------
According to WinDowse:
(in the Children tab):
#005 Class Name=Button Text=Play
(in the Window tab):
Control ID=3FF
---------------------------------------------------
My best guess is something like this:
int hwnd=id(1023 w2)
if childtest(hwnd "Pause" "Button" w2)
,mes("button says Pause")
if childtest(hwnd "Play" "Button" w2)
,mes("button says Play")
endBut, of course, this doesn't work. I'm a noob--can someone help me with the logic on how to detect the Text attribute for this Button object?

and noticed the topic "Triggers: accessible object". I really don't understand Acc. And the Log Acc. Events function in QM seems too verbose (perhaps the reason for the filter?), making it hard to find items of interest. WinDowse seemed to be a perfect tool for exploring objects.