Three finger swipe script not working in UWP and Notepad? Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
Pabl0
Posts: 3
Joined: 21 Feb 2018, 11:55

Three finger swipe script not working in UWP and Notepad?  Topic is solved

21 Feb 2018, 12:06

Hello, noob here. I already searched around the web for this but did not find anything.

I created a script to swipe with three fingers and change windows or show task, depending on the direction:

Code: [Select all] [Download] GeSHi © Codebox Plus

!Left::SendInput {Alt down}{Tab}{Alt up}
!Right::SendInput {LWin down}{Tab}{LWin up}

I am using the combination Alt+left/right as swiping with 3 fingers in my touchpad corresponds to these keys.

Well, it is working perfectly with any program except with UWP (such as Settings app, Spotify, or Whatsapp App) or Notepad.

When I am in any program, the output is:

Code: [Select all] [Download] GeSHi © Codebox Plus

003: SendMode,Input
004: SetWorkingDir,%A_ScriptDir%
005: Return (3.44)
006: SendInput,{LWin down}{Tab}{LWin up}
006: Return (2.75)
005: SendInput,{Alt down}{Tab}{Alt up}
005: Return (4.83)

While when I am seeing an app like Settings:

Code: [Select all] [Download] GeSHi © Codebox Plus

003: SendMode,Input
004: SetWorkingDir,%A_ScriptDir%
005: Return (7.78)

Additional info:
Version 1.1.28.00. Using Alt+Left/Right from the keyboard runs the script perfectly. Pointing normal programs with the cursor while using the conflictive apps does execute the script.
Can someone help me please?


Finally solved it by chance! I noticed that somehow UWP were responding to the three-finger swipe as with the keys PgUp and PgDown. So my new script is:

Code: [Select all] [Download] GeSHi © Codebox Plus

!Left::SendInput {Alt down}{Tab}{Alt up}
!Right::SendInput {LWin down}{Tab}{LWin up}
PgUp::SendInput {Alt down}{Tab}{Alt up}
PgDn::SendInput {LWin down}{Tab}{LWin up}

And it is working perfect so far. Thank you @Masonjar13 for trying to solve it :).
Last edited by Pabl0 on 18 Mar 2018, 11:47, edited 8 times in total.
User avatar
Masonjar13
Posts: 1388
Joined: 20 Jul 2014, 10:16
GitHub: Masonjar13
Location: Не Россия

Re: Three finger swipe script not working in UWP?

21 Feb 2018, 20:40

Try using the keyboard hook:

Code: [Select all] [Download] GeSHi © Codebox Plus

#InstallKeybdHook
; or
#UseHook
; or
$!Left::SendInput {Alt down}{Tab}{Alt up}
$!Right::SendInput {LWin down}{Tab}{LWin up}
Pabl0
Posts: 3
Joined: 21 Feb 2018, 11:55

Re: Three finger swipe script not working in UWP?

22 Feb 2018, 10:14

Masonjar13 wrote:Try using the keyboard hook:

Code: [Select all] [Download] GeSHi © Codebox Plus

#InstallKeybdHook
; or
#UseHook
; or
$!Left::SendInput {Alt down}{Tab}{Alt up}
$!Right::SendInput {LWin down}{Tab}{LWin up}

Thank you for your response, but none of them worked.
User avatar
Masonjar13
Posts: 1388
Joined: 20 Jul 2014, 10:16
GitHub: Masonjar13
Location: Не Россия

Re: Three finger swipe script not working in UWP and Notepad?

22 Feb 2018, 16:27

Alright, then I'm guessing it's a permissions issue. Are you running the script as Administrator? If not, it's probably the case that the Window you're trying to use it on has Admin or higher privileges and isn't allowing the script to take input. If both processes have Admin privilege, it shouldn't be a problem.
Pabl0
Posts: 3
Joined: 21 Feb 2018, 11:55

Re: Three finger swipe script not working in UWP and Notepad?

25 Feb 2018, 15:04

Masonjar13 wrote:Alright, then I'm guessing it's a permissions issue. Are you running the script as Administrator? If not, it's probably the case that the Window you're trying to use it on has Admin or higher privileges and isn't allowing the script to take input. If both processes have Admin privilege, it shouldn't be a problem.


If I'm not wrong, I changed the compatibility settings for all the 4 executables of autohotkey to run them as administrator. I run then the script, it asks me for admin permission, but it stays the same :(

Return to “Ask For Help”

Who is online

Users browsing this forum: kirby and 79 guests