I made some useful macros for heists/general gameplay.

I wrote the script for autohotkey as I do not have built-in macro capability with my keyboard. It should work for anyone.

It features five fast acting and easily changeable hotkeys:

  1. Open snack menu - ","
  2. Automatically eat 2 snacks in second slot - "CapsLock"
  3. Equip super heavy armor - "F1"
  4. Toggle passive mode - "F4"
  5. Request personal vehicle - "F3"

Those are the default bindings. See below if you want to change them.

I played with the delay settings and the values I arrived at are very fast as well as stable on my computer. The macros work on foot or in a vehicle. The only issue I've found with it that after loading into a free-roam or heist mission the first macro occasionally seems to fail. You can prevent this error from occurring at a bad time by running a macro or just opening the interaction menu once, after which it runs perfectly. All of the macros require your interaction menu to be closed and your phone to be put away to work. They also won't work inside an apartment because of the extra menu option. They are setup for having your interaction menu bound to the "M" key. You won't get banned for using this. All it does is send keystrokes, no DLL injection or memory hacks.

I personally wouldn't mess with the delays because they work pretty well where I've set them.

If you want to change a hotkey, you can open the downloaded script with any text editor by right clicking it or by clicking on the "H" icon in your taskbar and selecting edit script. Then you change the value inside quotations as shown in the section below:

HealthKey := "Any Key Here" 		; Set keybinding for macro here. 

ArmorKey := "NumPad3"		; Set keybinding for macro here.

PassiveKey := "NumPad0"		; Set keybinding for macro here.

RetCarKey := "F3"		; Set keybinding for macro here.

Note: If your script was running while you edited it. You need to click on the taskbar icon and select reload script for changes to take effect

A list of keynames for the non single character keys is available here.


