Page 2 of 2

Re: Request - Back/forward functions for mouse side buttons

Posted: Sat Jan 28, 2012 4:43 pm
by ShrapNull
I know this thread is old, but I have found a solution in a small autohotkey script I wrote. For anyone who doesn't know about autohotkey, it is very easy to use.

Create a new autohotkey script, then right click it & edit the script. Paste the following 3 lines at the bottom and save. Then double click on the file.

Code: Select all

#IfWinActive ahk_class XmainClass 
XButton1::PostMessage, 0x111, 335, 0, , XnView
XButton2::PostMessage, 0x111, 336, 0, , XnView

That is all. Please let me know if this helps you.

You can download autohotkey from http://www.autohotkey.com/download/ - the first link for autohotkey_L is fine.

Re: Request - Back/forward functions for mouse side buttons

Posted: Sun Mar 19, 2017 3:16 pm
by Dreamer
Still not working in 0.85b1.

Another workaround is HotkeyP.

Re: Back/forward functions for mouse side buttons

Posted: Sat Sep 03, 2022 8:29 am
by corr
@ShrapNull:
Could it be that the class name has changed? It does not work for me and Window Spy says that the ahk_class is Qt5156QWindowIcon.

But if I change that then the PostMessage parameters seem to be wrong too. Since it still doesn't work then. I could not find the message in the list either, only if I add another zero:
https://lexikos.github.io/v2/docs/misc/ ... geList.htm

For me it currently works like this:

Code: Select all

#IfWinActive - XnView MP
XButton1::Send, !{LEFT}
XButton2::Send, !{RIGHT}
And I set Alt+Cursor for forward and backward accordingly in the XnView keyboard settings.