How to suspend a script and make it work again?

Get help with using AutoHotkey and its commands and hotkeys
atrohs
Posts: 4
Joined: 07 May 2016, 16:36

How to suspend a script and make it work again?

18 Feb 2018, 20:03

Hi fellows!

I'm modifying a script that I own that serves to assist in the sights of FPS games.

The script works something like this ... When I choose a weapon I must press the corresponding key to control the recoil (example f1).

I would like when I press the following keys the script should be suspended.

key_RCoff: = "capslock"
key_RCoff2: = "tab"
key_RCoff3: = "2"
key_RCoff4: = "3"
key_RCoff5: = "4"
key_RCoff6: = "5"

but when I press the `1` key the script re-runs on the previously selected weapon.

example = select the command of one of the weapons (f3 for example), after some time I pressed tab (which should suspend the recoil), and when I press `1` (pick the gun again) the script should work again as if I had pressed f3 (or another weapon selected).


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



Sorry my bad english. Thank you for any help!!

Mod edit: Fixed code tags.
Rohwedder
Posts: 1011
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: How to suspend a script and make it work again?

19 Feb 2018, 04:01

Hallo,
add "Pause, On" to all "off" Keys eg key_RCoff6
and at the end of your script the Hotkey "~1::Pause, Off"

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

By the way, what do you have against Hotkeys?
atrohs
Posts: 4
Joined: 07 May 2016, 16:36

Re: How to suspend a script and make it work again?

22 Feb 2018, 20:01

It work very well mate! Thank your very much.

By the way, what do you have against Hotkeys?


have not against, just dont know how to use xDD

Return to “Ask For Help”

Who is online

Users browsing this forum: DyaTactic, Google [Bot], Monoxide3009, MrNerd, tm6464 and 25 guests