Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Acc in QM tags window, get tagged item from mouse pos.
#1
I want to get the tagged item from the QM tags window from the mouse pointer postion.
I have a trigger set on double-right click, it then executes beneath macro.
When I double right click on a item in the right-pane of the tags-window (control ID: 4) it should retrieve the tagged name (macro name).
But it doesn't work, I am assuming the code that get's the mouse position is different then the coordinates needed where I placed {p.x} and {p.y}.
I tried both (check and uncheck) 'client area', from the mouse action.

Macro get_fromtags_macname
Trigger ##R     Help - how to add the trigger to the macro
Code:
Copy      Help
int w=win("Tags" "#32770")
POINT p; xm(p id(4 w) 1) ;;get mouse position into p.x and p.y ;;list

int w1=win("Tags" "#32770")
Acc a.Find(w1 "LISTITEM" "" F"class=SysListView32[]id=4[]xy={p.x} {p.y}" 0x1004)
str tagged_item=a.Name
#2
a.Find fails because xy must be at the top-right corner of object. Instead use FromMouse or FromXY.

Code:
Copy      Help
Acc a.FromMouse
str tagged_item=a.Name
out tagged_item
#3
Ah ok, thank you!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)