Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Middle Click on Macro List
#1
I thought I had asked this question before but I can't seem to find it anywhere. I have a menu that should trigger when middle clicked on the macro name in the macro list; in that menu, it has macros that will move the macro that the mouse middle-clicked on to a specified folder in the macro.

there are two problems I'm having. the first is that the trigger doesn't work well with the new Scintilla editor (probably due to the class confusion between the Output and the SysTreeView32). and second, the method doesnt seem to be picking up the QM item anymore.

Can someone help me recreate this for the new editor?
An old blog on QM coding and automation.

The Macro Hook
#2
Function QmItemFromMouse
Code:
Copy      Help
;/
function#

;Returns id of QM item from mouse in the list of macros.
;Returns 0 if mouse is not on an item.
;Does not work in exe.

;EXAMPLE
;int iid=QmItemFromMouse; if(!iid) ret
;str name.getmacro(iid 1)
;out name


#if !EXE
int htv=id(2202 _hwndqm)
TVHITTESTINFO ht
GetCursorPos(&ht.pt); ScreenToClient(htv &ht.pt)
SendMessage(htv TVM_HITTEST 0 &ht)
if(ht.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT|TVHT_ONITEMINDENT)=0) ret
ret TvGetParam(htv ht.hItem)


Forum Jump:


Users browsing this thread: 1 Guest(s)