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")
end
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?