MouseGestureL

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

Re: MouseGestureL

27 Apr 2024, 03:31

@Azona77,
If your additional code is not much, I recommend using MG_User.ahk instead of the plugin. It can be opened by selecting "Edit User Extension Script" from the tray icon menu.
Azona77
Posts: 3
Joined: 02 Sep 2023, 10:17

Re: MouseGestureL

27 Apr 2024, 03:55

Pyonkichi wrote:
27 Apr 2024, 03:31
@Azona77,
If your additional code is not much, I recommend using MG_User.ahk instead of the plugin. It can be opened by selecting "Edit User Extension Script" from the tray icon menu.
Thank you so much~ It worked~
I simply pasted it into MG_User.ahk after line`Goto, MG_User_End`. Haven't found any issue~
User avatar
GollyJer
Posts: 71
Joined: 19 Sep 2015, 19:33
Contact:

Re: MouseGestureL

30 Apr 2024, 12:37

Pyonkichi wrote:
27 Apr 2024, 03:30
@GollyJer, Specify ahk_parent as the 1st param.
You can use MG_HWND as the target window handle.

Code: Select all

ControlSend, ahk_parent, {Ctrl Down}{Home}{Ctrl Up}, ahk_id %MG_HWND%
Thanks for the help @Pyonkichi. However, it still doesn't seem to be working.
Do you use Discord or vscode? Those are both examples of app where I'm having to physically click into the control before the scroll key commands will work.
Discord is the best example. If you activate any other app, then hover over discord and do the gesture, nothing happens. If you then click anywhere in a chat message and do the gesture, it works.

Thanks for any more insight you can provide. 👍
Ralf_Reddings200244
Posts: 110
Joined: 11 Mar 2023, 14:16

Re: MouseGestureL

20 May 2024, 09:24

@Pyonkichi
Is it possible to get a gesture like RB_LB_8_/RB_LB_8__ to fire when LB is released, rather than when RB is released, and then have MGL reset, as If I manually released RB and then held it back down again?

I was able to get RB_LB_8_ to fire when LB is released but MGL does not reset itself (last trail is still active) so I am not able to fire another gesture such as RB_LB_2_, without releasing RB

I have gestures that follow the following pattern

Code: Select all

MG_Gesture_RB_LB_8__:
MG_Gesture_RB_LB_2__:
MG_Gesture_RB_LB_4__:
MG_Gesture_RB_LB_6__:

MG_Gesture_RB_MB_8__:
MG_Gesture_RB_MB_2__:
MG_Gesture_RB_MB_4__:
MG_Gesture_RB_MB_6__:
...
Each time I want to trigger one of them, I have to make sure to release RB at the end, I would really to do away with this, and just have these gestures fire when I release the sub trigger LB.

This would also make it faster trigger other gestures as I am already holding RB down

Thanks.
User avatar
Pyonkichi
Posts: 112
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

22 May 2024, 11:12

@Ralf_Reddings200244,
The behavior that you want is the default. Other gestures you are using may be affecting the issue. So save the current Config folder and remove it, then restart MGL with default settings and add only two gestures for the test.

RB_LB_8_

Code: Select all

Default=ToolTip, Up
RB_LB_2_

Code: Select all

Default=ToolTip, Down
You can also check the current recognition status by enabling gesture logs.
logs.png
logs.png (9.56 KiB) Viewed 540 times
Ralf_Reddings200244
Posts: 110
Joined: 11 Mar 2023, 14:16

Re: MouseGestureL

24 May 2024, 17:49

@Pyonkichi
Very strange, thank you for the conclusive answer, I will take your suggestion and take a closer look.
Ralf_Reddings200244
Posts: 110
Joined: 11 Mar 2023, 14:16

Re: MouseGestureL

08 Jun 2024, 20:15

@Pyonkichi
Is it possible to trigger a gesture like LB_, while the action script for gesture RB_ is running?

I am trying to create two gestures where I can pan and rotate the view in programmes like Photoshop fluidly. Essentially, being able to rotate the view, without needing to release "root", panning trigger

I would like to make it so that when I hold down Right click (RB_), panning is engaged and while RB_ is still active, its possible to add Left click (RB_LB_) which will disengage "panning" keys and perform rotation.

The standard AutoHotkey code for this idea is (lets say the key to pan is space and x is for rotation):

Code: Select all

~a::
	SendInput, {space down}{lbutton down}
	KeyWait, a
	SendInput, {lbutton up}{space up}
	return
a & f::
	SendInput, {space up}{lbutton up}				;first exit "panning" mode
	SendInput, {x down}{lbutton down}				;then engage keys for "rotation" mode
	KeyWait, f										
	SendInput, {lbutton up}{x up}						;On f up, exit "rotation" mode
	SendInput, {space down}{lbutton down}			;and re engage "panning" mode keys
	return
I recorded a little demonstration to show what it looks like in Photoshop.

I am having trouble implementing this idea in a clean MGL 1.40 environment. Here is what I have so far:
Image
I also tried a very basic test using mg_hold(), RB_:

Code: Select all

MG_CancelDefBehavior()
if (!MG_Hold())
	tooltip, RB_ Down
else
	tooltip, RB_ Up
RB_LB_:

Code: Select all

if (!MG_Hold())
	tooltip, RB_LB_ Down
else
	tooltip, RB_LB_ Up
The problem I am having seems to be that MGL will only let me trigger RB_LB if the current gesture is RB_ and not if its something like RB_8_ or RB_624.

I guess what I am trying to figure out is that is it possible to fire RB_LB_, no matter what the current gesture directions for RB_... is


I seem to going around in circles, any help or advice would be amazing
User avatar
Pyonkichi
Posts: 112
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

11 Jun 2024, 03:35

@Ralf_Reddings200244,
It is not possible in the current version. I've modified the code for testing. Download the test version from the link below and add new function to RB_ action.

https://ss1.xrea.com/pyonkichi.g1.xrea.com/archives/mgltest_20240611.zip

RB_:

Code: Select all

MG_SetBypass("LB")
ToolTip, RB_
RB_LB_:

Code: Select all

ToolTip, RB_LB_
Try it for a while. If there are no problems, it will be reflected in the next version.
Last edited by Pyonkichi on 14 Jun 2024, 11:07, edited 1 time in total.
Ralf_Reddings200244
Posts: 110
Joined: 11 Mar 2023, 14:16

Re: MouseGestureL

Yesterday, 07:15

@Pyonkichi
Thanks for the answer, your solution looks to be exactly what I needed.

I was waiting for the weekend to get back to this issue as I have been busy with work.

I have tried to download the file you linked to but I keep getting this error:
Not Found
The requested URL was not found on this server.
I tried it under a VPN too, same issue.
User avatar
Pyonkichi
Posts: 112
Joined: 16 May 2017, 20:40
Contact:

Re: MouseGestureL

Yesterday, 11:09

@Ralf_Reddings200244, Sorry, it was wrong link. I've fixed it.
Ralf_Reddings200244
Posts: 110
Joined: 11 Mar 2023, 14:16

Re: MouseGestureL

Yesterday, 14:15

@Pyonkichi

Okay I have it downloaded now, thanks! I will test it out, over the coming day. I will be sure to let you know of any problems.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: docterry, niCode and 156 guests