Installation and Usage Instructions:

  1. Install autohotkey. [Get AutoHotKey here] (http://www.autohotkey.com/).

  2. Download my updated script here.

  3. Click on the file you downloaded in step 2. You should see a green H in your task bar that indicates the script is running. You can launch this before or while playing GTA it makes no difference.

EDIT: Added new features:

  1. The hotkeys no longer trigger unless the GTAV window has focus. Thanks u/RealityExit

  2. Added an autosnack macro that eats 2 snacks from the second slot of the snack menu.

  3. Changed default hotkeys.

New Pastebin Link

Snack responsibly.

Posted May 4, 2015, 9:43 PM UTC · edited

6985
StarkUK---•

Could you PasteBin the script instead

6
twentyafterfourOPGTA:O twentyafterfour•

I edited it in below the other links. It's neat that pastebin can do syntax highlighting.

2
J0hn-Stuart-MillGTA:O Username•

Serious question; is there any chance of this getting you banned in GTA:Online ?

5
Clomez•

there should be NONE, since bans usualy come from touching the actual files, this just makes shortcuts to keyboard

3
J0hn-Stuart-MillGTA:O Username•

I only ask because nearly all first person shooters consider macros cheating. E.G. Recoil macros, quick weapon switch macros, etc.

2
StratikatStratikat•

Bans come from injecting DLLs into the game. In reply to OP, AHK does not inject DLLs nor modify game files.

2
Impul5GTA:O Username•

If you went and told someone in charge that you were using macro's, and they cared enough, then maybe. These, however, do nothing to modify the game code, and should simply look like you're hitting keys on your keyboard very quickly.

1
J0hn-Stuart-MillGTA:O Username•

Sure but loads of anti-cheat look for third party software in use while the game is active. Is auto-hotkey immune because it plenty of real world uses?

1
Khalku•

No, it's only sending keystrokes.

1
kittah•

They also won't work inside an apartment because of the extra menu option.

Lol I made the mistake of setting up my macros while in my apartment the first time and it took me an embarrassingly long time to debug why they weren't working in heists.

6
twentyafterfourOPGTA:O twentyafterfour•

I wrote down the commands outside so I didn't have this issue. But once when I was testing them inside it somehow selected kill yourself.

4
PuckStarGTA:O PuckStar32•

haha i had the same with my G15 macro lol!

2
Reggie_Fils-A-MechR* SC: Reggi_Fils-A-Mch•

When I press one of your buttons from the script it has like a 1 button delay. When I press F4 (Toggle Passive Mode) It will instead just change my walk style. Your first version when you released it worked fine. The new version is the only one with a problem.

1
twentyafterfourOPGTA:O twentyafterfour•

The version available now is the exact one that I use with no problems, though I never had problems with any of the versions I posted.

Just to confirm, you can't be in your apartment because that will add 1 extra option to your menu which screws up the macro. Also, I cleared out the keybinds in GTA itself on the keys I use the macro for(F1,F3,F4, etc.) I don't know if you did that but that might be a possible cause of issues.

1
Reggie_Fils-A-MechR* SC: Reggi_Fils-A-Mch•

I'm a fool...I literally downloaded/restarted your script 4 times in the apartment. I'm sorry for wasting your time. I should've read your post more.

2
RiftRacer•

Ahaha did the exact same thing, then decided to do them backwards, working from the bottom up instead of from the top down.

3
DmcHavoc•

If you have a razor mouse or keyboard, you can always make macros using Razer Synsape.

3
MegaPaulBlart•

I have created 3 makros with synapse for GTA V.

  • Select heavy armor (Online)

  • Eat one snack and leave the menu open to eat more (Online)

  • Sleep and fast forward time (Offline)

Makro, just import in Synapse

1
AleksThePotato•

Can you run me through adding these commands for my razer mouse?

1
DmcHavoc•

Sure no problem.

Go to this website http://www.razerzone.com/synapse/ if you think this is a virus, you can go to the official razer website and find the link.

Once you've finished downloading, sign up, launch etc, and then wait for your deviece to be synced. If it doesn't get synced then restart your computer.

Once thats done, click on your device at the bottom as it is here (mine isn't updated so it may look a little different):

http://puu.sh/hCFqd/a63dd04799.jpg

Go to the "macro" tab and press the + sign under "Macro" as seen here: http://puu.sh/hCFDL/194ed6926e.jpg

Now, where it says "Macro Name" obviously, right what you want to name this macro (i.e. eat snack). Afterwards, press record and the sequence needed for the command, enter it as you would normally.

So for eating the first snack in the "Snacks" tab in GTA 5, the key order/sequence is M Down Enter Down Down Down Down Down Enter and then press Enter as many times as the amount of snacks you want to eat. Once thats finished, press "Stop" and if you want a delay in the commands put it in the section, if you don't want a delay, press "No Delay". I recommend putting a delay so that rockstar doesn't flag you.

Once this is done go back to the first tab (keyboard/mouse) and press the key you want to assign that macro to. Lets say for the sake of explanation, the key is Q. You click on the Q key on the program, NOT your keyboard and in the "key assignment" hover through and look for Macro. A menu will pop out, under "Assign Macro", select the macro you want on the key. So if I wanted eat snack on Q, I would select the macro named "Eat Snack" (or whatever I named it). The playback option is your choice.

These keys you may use for other games and purposes so if you want to revert the macros, make a profile right here http://puu.sh/hCGom/bcbd2c2765.jpg to separate your game(s).

1
mr-dogshitmr.dogpoo•

Seems like it's overly complex.

This works fine for me: (numpad+ for 2 x 2nd snacks (ps & qs are 1st), numpad- for super heavy armour and numpad* for passive)

setkeydelay, 40, 40
NumpadAdd::
Send {m}{Down}{Return}{Up}{Return}{Down}{Return}{Return}{m}
return
NumpadSub::
Send {m}{Down}{Return}{Down}{Down}{Return}{Up}{Up}{Up}{Return}{m}
return
NumpadMult::
Send {m}{Down}{Down}{Down}{Down}{Down}{Down}{Down}{Return}{m}
return
2
twentyafterfourOPGTA:O twentyafterfour•

It only seems more complex because I added some code to make it so you could change all the keybindings and delays in one place at the beginning. I initially wrote it just like you did. I also had issues without the extra delay when opening the interaction menu.

5
mr-dogshitmr.dogpoo•

I had problems when the delay was set to 20, 20. Set it to 40's just to be on the safe side (couldn't be arsed to keep tweaking it).

Also, your armour part can be slightly more efficient... 3 x Up instead of 4 x Down.

1
mercurymonster•

I tried your script and its working Perfectly, minor glitches are there but still rocks.

2
Toad_RToad_R•

They literally worked for one session, and then never again, and I can't even point out why

2
NomadPixel•

Might be too obvious, but did you start autohotkey? Or did you pause it? Load the script?

5
Toad_RToad_R•

Yes, I restarted the game, the script and the computer, tried pausing and then unpausing the script, compiling and running as administrator, and also tried a 'shorter' code down on the same post
The macros even type 'mmm' on the chat box when I press any of the hotkeys, but they simply don't work ingame anymore

1
twentyafterfourOPGTA:O twentyafterfour•

They only work online and outside your safehouse , are you using them there?. You also need to have "M" bound to open your interaction menu in GTA.

I also updated the script, which has some new functionality.

1
PuckStarGTA:O PuckStar32•

Some games (like Battlefield using Punkbuster) won't let you play when you have autohotkey running.

But thanks for this. I might use it although I already have some macro's set on my G15 keyboard.

Edit: BTW my snack macro eats 5 snacks and closes the menu as well :)

