MouseGestureL

Post your working scripts, libraries and tools for AHK v1.1 and older
hachondeoro
Posts: 9
Joined: 31 May 2020, 06:21

Re: MouseGestureL

11 Aug 2020, 19:31

Hello. I currently use the MGLahk133 version of the program. I have downloaded and tried the MGLahk136 version, but this version doesn't recognize the hotkeys created by other running scripts (the MGLahk133 did quite nicely). Any help? 😁
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

12 Aug 2020, 00:13

@hachondeoro, I've never experienced any such problems on my use. Please explain using a concrete example.
Netmano
Posts: 58
Joined: 17 Jun 2020, 16:24

Re: MouseGestureL

12 Aug 2020, 12:38

@Pyonkichi

So I tried your suggestion to remove Remove MG_Abort(), its gotten me half way there. What is happening now is MB_8WU_ actionscript is excuted once and the next wheel wheel rotation executes MB_WU_ actionscript.
MB_8WD.gif
MB_8WD.gif (36.92 KiB) Viewed 4326 times

I am essentailly trying to get MB_8WU_ to act exactly like MB_WU_. In the case of MB_WU, every time you rotate the wheel, MB_WU actionscript is executed but more imprtantly, it does not require you to release trigger key, to excute MB_WD actionscript either.
MB_WD.gif
MB_WD.gif (11.65 KiB) Viewed 4326 times
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

13 Aug 2020, 19:04

@Netmano,
The following seems to work, but it's a tricky configuration. Not recommended. In fact, MGL isn't designed for the using you want.

RB_

Code: Select all

TestFlag:=0
RB_8_

Code: Select all

if (!TestFlag) {
	Send, 8
}
RB_8_WD_

Code: Select all

TestFlag:=1
MG_Wait(500)
MG_Gesture:="RB_8"
Send, D
RB_8_WU_

Code: Select all

TestFlag:=1
MG_Wait(500)
MG_Gesture:="RB_8"
Send, U
In addition to the above, the "Time threshold" value should be increased.
Netmano
Posts: 58
Joined: 17 Jun 2020, 16:24

Re: MouseGestureL

14 Aug 2020, 13:03

It works :D
though not as consistent but like you said its a tricky set up and not part of the intended design.
I am currently in the proccess of learning More about programming and AHK.
In good time I wish to write my own extensions/plug ins for MGL but your solution will do fine for now.

Thanks for your help.
age_sage
Posts: 1
Joined: 18 Aug 2020, 10:43

Re: MouseGestureL

18 Aug 2020, 11:41

1.png
1.png (18.93 KiB) Viewed 3625 times
MouseGestureL.ahk v1.36
Some of the fonts specified on the buttons are not installed in the default Windows.

Webdings is included in all versions of Microsoft Windows since Windows 98.
Wingdings 2 or 3 is a TrueType font distributed with a variety of Microsoft applications, including Microsoft Office up to version 2010.

> MG_Edit.ahk

Code: Select all

