get key state and wildcard Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
lkearney999
Posts: 4
Joined: 03 Jun 2016, 02:35

get key state and wildcard  Topic is solved

02 Feb 2018, 00:16

I'm trying to have a loop running while f is pressed but whenever I hold shift the hotkey stops working.
I am 100% its a syntax error :| but I couldn't find a similar example in documentation or research

Code: Select all

f10::
Suspend
return

$f::
  While GetKeyState("f","P")
  {
    send, {3}   
    click
    Sleep, 450
    send, {2}
    click
    Sleep, 450
  }
Return

I then tried to add a wildcard which made both cease to work:

Code: Select all

f10::
Suspend
return

$f::
  While GetKeyState("*f","P")
  {
    send, {3}   
    click
    Sleep, 450
    send, {2}
    click
    Sleep, 450
  }
Return

Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: get key state and wildcard

02 Feb 2018, 00:31

Try putting the wildcard in the hotkey label, instead, like so:

Code: Select all

f10::
Suspend
return

*f::
  While GetKeyState("f","P")
  {
    send, {3}   
    click
    Sleep, 450
    send, {2}
    click
    Sleep, 450
  }
Return
lkearney999
Posts: 4
Joined: 03 Jun 2016, 02:35

Re: get key state and wildcard

02 Feb 2018, 00:37

Thanks, I tried the on the hotkey label and the key state but not by itself.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: RandomBoy and 254 guests