Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
class under mouse
#1
how do i get the class under mouse ?

please make a very easy to understand default function (hotkey) for capturing the data under mouse
like the qm editor shows on bottom frame.

...

i want to build some kind of super text drag'n drop
to an array of well known inputfields like
+ThunderRT6Textbox and other drag resistend input fields.
pi
#2
capture data under mouse

hotkey WIN M

simple output could go to str data_under_mouse
pi
#3
WIN ALT M

show capture option dialog
  • exe
    exepath
    class
    handle
    style
    whatever
pi
#4
Code:
Copy      Help
int h=child(mouse)
if(!h) h=win(mouse); int toplevel=1

str txt, cls, exe, exefull, styledescr
int style, exstyle, idc
RECT r

txt.getwintext(h)
cls.getwinclass(h)
exefull.getwinexe(h 1)
exe.getfilename(exefull)
style=GetWindowLong(h GWL_STYLE)
exstyle=GetWindowLong(h GWL_EXSTYLE)
GetWindowRect h &r
if(!toplevel)
,idc=GetWindowLong(h GWL_ID)
,styledescr=" (child)"
else if(style&WS_POPUP) styledescr=" (popup)"
;what else?

str data_under_mouse.format("Handle: %i[]Text: %s[]Class: %s[]Program: %s (%s)[]Styles: 0x%X 0x%X%s[]Rectangle: left=%i top=%i width=%i height=%i" h txt cls exe exefull style exstyle styledescr r.left r.top r.right-r.left r.bottom-r.top)
if(!toplevel) data_under_mouse.formata("[]id: %i[]Parent: %i" idc GetParent(h))

out data_under_mouse
#5
wohoo, thanks for that.
this is very helpful !

thanks
pi


Forum Jump:


Users browsing this thread: 2 Guest(s)