Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Detect an object's attribute
#1
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:

Code:
Copy      Help
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?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)