MouseGestureL

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

19 Mar 2021, 09:09

@domeafavour, You can copy the configuration by copying the Config folder.
viv
Posts: 217
Joined: 09 Dec 2020, 17:48

Re: MouseGestureL

19 Mar 2021, 14:05

I used 8 directions
I only add ↗,↘,↙,↖

Now the situation is that I only need ↓→
However, it may be recognized as "↓↗" or "↘→" due to non-standard hand gestures

So is there a way to use only the gestures that have been set
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

20 Mar 2021, 00:44

@viv, Try the following settings.
Attachments
mgl.jpg
mgl.jpg (10.8 KiB) Viewed 4295 times
viv
Posts: 217
Joined: 09 Dec 2020, 17:48

Re: MouseGestureL

20 Mar 2021, 02:40

@Pyonkichi

thx!!!
it work fine know

I have my own script with some keystroke modification behavior

Examples:

Code: Select all

GroupAdd "closeWin","ahk_exe hh.exe"
GroupAdd "closeWin","ahk_exe calc.exe"
GroupAdd "closeWin","ahk_exe SystemSettings.exe"
GroupAdd "closeWin","ahk_exe ApplicationFrameHost.exe"
GroupAdd "closeWin","ahk_exe cmd.exe"
GroupAdd "closeWin","ahk_exe powershell.exe"
GroupAdd "closeWin","ahk_exe taskmgr.exe"
GroupAdd "closeWin","ahk_exe regedit.exe"
GroupAdd "closeWin","ahk_exe notepad3.exe"
GroupAdd "closeWin","ahk_exe IDMan.exe"
GroupAdd "closeWin","ahk_exe AutoHotkey.exe"
GroupAdd "closeWin","ahk_exe Renamer.exe"
GroupAdd "closeWin","ahk_exe grepWin.exe"
GroupAdd "closeWin","ahk_exe MangaMeeya.exe"
GroupAdd "closeWin","ahk_exe MangaMeeyaCE.exe"
GroupAdd "closeWin","ahk_exe mpv.exe"
GroupAdd "closeWin","ahk_exe VideoSplitter.exe"
GroupAdd "closeWin","ahk_exe CloudMusic.exe"
GroupAdd "closeWin","ahk_exe Dism++x64.exe"
GroupAdd "closeWin","ahk_exe Dopamine.exe"
GroupAdd "closeWin","ahk_exe foobar2000.exe"
GroupAdd "closeWin","ahk_exe QQMusic.exe"
GroupAdd "closeWin","ahk_exe KinhDown.exe"
GroupAdd "closeWin","ahk_exe MusicTag.exe"
GroupAdd "closeWin","ahk_exe Arkview.x64.exe"

#HotIf WinActive("ahk_group closeWin")
^w::WinClose
This is the V2 version code
Similar to #IfWinActive

It doesn't work, I think it might be a keyboard hook conflict?
It turns out that the code works well with StrokesPlus.net
Do I need to port all these types to this script?
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

20 Mar 2021, 05:05

@viv,
I don't know the specifications of AHK v2. But MGL only hooks mouse buttons or keys that are used to trigger gestures, so in theoretically there seems to be no conflict.
bastage
Posts: 6
Joined: 15 Sep 2017, 00:44

Re: MouseGestureL

20 Mar 2021, 18:24

viv
Posts: 217
Joined: 09 Dec 2020, 17:48

Re: MouseGestureL

20 Mar 2021, 19:55

@bastage

Thank you very much!!!
Now other scripts can accept MGL
viv
Posts: 217
Joined: 09 Dec 2020, 17:48

Re: MouseGestureL

20 Mar 2021, 20:20

Can add the end-of-script code to MG_User.ahk?

I want to comment to some tray menu
because MG_User.ahk precedes MG_RegisterMenu()


Now I can only comment in MouseGestureL.ahk
For example

; Menu, Tray, Add, %MG_LngMenu001%, :StdMenu
; Menu, Tray, Add,

Although this is fine, you need to manually comment out each MGL update


It would be nice to add a tag to jump to MG_User.ahk at the end of the script
This allows you to use "Menu, MenuName, Delete" or some other action that needs to be done at the end of the script

This way you don't have to modify MouseGestureL.ahk every time you update
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

21 Mar 2021, 00:45

@viv, Thanks for the idea. I will consider it.
viv
Posts: 217
Joined: 09 Dec 2020, 17:48

Re: MouseGestureL

23 Mar 2021, 01:54

After a few days of use, it fits my needs very well
Thank you very much

