Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessible Object Trigger / Release
#1
I'm triggering a function on the condition of a child gaining focus (or becomes active) but I'm not sure how to have it do something when it doesn't losses focus.
how can i do this?

$a 133 -4 "" "TJGFileEditorControl" 267306 "" "TFormEditPadPro7" "EditPad Pro 7 -"


EDIT:

You know, I was thinking that if 'Child Id' where included in the Properties -> Trigger -> Window -> Inactive dialog like class and style, I could use that trigger. any way to add that?
An old blog on QM coding and automation.

The Macro Hook
#2
Event "kill focus" does not exist. Need to remember last focused object...

This function works with the first edit control in Notepad Replace dialog.
Function acc_focus2
Trigger $a 133 -4 "" "Edit" 1152 "" "#32770" "Replace"     Help - how to add the trigger to the macro
Code:
Copy      Help
function hwnd idObject idChild
Acc a.ObjectFromEvent(hwnd idObject idChild)
out "set focus"
rep
,0.1
,int focused=a.State&STATE_SYSTEM_FOCUSED
,err break
,if(!focused) break
out "kill focus"
#3
fantastic!!!

thanks.
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)