Page 7 of 17

Re: MouseGestureL

Posted: 11 Aug 2020, 19:31
by hachondeoro
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? 😁

Re: MouseGestureL

Posted: 12 Aug 2020, 00:13
by Pyonkichi
@hachondeoro, I've never experienced any such problems on my use. Please explain using a concrete example.

Re: MouseGestureL

Posted: 12 Aug 2020, 12:38
by Netmano
@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 4604 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 4604 times

Re: MouseGestureL

Posted: 13 Aug 2020, 19:04
by Pyonkichi
@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.

Re: MouseGestureL

Posted: 14 Aug 2020, 13:03
by Netmano
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.

Re: MouseGestureL

Posted: 18 Aug 2020, 11:41
by age_sage
1.png
1.png (18.93 KiB) Viewed 3903 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

Re: MouseGestureL

Posted: 18 Aug 2020, 22:14
by Pyonkichi
@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.

MouseGestureL v1.37

Posted: 22 Aug 2020, 00:51
by Pyonkichi
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:
MouseGestureL.ahk v1.37 (Aug. 22, 2020)
.
For details of the changes, refer to the following page:
https://hp.vector.co.jp/authors/VA018351/en/newfeatures_mgl.html#ver137
.
The recently added features are inspired by user questions. Thanks guys :thumbup:
Thanks η›†εœ°εΉ³εΉ³ for creating Chinese module.

Re: MouseGestureL

Posted: 22 Aug 2020, 22:18
by Kaloglog
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.

Re: MouseGestureL

Posted: 22 Aug 2020, 22:30
by gregster
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.

Re: MouseGestureL

Posted: 23 Aug 2020, 04:47
by Pyonkichi
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.

Re: MouseGestureL

Posted: 24 Aug 2020, 10:54
by Kaloglog
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?

Re: MouseGestureL

Posted: 24 Aug 2020, 18:45
by Pyonkichi
@Kaloglog, comment out this.

Components\MG_CommonLib.ahk - line: 8

Code: Select all

;MG_CheckAhkVersion()

Re: MouseGestureL

Posted: 25 Aug 2020, 20:53
by Kaloglog
it works. thank you.

Re: MouseGestureL

Posted: 31 Aug 2020, 15:07
by Netmano
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 2884 times
SUbtarget.png
SUbtarget.png (26.69 KiB) Viewed 2884 times

Re: MouseGestureL

Posted: 01 Sep 2020, 00:20
by Pyonkichi
@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.

Re: MouseGestureL

Posted: 01 Sep 2020, 22:24
by bastage
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 2853 times
MGL_targets_2020-09-01_20-16-25.jpg
MGL_targets_2020-09-01_20-16-25.jpg (22.83 KiB) Viewed 2847 times
MGL_actions_2020-09-01_20-19-52.jpg
MGL_actions_2020-09-01_20-19-52.jpg (29.88 KiB) Viewed 2847 times

Re: MouseGestureL

Posted: 02 Sep 2020, 03:05
by Pyonkichi
@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}

Re: MouseGestureL

Posted: 02 Sep 2020, 10:04
by bastage
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.

Re: MouseGestureL

Posted: 02 Sep 2020, 19:45
by Pyonkichi
@bastage, Thanks for the information. This may be useful to some other users.