1
Noah_Martz•

Really cool and useful

1
-eagle73Shmiqq of Red Eagles•

I always wondered, can these macros work while you use other keys e.g. WSAD or will those mess it up?

1
twentyafterfourOPGTA:O twentyafterfour•

It doesn't work while holding shift down. WASD don't do anything in the menu so it works with any of those keys. My experience was that it was pretty seamless with very little interference while playing.

2
ATCQ_•

How do I make this run for just GTA V? No experience with Autohotkey :(

1
twentyafterfourOPGTA:O twentyafterfour•

Just click the first link in the OP to download autohotkey. Then click the second to download the script. Once AHK is installed, you can just click on the script file you downloaded and thats all you need to do. If you want to change the macro keybinds. Just right click the script, select edit script, and the instructions are inside.

1
ATCQ_•

My bad, I know how to run the script and it works great :) I meant how do I stop it affecting my keys when I'm alt+tabbed out of AHK, I want it to only run got gta5.exe if possible!

1
RealityExit•
#IfWinActive ahk_class grcWindow

Add this near the top of the script, under the existing #NoEnv is a perfect place.

2
twentyafterfourOPGTA:O twentyafterfour•

This works exactly as described. That's why I'm glad I posted it here, because people who knew AHK would make it better for me.

1
twentyafterfourOPGTA:O twentyafterfour•

Sorry I misinterpreted your question. I believe the feature may exist to make it stop when the GTA window doesn't have focus but I only started using it yesterday so I'm not sure how to do it specifically. In the mean time you can just right click the H icon in the taskbar and suspend hotkeys to disable it when alt tabbed.

1
Reggie_Fils-A-MechR* SC: Reggi_Fils-A-Mch•