There are some reports that I don't know if they are bugs or what

1 ,Gestures will pause when the script takes a long time when recognition - time treshold is 0
For example
sleep 1000
msgbox "test"
...
I don't know the exact terminology, but the gesture is still recognized when the code is executed, and once the code takes longer the gesture gets stuck
I can only create a new AHK file and put the code into it
Then in the gesture "run,test.ahk" solve
This is very unfriendly
2.jpg
2.jpg (71.03 KiB) Viewed 4183 times

2,The default right click will cause the chrome bookmarks in folder to not be right clicked
Adding "class Chrome_WidgetWin_2" to the ignore list will probably fix it?
1.jpg
1.jpg (48.45 KiB) Viewed 4183 times
3,Press and hold the button and then perform an unrecognized gesture
When the button is released, the cursor flashes back to the position before the gesture was executed
Setting "recognition - time treshold" to 0 solves the problem ?
1.gif
1.gif (24.42 KiB) Viewed 4161 times
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

23 Mar 2021, 06:20

@viv,
1. Use "Execute After Recognition Process" of Script Control category. (The function name is MG_Defer)

2. That's one way too. Or replace default action "MG_WinActivate()" to the following script.

Code: Select all

if (!WinActive() && MG_WClass!="Chrome_WidgetWin_2") {
	WinActivate
}
If you don't want to activate the target window, you can delete default gesture of "RB_". You can select whichever.

3. Enable "Don't reproduce original mouse movements when undefined gesture is performed" check box.
viv
Posts: 217
Joined: 09 Dec 2020, 17:48

Re: MouseGestureL

23 Mar 2021, 06:38

@Pyonkichi

Thank you very much for your help!
Solved my problem perfectly!

Have a great day!
viv
Posts: 217
Joined: 09 Dec 2020, 17:48

Re: MouseGestureL

23 Mar 2021, 08:11

In "Execute After Recognition Process" the command may be executed repeatedly
Whether the command is outside or inside the function
1.gif
1.gif (35.61 KiB) Viewed 3883 times
It seems that the execution is repeated outside the function
2.gif
2.gif (32.92 KiB) Viewed 3877 times
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

24 Mar 2021, 05:52

@viv, Yes, you cannot place actions outside the "if" branch when you use MG_Defer.
viv
Posts: 217
Joined: 09 Dec 2020, 17:48

Re: MouseGestureL

27 Mar 2021, 19:20

When I del ←↑ (dont bind anything),it will error when right click in there


view
1.gif
1.gif (806.6 KiB) Viewed 3732 times



my setting
Config.zip
(10.91 KiB) Downloaded 183 times
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

29 Mar 2021, 21:54

@viv,
Thanks for the reporting. I'll fix it in the next version.
The solution is the following change:

Code: Select all

Menu, %menuname%, Add, %ME_LngMenu000%, OnNone
	.
	.
	.
OnNone:
	return
viv
Posts: 217
Joined: 09 Dec 2020, 17:48

Re: MouseGestureL

30 Mar 2021, 09:43

Why Sub Target can't use gestures in the same direction as the Main target?

For example
in chrome → is next page
(I use a violentmonkey scripts to do that,It does not matter)
but some pages violentmonkey scripts don't work
I have to manually process the url to execute the next page
But adding sub-targets does not use the same direction
so I can't use → as the next page of the sub-targets

how to do that?
dont inherit the parent conditions cant do that。
1.gif
1.gif (347.72 KiB) Viewed 3647 times
User avatar
Pyonkichi
Posts: 107
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

02 Apr 2021, 20:00

@viv, Sub target must have a higher priority than parent.
https://www.autohotkey.com/boards/viewtopic.php?p=350348#p350348
viv
Posts: 217
Joined: 09 Dec 2020, 17:48

Re: MouseGestureL

02 Apr 2021, 20:11

@Pyonkichi

thx !

I originally thought the priority was global < main < sub
Didn't notice the setting
Maybe it's better to automatically move the sub to the top of the main in cases like this
deama
Posts: 11
Joined: 05 Jan 2017, 17:08

Re: MouseGestureL

06 Apr 2021, 13:15

I'm having some trouble with trying to get the gestures to work on explorer, it simply doesn't seem to recognize it, works fine on everything else though.
I tried going to the targets tab and trying out different types, like control class, file name, title, etc... but it doesn't seem to recognize the explorer browser window.
I tried putting the gestures on just default and see if it recognizes the explorer browser in general, but it doesn't seem to.
I'm on windows 8.1 if that matters.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: gwarble and 133 guests