Script which checks for 2 or 3 mouse cursors (Tablet)?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Guest2018

Script which checks for 2 or 3 mouse cursors (Tablet)?

18 Jan 2018, 12:34

Hi,

I have an old Windows 8.1 tablet (Acer W510).
Even though it sucks really much, at least it supports 5 finger touch.
Is it somehow possible to create a script which checks if you're using 2 or 3 fingers on the tablet?
I would like to limit this function to the GoogleChrome browser.

Two fingers = next tab
Three fingers = previous tab

The code would be something like

Code: Select all

#if WinActive("ahk_class Chrome")
2 mouse cursors::
Send {Ctrl down}{Tab}{Ctrl up}
return

3 mouse cursors::
Send {Ctrl down}{Shift down}{Tab}{Shift up}{Ctrl up}
return
If something like this isn't possible, then I would try to do it with touch and drag.
Touch + moving some pixels to the left = previous tab
Touch + moving some pixels to the right = next tab

That was the original behaviour of Google Chrome, but those lamers changed it.
Now it goes back to the previous page or next page...

Thanks for any help.
Guest2018

Re: Script which checks for 2 or 3 mouse cursors (Tablet)?

18 Jan 2018, 17:22

Hi,

I created two scripts which made a good impression on the first look, but neither works.
It always executes the operation for previous tab, no matter how I move the mouse.
(Even if I don't move it at all.)
Any idea?

Code: Select all

~lbutton::
while GetKeyState("lbutton", "P")
{
  MouseGetPos, x, y
  Sleep, 1
  timer++ 
}
if timer >= 20
{  
  Sleep, 200
  MouseGetPos, xx, yy
  if xx > x
  {
    MsgBox, next Tab
  }
  if xx < x
  {
    MsgBox, previous Tab
  }   
}
timer := 0
return

Code: Select all

~lbutton::
MouseGetPos, x, y
while GetKeyState("lbutton", "P")
{ 
  Sleep, 1
  timer++ 
  if timer >= 20
  {  
    Sleep, 200
    MouseGetPos, xx, yy
    if xx > x
    {
      MsgBox, next Tab
    }
    if xx < x
    {
      MsgBox, previous Tab
    }   
    if xx = x
    {
      return
    }
  }
}
timer := 0
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: inseption86, mikeyww and 438 guests