@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.
MouseGestureL
Re: MouseGestureL
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~
Re: MouseGestureL
Thanks for the help @Pyonkichi. However, it still doesn't seem to be working.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%
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.
-
- Posts: 121
- Joined: 11 Mar 2023, 14:16
Re: MouseGestureL
@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
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.
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__:
...
This would also make it faster trigger other gestures as I am already holding RB down
Thanks.
Re: MouseGestureL
@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_
RB_LB_2_
You can also check the current recognition status by enabling gesture logs.
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
Code: Select all
Default=ToolTip, Down
-
- Posts: 121
- Joined: 11 Mar 2023, 14:16
Re: MouseGestureL
@Pyonkichi
Very strange, thank you for the conclusive answer, I will take your suggestion and take a closer look.
Very strange, thank you for the conclusive answer, I will take your suggestion and take a closer look.
-
- Posts: 121
- Joined: 11 Mar 2023, 14:16
Re: MouseGestureL
@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):
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:
I also tried a very basic test using mg_hold(), RB_:
RB_LB_:
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
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 am having trouble implementing this idea in a clean MGL 1.40 environment. Here is what I have so far:
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
Code: Select all
if (!MG_Hold())
tooltip, RB_LB_ Down
else
tooltip, RB_LB_ Up
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
Re: MouseGestureL
@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_:
RB_LB_:
Try it for a while. If there are no problems, it will be reflected in the next version.
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_
Code: Select all
ToolTip, RB_LB_
Last edited by Pyonkichi on 14 Jun 2024, 11:07, edited 1 time in total.
-
- Posts: 121
- Joined: 11 Mar 2023, 14:16
Re: MouseGestureL
@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:
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:
I tried it under a VPN too, same issue.Not Found
The requested URL was not found on this server.
Re: MouseGestureL
@Ralf_Reddings200244, Sorry, it was wrong link. I've fixed it.
-
- Posts: 121
- Joined: 11 Mar 2023, 14:16
Re: MouseGestureL
@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.
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.
-
- Posts: 121
- Joined: 11 Mar 2023, 14:16
Re: MouseGestureL
@Pyonkichi
Okay, I have been using it and experimenting with it for a few days and I thought I would report back. It does work as you intended, with one minor issue.
I have it set up like so, RB_:
and for RB_LB_:
RB_ works, "RB_ Down" is printed on key down and "RB_ Up" on key up:
Same with RB_LB_:
The issue I mention occurs, if the cursor was dragged since right click action script was fired, and the current gesture is anything other than RB_, such as RB_4/RB_8. Then it becomes impossible to fire RB_LB_.
In this example, I fire RB_, then move the mouse so my gesture becomes something like RB_4/RB_8 and when I try to trigger gesture RB_LB_, it does not fire. You can see the hint RB_LB_ show but the ActionScript "RB_LB_ Down" does not print. It only works if I attempt to trigger it a second time by pressing left click, while right click is still down:
I can fix this issue by setting "Detection start" in the GUI, to a very high number or the following:
-
Having said that, with this set up I am not able to use AHKs keywait in RB_ like so, hence why I used MGLs mg_hold():
but I can in RB_LB_:
Using keywait in RB_, makes it impossible to fire RB_LB_, I dont quite know why, I tried a bunch of things such as applying ~ prefix to RB_/LB trigger definitions but it did not work. Do you know why using keywait in RB_ makes it impossible to fire RB_LB_?
Okay, I have been using it and experimenting with it for a few days and I thought I would report back. It does work as you intended, with one minor issue.
I have it set up like so, RB_:
Code: Select all
MG_SetBypass("LB")
if (!MG_Hold())
tooltip, RB_ Down
else
tooltip, RB_ Up
Code: Select all
ToolTip, RB_LB_ Down
keywait, lbutton
ToolTip, RB_LB_ Up
Same with RB_LB_:
The issue I mention occurs, if the cursor was dragged since right click action script was fired, and the current gesture is anything other than RB_, such as RB_4/RB_8. Then it becomes impossible to fire RB_LB_.
In this example, I fire RB_, then move the mouse so my gesture becomes something like RB_4/RB_8 and when I try to trigger gesture RB_LB_, it does not fire. You can see the hint RB_LB_ show but the ActionScript "RB_LB_ Down" does not print. It only works if I attempt to trigger it a second time by pressing left click, while right click is still down:
I can fix this issue by setting "Detection start" in the GUI, to a very high number or the following:
Code: Select all
MG_ThresholdBackUp := MG_Threshold, MG_Threshold := 999999 ; backup current threshold value
ToolTip, RB_LB_ Down
keywait, lbutton
ToolTip, RB_LB_ Up
MG_Threshold := MG_ThresholdBackUp ; on key up, restore threshold value
-
Having said that, with this set up I am not able to use AHKs keywait in RB_ like so, hence why I used MGLs mg_hold():
Code: Select all
MG_SetBypass("LB")
ToolTip, RB_LB_ Down
keywait, Rbutton
ToolTip, RB_LB_ Up
;if (!MG_Hold())
;tooltip, RB_ Down
;else
;tooltip, RB_ Up
Code: Select all
ToolTip, RB_LB_ Down
keywait, lbutton
ToolTip, RB_LB_ Up
Re: MouseGestureL
@Ralf_Reddings200244,
It's a simple bug, I didn't do a final check after modifying it to allow MG_SetBypass() to be called without parameter.
Please modify the code as follows:
MouseGestureL.ahk - line: 1216
Wrong:
Corrected:
It's a simple bug, I didn't do a final check after modifying it to allow MG_SetBypass() to be called without parameter.
Please modify the code as follows:
MouseGestureL.ahk - line: 1216
Wrong:
Code: Select all
MG_BypassTrigger := btn
Code: Select all
MG_BypassTrigger := "_" btn "_"
-
- Posts: 121
- Joined: 11 Mar 2023, 14:16
Re: MouseGestureL
@Pyonkichi
Okay I can cofirm that fixed the issue. Thanks a lot for looking into this Pyonkichi.
Looking forward to the successor to version 1.40
Okay I can cofirm that fixed the issue. Thanks a lot for looking into this Pyonkichi.
Looking forward to the successor to version 1.40
Re: MouseGestureL
Hello. Help me plz. I have many MG based on RB.
How can I make it so that when I press SHIFT and hold it, the recognition of right mouse button gestures is disabled and it works as usual mouse movement. and when I released the shift, gesture recognition worked again. I need it for PAN with RMB in CAD program.
How can I make it so that when I press SHIFT and hold it, the recognition of right mouse button gestures is disabled and it works as usual mouse movement. and when I released the shift, gesture recognition worked again. I need it for PAN with RMB in CAD program.
Re: MouseGestureL
@riva, do you want it to always be disabled in the CAD program, or only sometimes?a_riva wrote: ↑21 Oct 2024, 12:27Hello. Help me plz. I have many MG based on RB.
How can I make it so that when I press SHIFT and hold it, the recognition of right mouse button gestures is disabled and it works as usual mouse movement. and when I released the shift, gesture recognition worked again. I need it for PAN with RMB in CAD program.
You can disable it based on the active program:
It can be used when you want to disable the default gestures triggered by the right button in a target such as a game, but want to assign the functions to the extended buttons.
If it is enabled, the target is excluded from the target group of the default gestures, and hook processing will not be performed except for the trigger buttons used for the target-specific gestures.
____________________________________
Check out my site, submeg.com
Connect with me on LinkedIn
Courses on AutoHotkey
Check out my site, submeg.com
Connect with me on LinkedIn
Courses on AutoHotkey
Re: MouseGestureL
Only sometimes.@riva, do you want it to always be disabled in the CAD program, or only sometimes?
I want to have the possibility to disable just gestures assigned to RMB, by pressing and holding SHIFT button. When i release SHIFT btn, gestures must be enabled again. Sorry for my English)
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 109 guests