Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mouse position triggers
#1
lets say i have a toolbar with no buttons.
lets say i have a jpeg set as the background of that toolbar.

Now, lets say i want to trigger a macro when i click anywhere in an area that is
10 10
20 20

is that possible and if so can i also make different types of shapes (eg circles, triangles, trees)?

thanks!


phase 1: bug the ever-living-bejesus out of Gintaras for functions almost no one else will use.
phase 2:
phase 3TongueROFIT!
An old blog on QM coding and automation.

The Macro Hook
#2
i'm currently doing this with a dual trigger setup. but i'm getting so weird things happening.

I have a macro that is triggered by the toolbar becoming active
Code:
Copy      Help
!a"TOOLBARPIC" "QM_toolbar"
however, it only triggers when i double click on it (I would like a single click). also, I get a quick flash of a window being created and destroyed; i'd like to not have that happen. is there a way to keep that from happening? I have the toolbar locked down with "0x9F". here's the window activity log

created 21106628 "#32770" "Customize Toolbar"
active 21106628 "#32770" "Customize Toolbar"
visible 21106628 "#32770" "Customize Toolbar"
active 226755548 "QM_toolbar" "TOOLBARPIC"

Thanks.
An old blog on QM coding and automation.

The Macro Hook
#3
Toolbar hook function
Code:
Copy      Help
;/
function# hWnd message wParam lParam

sel message
,case WM_SETCURSOR
,if(!(wParam=hWnd or GetDlgCtrlID(wParam)=9999)) ret
,sel lParam
,,case WM_LBUTTONUP<<16|HTCLIENT ;;or WM_LBUTTONDOWN
,,POINT p; GetCursorPos &p; ScreenToClient hWnd &p
,,out "%i %i" p.x p.y
,,;now launch macros (mac) depending on coordinates
,,,
,,
#4
WOW!!!

that is SOOO much tighter than my double macro thing!!!!

is there a way to make that toolbar not always-on-top?


BTW: THANKS!!!!
An old blog on QM coding and automation.

The Macro Hook
#5
Code:
Copy      Help
mac "Toolbar7" "+Progman"
#6
that works mostly but now everything takes precedence over the window even if i use ont on it. is there a way to make it move around in the z order like a normal app window?

thanks.
An old blog on QM coding and automation.

The Macro Hook
#7
No, but yes. Run this function.
Code:
Copy      Help
int ho=CreateWindowEx(WS_EX_TOOLWINDOW "#32770" 0 WS_VISIBLE|WS_POPUP 0 0 -10000 -10000 0 0 _hinst 0)
int htb=mac("Toolbar7" ho)
opt waitmsg 1
wait 0 WD htb

"Activate owner" must be checked.
#8
DANG!!!
That works really nice!!


thanks.
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)