Double left mouse click remap Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Gazmoz18

Double left mouse click remap

30 May 2018, 15:56

I want map the enter key to change to a double mouse click? How do I do this please?

Many thanks
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Double left mouse click remap

30 May 2018, 16:05

Code: Select all

Enter::click 2
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
gazmoz17
Posts: 72
Joined: 14 Mar 2018, 09:37

Re: Double left mouse click remap

31 May 2018, 04:43

Thats great mate thanks a lot and works as ive asked.....

But in my accountancy software if I have a customer list open add arrow key down to Customer A...

If I press enter it doesnt open Customer A it opens what ever customer my mouse is hovering over- is there a way to amend this?

Many Thanks in advance
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Double left mouse click remap

31 May 2018, 15:12

Yes, you can fix that, but it depends on how exactly you want it to work. If you want it to work globally, minus specific windows, you could make an exception list. Alternatively, you could make it work only with a specific list of windows.

Code: Select all

#if !winActive("Accounting Software") ; replace title as necessary (see WinTitle in the documentation)
; the ! prefix makes it work when the specified window is NOT active (it's the sign for a logical NOT), so to reverse that logic, just remove the !
; use && (logical AND) to add multiple function calls, like !winActive("Accounting Software") && !winActive("other window")
; if you don't use the !, use || (logical OR) instead for multiple calls, like winActive("window1") || winActive("window2")
Enter::click 2
#if
Or, you could do a manual toggle, but that's more of an inconvenience when you're doing things, rather than having it automatic.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
MaxAstro
Posts: 557
Joined: 05 Oct 2016, 13:00

Re: Double left mouse click remap

31 May 2018, 15:22

Slight correction - you have your ands and ors backwards. It should be (false AND false AND false), or (true OR true OR true); (!WinActive || !WinActive) will always be true, and (WinActive && WinActive) will never be true, since only one window can be active at once.
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Double left mouse click remap  Topic is solved

31 May 2018, 15:37

This is true. Thanks for the catch, it's been a long day :P I've edited my post.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 167 guests