Choice of values

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
marcosvpl
Posts: 3
Joined: 09 May 2017, 12:18

Choice of values

16 Sep 2017, 10:31

Hi everyone, I'm having a problem in making a macro, and would like a help, I wanted to program the macro to tighten F2 to a value F3 to another value F4 to suspend and F5 to close, however I am having difficulty with the choice of values .(and only one active value at a time)

Value-1

Code: Select all

_auto := true

~LButton::autofire()
Numlock::_auto := ! _auto
~F5::ExitApp
~F3::Suspend
autofire()
{
global _auto
if _auto
{
Loop
{
if GetKeyState("LButton", "P")
{
SendInput {LButton DownTemp}
Sleep 30
mouseXY(0,12)
SendInput {LButton Up}
Sleep 30
}
else
break
} ;; loop
} ;; if
} ;; autofire()

mouseXY(x,y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}
Value-2

Code: Select all

_auto := true

~LButton::autofire()
Numlock::_auto := ! _auto
~F5::ExitApp
~F3::Suspend
autofire()
{
global _auto
if _auto
{
Loop
{
if GetKeyState("LButton", "P")
{
SendInput {LButton DownTemp}
Sleep 30
mouseXY(0,15)
SendInput {LButton Up}
Sleep 250
}
else
break
} ;; loop
} ;; if
} ;; autofire()

mouseXY(x,y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}
if anyone can help I will be grateful.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Holarctic, mikeyww, robnicholson, Rohwedder, Swiftly9767 and 353 guests