New features of MouseGestureL.ahk

Added features in Ver. 1.39

Added features in Ver. 1.38

Added features in Ver. 1.37

  • "Save current gestures", "Disable timeout" and "Execute if no other action has been fired"

    These functions are for gestures that perform repeated operations such as rocker gestures after the cursor movement. It is explained with a specific setting example, since it's complicated.
    In the example below, holding down the right button and moving the cursor down, then rotating the wheel down will switch to the next task, and rotating the wheel up will switch to the previous task.

    RB_D ;Save current gestures MG_SaveGesture() ; (1) Save gesture input state "RB_D" MG_Cancel() ; Exclude this action from the action counting RB_DWU_ ;Previous task MG_DisableTimeout() ; (2) Disable timeout MG_StopNavi() if (!GetKeyState("Shift")) { Send, {Shift down} ; Hold down Shift if not pressed } if (!GetKeyState("Alt")) { Send, {Alt down} ; Hold down Alt if not pressed } Send, {Tab} ; Press Tab RB_DWD_ ;Next task MG_DisableTimeout() ; (2) Disable timeout MG_StopNavi() if (GetKeyState("Shift")) { Send, {Shift up} ; Release Shift if held down } if (!GetKeyState("Alt")) { Send, {Alt down} ; Hold down Alt if not pressed } Send, {Tab} ; Press Tab RB_D_ ;Jump to the bottom if (GetKeyState("Alt")) { Send, {Alt up} ; Release Alt if held down } if (GetKeyState("Shift")) { Send, {Shift up} ; Release Shift if held down } if (MG_IsFirstAction()) { ; (3) If task switching has not executed, Send, ^{End} ; Press Ctrl + End }

    (1) In the usual settings, the asigned action to "RB_DWU_" will be executed only once at the first wheel rotation, and the action of "RB_WU_" will be executed by each rotation thereafter. That is because the gesture recognition state is reset to "RB_" after the action is executed. (See "Continuation motion type gesture" in the help "Advanced usage")
    Calling MG_SaveGesture() at the phase of "RB_D" memorizes the input state of gestures, the recognition state after reset processing will become "RB_D". Therefore the actions of "RB_DWU_" and "RB_DWD_" can be executed repeatedly by each wheel rotation.

    (2) When the cursor is kept stationary after pressing the trigger button and moving the cursor, the recognition process will exit by timeout, but you can prevent that by calling MG_DisableTimeout().

    (3) When the right button is released, task switching is executed and the action "Send, ^{End}" assigned to "RB_D_" is also fired at the same time, but you can prevent that by branch processing with MG_IsFirstAction().

    * In the above example, if "RB_D_" is assigned to the targets other than the Default, the same code must be described for all of those actions. ("Send, ^{End}" must be replaced to individual actions) If you omit that, the Alt and Shift key will be left pressed. Pay attention when you use this setting example as it is.
    In addition, it is recommended to register the following four gestures to prevent accidental operation. Putting the user function for the key release processing to User Extension Script makes simple to describe actions.

    RB_DL, RB_DR, RB_DU, RB_DD ;Exit task switching if (GetKeyState("Alt")) { Send, {Alt up} } if (GetKeyState("Shift")) { Send, {Shift up} } MG_Cancel()

  • Executable file name of UWP application

    When registering a UWP application such as Microsoft Edge as a target, the window class name is retrieved "ApplicationFrameWindow" and the executable file name is retrieved "ApplicationFrameHost.exe", therefore the target could not be identified unless it was combined with the window title. From this version, the executable file name unique to the application such as "MicrosoftEdge.exe" can be retrieved, so it is possible to register the target with a single condition.

    * You need to change the settings if "ApplicationFrameHost.exe" is used for the condition of the executable file name in the existing targets.

Added features in Ver. 1.35

  • Perform default behavior when a button is released

    After the gesture is accepted, the original behavior according to the mouse operation will be performed when the mouse button is released.
    If the gesture fires after pressing the right button, the context menu will not be displayed when the right button is released, but it will be displayed if this function has been called.
    If there is an "if" statement in the assigned action, and if you want to display the context menu assuming that it's a normal operation because of the "if" conditions are not satisfied, call this function on the "else" side.

  • Cancel default behavior when a button is released

    After the gesture is accepted, the original behavior according to the mouse operation will be canceled when the mouse button is released.
    If the gesture does not fire after pressing the right button, the context menu will be displayed when the right button is released, but it will be canceled if this function has been called.
    << Example of use >>

    1. Assign the following actions to the gesture triggered by the right button.
    2. The action that the delayed processing is executed if the subsequent gesture has not been entered, that is configured with the MG_Timer() function.

    With the above settings, the context menu will be displayed before the assigned action is executed. To prevent that, call this function in the process immediately after the gesture is entered.

  • Activate Previous Active Window

    The old version of the action described the MG_ActivatePrevWin() function call with no parameter. If you modify it to MG_ActivatePrevWin(1000), the previous active windows will be activated one after another by repeating the same operation within a second.

  • Adjust position and size for the Windows Aero

    If the action "Move and Resize Window" is executed in the environment where Windows Aero is enabled, the window size will be slightly smaller than the specified value. You can avoid that by specifying this option.

  • User defined buttons

    You can edit the user defined buttons by selecting "Edit" from the context menu that appears when you right-click the button list.
    Stored folder of user defined buttons has been changed to UserButtons under the Config folder. Even if you override definition of the standard buttons they will be saved there. With this change, you can now back up all configurations just by copying the Config folder. (Excluding plugins)

Added features in Ver. 1.32

  • Supports High DPI environments

    Gesture hints and configuration dialog box are now displayed correctly in environments where the display scale is set to more than 100% by the display settings of Windows.
    However, since AutoHotkey does not support Per-Monitor DPI, the problems related to cursor coordinates still occur on a monitor with a different display scale than the primary monitor in a multi-monitor environment. To avoid this, you need to change the high DPI setting for AutoHotkey as follows.

    1. Show properties of the AutoHotkey.exe (or MouseGestureL.exe) in Windows Explorer.
    2. Select "Compatibility" tab and click the "Change high DPI settings" button.
    3. Check "Override high DPI scaling behavior".
    4. Select "Application" in the "Scaling performed by:" dropdown list. (It's selected by default.)
    5. Click OK to close the properties.

    The gesture function on the sub-monitor will perform properly with above settings, however when the dialog box such as the setting screen is moved to the sub-monitor, the window size is not adjusted automatically according to the display scale.
    This setting also affects scripts created for AutoHotkey other than MouseGestureL, so make a decision whether to change this settings in consideration of your own usage situation.

  • Excluded windows for task switcher

    You can register the windows that you don't want to activate when calling the function MG_ActivatePrevWin(). This function is added to the actions from "Activate Previous Active Window" in the action template.