Mouse button remapping script 'locking up'

Get help with using AutoHotkey and its commands and hotkeys
robhayes
Posts: 19
Joined: 28 Dec 2015, 15:35

Mouse button remapping script 'locking up'

24 May 2016, 14:22

I have a fairly simple mouse button remapping script, that often becomes unresponsive and I must ctrl-alt-del, and open Task Manager for it to resume working.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
I_Icon = C:\Users\Rob\Storage\Tech Stuff\Icons\ank-32.ico
IfExist, %I_Icon%
  Menu, Tray, Icon, %I_Icon%
;return
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#InstallMouseHook
RButton::MButton
XButton1::RButton
XButton2::Send #d
Return
Any assistance is much appreciated.
User avatar
Capn Odin
Posts: 1308
Joined: 23 Feb 2016, 19:45
Location: Denmark

Re: Mouse button remapping script 'locking up'

24 May 2016, 18:31

Try this.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

I_Icon := "C:\Users\Rob\Storage\Tech Stuff\Icons\ank-32.ico"
IfExist, %I_Icon%
	Menu, Tray, Icon, %I_Icon%

*RButton::MButton
*XButton1::RButton
*XButton2::Send #d
Please excuse my spelling I am dyslexic.
robhayes
Posts: 19
Joined: 28 Dec 2015, 15:35

Re: Mouse button remapping script 'locking up'

12 Jun 2016, 19:22

Unfortunately I have isolated the issue to this script, and your above code did not resolve the issue I'm facing.

Any other ideas?? :)
User avatar
Nextron
Posts: 1379
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: Mouse button remapping script 'locking up'

13 Jun 2016, 00:58

robhayes wrote:I have a fairly simple mouse button remapping script, that often becomes unresponsive and I must ctrl-alt-del, and open Task Manager for it to resume working.
Could you elaborate? Will the mouse buttons get back their original function or will they nothing when clicked? Is going to taskmanager sufficient to resume function or are you restarting the AHK process?
It may be that an window is active running with administrator rights while AHK is not, if that is the case, make sure AHK runs with administrative rights too.
Capn Odin wrote:Try this.
For remappings the * is already implied.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], roysubs and 59 guests