Autohotkey Switch left and right mouse buttons -
im windows8 user, , im trying switch left , right buttom inside irfanview (picture viewer application) because default pan left mouse buttom, in irfan view right mouse buttom, want whenever hold down left mouse button, send hold down right mouse buttom instead. have tried macro: works inside irfanview affect windows desktop, , other programs also.
#noenv #singleinstance, force #persistent #installmousehook #ifwinactive ahk_class irfanview lbutton::rbutton rbutton::lbutton #ifwinactive ahk_class fullscreenclass lbutton::rbutton rbutton::lbutton
could please give me advice, pehaps conditional??
thanks advanced.
the behavior seeing due fact 1 of selected windows activated, , trying click on window.
the solution make hotkeys use window class mouse on instead of active window. i've included function , how use below:
#if (mouseisoverclass("irfanview") or mouseisoverclass("fullscreenclass")) , !mouseisovercontrol("irfanviewerclass1") lbutton::rbutton rbutton::lbutton mouseisoverclass(winclass) { mousegetpos,,,win wingetclass,class,ahk_id %win% return (class = winclass) } mouseisovercontrol(wincontrol) { mousegetpos, , , , control return (control = wincontrol) }
edit: note #if
supported in ahk_l.
Comments
Post a Comment