Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
childtest heeeelp....
#1
Can someone please verify this or at least tell me why -nothing- seems to happen when I run this:

Code:
Copy      Help
;Test for "A" button to be active or not
;with Windows Calculator in scientific mode.
;
;style 0x500000B = active
;style 0x580000B = inactive
;
int hwnd=id(134 "Calculator")
if childtest(hwnd "A" "SciCalc" "Calculator" 128 0x500000B 280)
    mes "A is active"
if childtest(hwnd "A" "SciCalc" "Calculator" 128 0x500000B 280)
    mes "A is inactive"
[/url]
Just say HEMP!
#2
1. class is "Button"
2. one 0 is missing in style
3. Here is probably better way:

Code:
Copy      Help
if(IsWindowEnabled(hwnd)) mes "A is active"
else mes "A is inactive"

;or
Code:
Copy      Help
if(GetWinStyle(hwnd) & WS_DISABLED) mes "A is inactive"
else mes "A is active"


Forum Jump:


Users browsing this thread: 1 Guest(s)