Swap mouse buttons only for parts of the interface.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Dacicusan
Posts: 3
Joined: 19 Jan 2018, 03:17

Swap mouse buttons only for parts of the interface.

19 Jan 2018, 03:41

Hi. My first post here.

I have a small script that it is allowing me to swap the RightMouseButton and the MiddleMouseButton into a specific 3D app (Rhino3D).

The problem is that this script it is switching the mouse buttons for all the interface which it is not my intention, I need to use the normal mouse setup into the other parts of the interface and only the swaped button mouse into the 3D viewports and 2D Layouts.

It is a way to talk to AHK to exclude parts of the interface from the button swap action, and if yes how?

My script:

#ifWinActive ahk_exe Rhino.exe
$RButton::MButton
$MButton::RButton

==============

Thank you.
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Swap mouse buttons only for parts of the interface.

19 Jan 2018, 03:49

What about to create a SetTimer-routine that triggers, once your current mouse position lies within that target area, to swap/suspend the hotkeys?
Dacicusan
Posts: 3
Joined: 19 Jan 2018, 03:17

Re: Swap mouse buttons only for parts of the interface.

19 Jan 2018, 05:22

I think will be good to use the "ahk_class" as I know them. I found that the Afx constant in my case is 00007FF....., where the ... part it is changing.

How I can limit the execution of this script only to the ClassNN: Afx:00007FF(changing numbers) ?
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Swap mouse buttons only for parts of the interface.

19 Jan 2018, 05:31

Dacicusan wrote:I think will be good to use the "ahk_class" as I know them. I found that the Afx constant in my case is 00007FF....., where the ... part it is changing.

How I can limit the execution of this script only to the ClassNN: Afx:00007FF(changing numbers) ?
https://autohotkey.com/docs/commands/Se ... .htm#RegEx
Dacicusan
Posts: 3
Joined: 19 Jan 2018, 03:17

Re: Swap mouse buttons only for parts of the interface.

19 Jan 2018, 07:25

This is what I want to limit the script to. I'm new to AutoHorkey and I don't know how to do it by myself, so please help.
Screen Shot 01-19-18 at 09.33 AM.PNG
Screen Shot 01-19-18 at 09.33 AM.PNG (63.74 KiB) Viewed 458 times

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Araphen, Google [Bot], mcd, rubeusmalfoy, ShatterCoder and 96 guests