;-------------------------------------------------------------------------------
; Targets : ターゲット
;-------------------------------------------------------------------------------
CreateTargetsTab()
{
	local width, width2, height, tblText
	Gui, MEW_Main:Tab, 2

	; Target list
	Gui, MEW_Main:Font,, Wingdings 2
	Gui, MEW_Main:Add, Button, Section w25 h22 gTargetNew, % Chr(0xC8)
	Gui, MEW_Main:Font,S11, Wingdings 2
	Gui, MEW_Main:Add, Button, x+0 w25 h22 gTargetDelete vBTargetDelete Disabled, % Chr(0xCE)
	Gui, MEW_Main:Font, S12, Webdings
	Gui, MEW_Main:Add, Button, x+0 w25 h22 vBTargetUp	gTargetUp	Disabled, % Chr(0x35)
	Gui, MEW_Main:Add, Button, x+0 w25 h22 vBTargetDown gTargetDown Disabled, % Chr(0x36)
	Gui, MEW_Main:Font,, Wingdings 3
	Gui, MEW_Main:Add, Button, x+0 w25 h22 gTargetSort, % Chr(0x45)
	Gui, MEW_Main:Font, S11, Webdings
	Gui, MEW_Main:Add, Button, x+0 w25 h22 vBTargetDup gDuplicateTarget Disabled, % Chr(0x32)
	Gui, MEW_Main:Font, S10, Wingdings 2
	Gui, MEW_Main:Add, Button, x+0 w25 h22 vBFoldTarget gSwitchTargetFolding, % Chr(Config_FoldTarget ? 0x30 : 0x31)
	Gui, MEW_Main:Font
	Gui, MEW_Main:Add, TreeView, xs y+2 w%ME_TListW2% h%ME_ListH% vTVTarget2 gTVTargetSelect -Lines -ReadOnly 0x1000 ImageList%MG_hImageList% AltSubmit
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

18 Aug 2020, 22:14

@age_sage,
Thanks for the reporting. I know the issue because another user has mailed me. I've already implemented the countermeasure against it. It will be reflected to the next version.
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

MouseGestureL v1.37

22 Aug 2020, 00:51

MouseGestureL.ahk v1.37
  • Added the following three items to the action template.
    - Execute if no other action has been fired
    - Disable timeout
    - Save current gestures
  • Improved retrieving the target filename processing that the exe filename unique to the application can be retrieved as much as possible if the target is a UWP application.
  • Changed the specification that the timeout processing to be disabled by setting the option "Time threshold" to 0.
  • Reversed the behavior of "Horizontally" and "Vertically" in the action "Tile all windows of the same class".
  • Added Ctrl+D (duplicate) as a shortcut key for target list and gesture list.
  • Fixed a bug that all the assigned gestures are deleted when changing the target name that contains the regular expression control characters.
  • Fixed a bug that the Screen Edge Recognition module cannot be added until a user defined button is created.
  • Changed button icons and corrected detailed behavior of configuration dialog box.
  • Added Chinese module.
Download:
.
For details of the changes, refer to the following page:
.
The recently added features are inspired by user questions. Thanks guys :thumbup:
Thanks 盆地平平 for creating Chinese module.
Kaloglog
Posts: 7
Joined: 04 Jan 2020, 13:07

Re: MouseGestureL

22 Aug 2020, 22:18

I can't use ver 137. it says this.

Error at line 350.
Line Text: switch A_GuiControl {
Error: This line does not contain a recognized action.
The program will exit.

Why? I use AHK version 1.1.30.03 because some scripts won't work in latest version. Is it the reason?
And I have a question. Is it possible to disable MouseGestureL's gestures by another ahk script?I want to disable MousegestureL when I play games using my ahk script.
gregster
Posts: 9001
Joined: 30 Sep 2013, 06:48

Re: MouseGestureL

22 Aug 2020, 22:30

Kaloglog wrote:
22 Aug 2020, 22:18
I can't use ver 137. it says this.

Error at line 350.
Line Text: switch A_GuiControl {
Error: This line does not contain a recognized action.
The program will exit.

Why? I use AHK version 1.1.30.03 because some scripts won't work in latest version. Is it the reason?
The Switch command requires at least version 1.1.31 - but generally, because of initial bugs of that command you should ideally use the up-to-date version 1.1.33.02, if you want to use it.
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

23 Aug 2020, 04:47

Kaloglog wrote:
22 Aug 2020, 22:18
Error at line 350.
Line Text: switch A_GuiControl {
Error: This line does not contain a recognized action.
You can comment out lines 350-359 in MouseGestureL.ahk. They are not important.
Kaloglog wrote:
22 Aug 2020, 22:18
And I have a question. Is it possible to disable MouseGestureL's gestures by another ahk script?I want to disable MousegestureL when I play games using my ahk script.
The easiest way is setting a hotkey of "Toggle Gesture Enabling" and sending it from your script.
Kaloglog
Posts: 7
Joined: 04 Jan 2020, 13:07

Re: MouseGestureL

24 Aug 2020, 10:54

ok thanx. I commented out them but I got this error

---------------------------
MouseGestureL.ahk
---------------------------
ERROR : AutoHotkey version is old.

Execute Setup.vbs or install the latest version of AutoHotkey.
---------------------------
OK
---------------------------

Where do I need to edit this time?
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

24 Aug 2020, 18:45

@Kaloglog, comment out this.

Components\MG_CommonLib.ahk - line: 8

Code: Select all

;MG_CheckAhkVersion()
Kaloglog
Posts: 7
Joined: 04 Jan 2020, 13:07

Re: MouseGestureL

25 Aug 2020, 20:53

it works. thank you.
Netmano
Posts: 58
Joined: 17 Jun 2020, 16:24

Re: MouseGestureL

31 Aug 2020, 15:07

Hello

I have a Target called Notepad that has only notepad.exe as its matching rule

I want to create a Sub Target under Notepad that watches for
File name notepad.exe and the title *example – Notepad as its matching rule

This way so I can have context sensitive gestures depending on which Notepad documents are open.
The issue am having is that gestures inside Example Sub Target never trigger, even though *example – Notepad is active when I trigger a gesture

Below are screenshots of how I have set up the Target and Sub Target. Thanks
Target.png
Target.png (21.92 KiB) Viewed 2606 times
SUbtarget.png
SUbtarget.png (26.69 KiB) Viewed 2606 times
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

01 Sep 2020, 00:20

@Netmano,
Sub target must have a higher priority than parent.
By the way, the exe file name is not needed for sub target. The parent conditions are inherited to the sub targets.
Attachments
mgl_005.jpg
mgl_005.jpg (77.8 KiB) Viewed 2592 times
bastage
Posts: 6
Joined: 15 Sep 2017, 00:44

Re: MouseGestureL

01 Sep 2020, 22:24

Pyonkichi wrote:
12 Aug 2020, 00:13
@hachondeoro, I've never experienced any such problems on my use. Please explain using a concrete example.
Hi,
I think I have a similar issue as hachondeoro -- I have a few other autohotkey scripts running alongside MouseGestureL, and it seems that when I try to call any of them via their hotkeys through MGL they don't work. (The #if winactive() in my ahk scripts match the same parameters the MGL gestures do.)

Since I've just started to migrate some of my keyboard commands over to MGL I don't have too many mapped and my workaround so far has been to just "recreate" the script directly within MGL, but it would be nice to just "SendInput, {F13}" in MGL to call my AHK script.

Is there anything to note with #if winactive() or AHK in general when MGL will be sending the key ..?

Here's a quick example using a script running on CodeQuickTester that works when called from keyboard, but not when the same keyboard key is sent from MGL over Vivaldi:
codequick_MGL_2020-09-01_20-10-56.jpg
codequick_MGL_2020-09-01_20-10-56.jpg (39.56 KiB) Viewed 2575 times
MGL_targets_2020-09-01_20-16-25.jpg
MGL_targets_2020-09-01_20-16-25.jpg (22.83 KiB) Viewed 2569 times
MGL_actions_2020-09-01_20-19-52.jpg
MGL_actions_2020-09-01_20-19-52.jpg (29.88 KiB) Viewed 2569 times
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

02 Sep 2020, 03:05

@bastage,
Try to create another script contains the following hotkey and run it.
When you press F12, it will be same result as with MGL. MGL also uses hotkey command. I think it is AHK specification.

Code: Select all

F12::Send, {F13}
Last edited by Pyonkichi on 20 Mar 2021, 21:48, edited 1 time in total.
bastage
Posts: 6
Joined: 15 Sep 2017, 00:44

Re: MouseGestureL

02 Sep 2020, 10:04

Pyonkichi wrote:
02 Sep 2020, 03:05
@bastage,
Try to create another script contains the below hotkey and run it.
When you press F12, it will be same result as with MGL. MGL also uses hotkey command. I think it is AHK specification.

Code: Select all

F12::Send, {F13}
Looks like I just need to raise the SendLevel of the command MGL sends so that the other scripts will accept it:

Code: Select all

;Generate Key Stroke
SendLevel 1
SendInput, {F13}
.. is working for me.
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

02 Sep 2020, 19:45

@bastage, Thanks for the information. This may be useful to some other users.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: Gemos, Google [Bot] and 211 guests