Blockinput proper usage Topic is solved

Ask gaming related questions
jlodvo
Posts: 24
Joined: 24 Sep 2023, 19:53

Blockinput proper usage

24 Dec 2023, 23:03

hello i wanted to ask how to properly use blockinput and maybe suspend in my script
i use 2 script right now and one is the F5:: that i hold to do my rotations and the Tab:: is to switch gears but having a little problem, it does not prevent or stops the rotation F5:: and do the Tab::
i can manually let go of the F5:: and press Tab:: and works but was thingking if thiers a way to automate it without letting go of the F5::

heres my script at the moment

Code: Select all

Tab::
{
Suspend true
BlockInput true
LB := GetKeyState("LButton" , "P")
RB := GetKeyState("RButton" , "P")
MouseGetPos &xpos, &ypos
SendInput "c"
SendInput "^{Click 3590 1850 Right}"
SendInput "^{Click 3700 1850 Right}"
SendInput "^{Click 3460 1850 Right}"
SendInput "c"
MouseMove xpos, ypos
If LB
    SendInput("{LButton down}")
If RB
    SendInput("{RButton down}")
BlockInput false
Suspend false
}


F5::
{
SendInput "{F3 down}{5 down}{Ctrl down}"
Sleep 10
MouseClick "left"
Sleep 10
SendInput "{Ctrl up}"
Sleep 10
SendInput "{5 up}{F3 up}"
Sleep 10
SendInput "{1}{2}{3}{4}"
}
User avatar
mikeyww
Posts: 28869
Joined: 09 Sep 2014, 18:38

Re: Blockinput proper usage  Topic is solved

26 Dec 2023, 19:05

A hotkey can interrupt another. To end the interrupted subroutine, the script can be reloaded, or a variable can be used to indicate what action is needed.

You might find that SendEvent makes your Send calls easier to manage.

Return to “Gaming Help (v2)”

Who is online

Users browsing this forum: No registered users and 18 guests