How would I go by uninstalling this? I forgot that its interfering with my keys as well as typing (Tried to use an apostrophe and it came out as "m m"

EDIT: Found out it opened in the bottom right corner with other task programs. Right click and there should be a suspend option. My 's are back!

1
twentyafterfourOPGTA:O twentyafterfour•

This fix shuts off the macros when GTA is closed or the window isn't focused.

1
fustercluck-•

it doesnt work for me somehow. is there a trick (like borderless windowed or something)? i can see it working in MS Word but not ingame :<

edit: i changed it to NumpadSub fyi. and the instructions in the script match my inventory

1
PhantomGamers•

This is pretty sweet, thanks. I wound up using u/mr-dogshit's simplified version instead but Thanks to both of you for posting this. BTW you can use: IfWinActive, Grand Theft Auto V { } On each hotkey line to make sure they aren't executed outside of the game.

EDIT: Seems like #IfWinActive Grand Theft Auto V works better, just put it in the front of each hotkey's actions. Oh and I wound up just using the script in the OP because I've been having issues with the other one not working so well while I'm driving, yours works perfectly though.

1
Kooldude93•

I tried doing this only on snack hotkey, but now none of the keys work.

Health: 				; Health Macro
		
#IfWinActive Grand Theft Auto V 
Send {m} 			; Opens Interaction Menu
sleep, IntMenuDelay		; Necessary delay to allow interaction menu to open properly while keeping keystroke >delay short.
; Try to keep this value + the keystroke delay at least 80 ms for proper function.
Send {Down}{Enter}{Up}{Enter}   ; Keystrokes to open snack menu

return				; Separates Hotkey Entries
1
twentyafterfourOPGTA:O twentyafterfour•

Remove the line you added. And follow the instructions here:

This fix shuts off the macros when GTA is closed or the window isn't focused.

1
PhantomGamers•

You can try what u/twentyafterfour said or you can also try making sure you have the latest version of autohotkey.

I'm not really experienced with AHK but the line I posted works for me.

1
twentyafterfourOPGTA:O twentyafterfour•

Yeah I found that adding the delay after opening the interaction menu basically eliminated any issues while allowing the rest of the delays to be much shorter.

1
MrPeligro•

interesint. I never knew much about macros to being with. I have a logitech g502. Is it possible I can do this with my mouse? I don't want to download a script and potentially get banned

1
twentyafterfourOPGTA:O twentyafterfour•

I have a g502 as well. I believe it can do macros but I use the buttons for other things so I wouldn't have a place to bind them to. Also this isn't the kind of script you're thinking of that people get banned for using. A macro on your mouse would look exactly the same to the game as what I wrote. They just send a series of keystrokes to the game just like your mouse or keyboard would, they don't alter or affect the game files or its memory in any way.

2
PhantomGamers•

Although they COULD either detect AHK running and ban for that (Punkbuster kicks for it but who knows what Rockstar might do), or ban based off of how fast you send keypresses (not sure if interaction menu stuff is sent to the server before you actually consume or switch something).

If they did the latter though the Logitech software would trigger it too, anyway I feel like both scenarios are highly improbable.

1
823659874•

What do you use the other buttons for? I usually have too many things I want to map but in gtav I can't think of any, maybe the weapon wheel

1
twentyafterfourOPGTA:O twentyafterfour•

I scope in by holding the middle thumb button. I use the back thumb button for selecting my assault rifle. I detonate explosives with mousewheel right. I use the index finger keys for sensitivity. The forward thumb key is too far forward for my bullshit hands to be convenient so I don't use it.

I also made it so the mouse wheel doesn't open the weapon wheel because if you accidentally use it to zoom on non sniper weapons before you aim it would bring up the wheel which blocks you from shooting and gets you killed. I just use numbers to equip weapons, where you can cycle through each weapon in a particular category by just hitting the same number again.

2
genghisknom...Khan•

People who know how to use AutoScript, is there any hope for getting this to work if I use the 0 on the numberpad as my bound key for interaction menu?

1
twentyafterfourOPGTA:O twentyafterfour•

I believe all you need to do is open the script and replace all instances of {m} with {Numpad0}. You can just use the find and replace feature of notepad to do it quickly and easily. To edit the script, right click the file itself or the icon in the taskbar and select the edit option. Once you're done editing close the editor window and save changes. If you had the script running you'll need to right click the taskbar icon again and select the reload option. After that all should be well.

1
genghisknom...Khan•

great, "Numpad0" is what I was looking for

Also, the solution posted above does not help for disabling the script while out of the GTAV window

I do not know how to turn it off

Pls halp

1
twentyafterfourOPGTA:O twentyafterfour•

Right click taskbar icon, either quit it or suspend hotkeys when not using GTA. Reopen or unsuspend when you want it back on. I changed my binds to F keys as well for easier access and less interference with typing. I originally put them there so I didn't have to rebind stuff in GTA.

1
twentyafterfourOPGTA:O twentyafterfour•

This fix shuts off the macros when GTA is closed or the window isn't focused.

You won't have to suspend it anymore with this.

1
genghisknom...Khan•

It will not work for me

Are you running windows 8?

what am I doing wrong?

pls halp

1
wildcatsnbacon•

what's the string for change out? i know you'd have to modify the outfit name but that would be sweet.

1
8coils•

thanks a lot !
btw, i tried to adapt this and add a macro to put money on the bank acount but i couldn't, keyboard arrows don't work on the phone browser :(
but it's working with the x360 controller, sadly I have no idea how to map those buttons into the script ...

1
CndConnection•

Wow this is great. Really need a macro key for putting masks on/off.

1
Jaguaari•

Will be pretty useful for sure, can this give a ban? And can i make those hotkeys for my numpad instead?

1
PuckStarGTA:O PuckStar32•

no ban. and yes numpad.

1
PhantomGamers•

You definitely COULD get banned from this. I disagree with the OP blatantly stating you can't.

Rockstar can ban you for running notepad if they wanted to, use everything at your own risk and understand that they might see functionality like this as malicious. Doesn't mean they will, but be aware of the possibility.

1
PuckStarGTA:O PuckStar32•

Banning based on having autohotkey running is very unlikely as it can be used for million other things as well.

If they would want to block it I'm sure they'll warn first.

Or how punkbuster/battlefield does it, you get kicked out of the game. But no perm ban for sure.

1
PhantomGamers•

It doesn't even seem like they have a system for simply kicking for stuff. So if they had any issue with it they'd probably flat out ban like they do for the FOV mod.

(Yes, I understand the FOV mod injects into the game and modifies the game memory and that this one doesn't touch the game at all, however we've seen information saying that Rockstar can differentiate when they ban for an FOV mod and when they ban for a trainer, so they just don't care.)

Which, isn't a permanent ban, just a 2 week ban. At least for the first offense. I just don't think people should be given a false sense of security while using stuff like this.

1
mercurymonster•

I have a logtech G105 Keyboard,

Can someone be kind enough direct me to how bind these shortcuts to the macro Gkeys? failed so many times trying.

1
PuckStarGTA:O PuckStar32•

To use that on the special keys of your keyboard I would just go into the keyboard software and assign F1 to one of those keys.

1
burgergod•

I followed all the steps but it won't work for me. The script is running but it doesn't do anything :C Is there any typical troubleshooting I can do?

1
twentyafterfourOPGTA:O twentyafterfour•

So just to confirm, it wont work unless you're online and outside your apt. It's set to work only if the GTAV window has focus, so it won't do anything outside the game. Are you seeing it do anything at all in game? maybe open a chat box to see if it types?

1
freedom•

Could you make one to call lester? I tried but it just freaks out
EDIT: and one for calling merrywether and pegasus
thanks!

; ----Lester---- ; Calls Lester

Lester: ; Calls Lester

Send {Up} ; Opens Interaction Menu

sleep, IntMenuDelay ; Necessary delay to allow interaction menu to open properly while keeping keystroke delay short.

			; Try to keep this value + the keystroke delay at least 80 ms for proper function.  

Send {Up}{Right}{Enter}{Up}{Up}{Up}{Up}{Up}{Up}{Up}{Up}{Enter} ; Calls Lester

return ; Separates Hotkey Entries

1