AutoHotkey - Easy Bind Tutorial

Find all sorts of guides created by our community here. Includes guides such as drug use, roleplaying different types of characters, weapons etc.

Moderators: Game Admins, LS-RP Testers, Player Support Mods, Lead Admins

Forum rules
The guides you see here have been unofficially created by the players, for the players. LSRP cannot be held responsible for the accuracy of any of the content you see here.
Post Reply
User avatar
Kendrick_Underwood
Wannabe Don
Wannabe Don
Posts: 4943
Joined: Wed Mar 19, 2014 5:13 pm
Location: England, United Kingdom
Contact:

AutoHotkey - Easy Bind Tutorial

Post by Kendrick_Underwood » Wed Jul 02, 2014 9:17 pm

AutoHotkey - Instant Typing Binds

This guide will cover how to create keyboard and mouse binds. This will allow you to make pressing a key type for you. Simple as that.

Download AutoHotkey:
http://www.autohotkey.com/

Sample Script:

Code: Select all

SetKeyDelay, 0

NumpadHome::
Send t/enter{enter}
return

NumpadUp::
Send t/exit{enter}
return

NumpadPgUp::
Send t/lock{enter}
return

NumpadLeft::
Send t/engine{enter}
return

NumpadClear::
Send t/ame appears to be blah blah.{enter}
return

NumpadSub::
Send t/do Bob Marley speaks with an Indian accent.{enter}
return

NumpadRight::
Send t/stats{enter}
Send t/servertime{enter}
Sleep, 500
Send {f8}
return

NumpadEnd::
Send t/mask{enter}
return

NumpadDown::
Send t/do Freeway: Ferrari Enzo.{enter}
return

NumpadPgDn::
Send t/ame farts.{enter}
return

NumpadIns::
Send t/check{enter}
return

NumpadDel::
Send t/stopanim{enter}
return

NumpadEnter::
Send t/walk{enter}
return

NumpadAdd::
Send t/opentoll{enter}
return

NumpadMult::
Send t/do Feltzer: Harley Davidson Hover-Bike.{enter}
return

NumpadDiv::
Send t/ph{enter}
return
This sample script in one in which I use, it makes my whole numpad type different commands. For this to work, have numlock off.

How To Run:
Simply copy my sample script, paste it into a text editor like Notepad. Save it as Whatever.ahk, and then double click the script.

Explanation:
SetKeyDelay, 0 (Makes it so between each key press, there's a 0 millisecond delay)
Send (Anything after this will be sent as a key press)
Return (This will return back to the start of the script, allowing for the next bind to be used)
Sleep (This basically means wait X amount of milliseconds before executing the next line)
Key:: (This is the key in which is pressed to execute the code below it)

Key Codes:
http://www.autohotkey.com/docs/KeyList.htm

Q&A:
Q: Can I make my extra buttons on my mouse do things?
A: Certainly! If you look at the 'Key Codes' you'll see the mouse key codes mentioned. For example 'MButton' is the mouse scroll wheel when clicked down. This could be very useful for a bind you need to be able to access quickly, for example the tazer.

If you have any questions, or need help simply post here and I'll get back to you.
Last edited by Kendrick_Underwood on Fri Oct 10, 2014 3:47 pm, edited 1 time in total.

User avatar
T-DOGG
Wannabe Mafia
Wannabe Mafia
Posts: 269
Joined: Sat Jun 07, 2014 12:26 am
Location: shock_the_ripper

Re: AutoHotkey - Easy Bind Tutorial

Post by T-DOGG » Thu Jul 03, 2014 8:43 am

Thank you, Dan. Gonna be easy now.
Image

User avatar
Kendrick_Underwood
Wannabe Don
Wannabe Don
Posts: 4943
Joined: Wed Mar 19, 2014 5:13 pm
Location: England, United Kingdom
Contact:

Re: AutoHotkey - Easy Bind Tutorial

Post by Kendrick_Underwood » Thu Jul 03, 2014 4:58 pm

T-DOGG wrote:Thank you, Dan. Gonna be easy now.

No problem, if have have any issues just post them Jere and I'll respond asap.

User avatar
Disney
- Silver Member -
- Silver Member -
Posts: 1309
Joined: Thu Jun 24, 2010 6:16 am
Ingame name: Walt Disney
Location: disneyworld.disney.go.com

Re: AutoHotkey - Easy Bind Tutorial

Post by Disney » Sat Jul 05, 2014 8:09 am

As I said in another thread moments ago, it is against the rules to use binds that are commands only and do not enhance roleplay, such as /enter and /exit.
 
[redcoat slayer]

User avatar
Kendrick_Underwood
Wannabe Don
Wannabe Don
Posts: 4943
Joined: Wed Mar 19, 2014 5:13 pm
Location: England, United Kingdom
Contact:

Re: AutoHotkey - Easy Bind Tutorial

Post by Kendrick_Underwood » Sat Jul 05, 2014 12:31 pm

Disney wrote:As I said in another thread moments ago, it is against the rules to use binds that are commands only and do not enhance roleplay, such as /enter and /exit.

I don't think that's what the rule implies. The rule states the binds should not take over the typing of commands. The script I posted is an example, change it how you wish.

User avatar
Kendrick_Underwood
Wannabe Don
Wannabe Don
Posts: 4943
Joined: Wed Mar 19, 2014 5:13 pm
Location: England, United Kingdom
Contact:

Re: AutoHotkey - Easy Bind Tutorial

Post by Kendrick_Underwood » Fri Oct 10, 2014 3:48 pm

Updated and bumped, because of a lot of people asking me what I use for my binds.

User avatar
Feenix
Wannabe Don
Wannabe Don
Posts: 1692
Joined: Fri Apr 19, 2013 6:39 pm
Ingame name: Adrian_Donnelly

Re: AutoHotkey - Easy Bind Tutorial

Post by Feenix » Fri Oct 10, 2014 3:52 pm

Thanks.

User avatar
Bidzasheni
Mafia
Mafia
Posts: 577
Joined: Thu Sep 11, 2014 2:50 pm

Re: AutoHotkey - Easy Bind Tutorial

Post by Bidzasheni » Mon Nov 03, 2014 6:12 pm

Useful, great job pal.

User avatar
Kendrick_Underwood
Wannabe Don
Wannabe Don
Posts: 4943
Joined: Wed Mar 19, 2014 5:13 pm
Location: England, United Kingdom
Contact:

Re: AutoHotkey - Easy Bind Tutorial

Post by Kendrick_Underwood » Mon Nov 03, 2014 9:18 pm

Thanks for the positive feedback.

User avatar
FatHof
Mafia
Mafia
Posts: 638
Joined: Thu Jun 19, 2014 12:52 pm
Location: Shout-outs to my nutty nut nuts!

Re: AutoHotkey - Easy Bind Tutorial

Post by FatHof » Thu Jun 18, 2015 8:28 am

all I got to do is save it to the desktop as long as it's named .ahk?
Free my boy Ant

User avatar
yung october
Mafia
Mafia
Posts: 344
Joined: Wed Sep 16, 2015 7:17 pm
Ingame name: Will
Location: ROT IN HELL

Re: AutoHotkey - Easy Bind Tutorial

Post by yung october » Sat Sep 26, 2015 12:44 pm

Great tutorial.

Also, if you have an AHK script with SA:MP binds only you can add this line to the beginning, so it'll only work when you're IG.

Code: Select all

#IfWinActive ahk_exe gta_sa.exe
one man army

User avatar
Kendrick_Underwood
Wannabe Don
Wannabe Don
Posts: 4943
Joined: Wed Mar 19, 2014 5:13 pm
Location: England, United Kingdom
Contact:

Re: AutoHotkey - Easy Bind Tutorial

Post by Kendrick_Underwood » Sat Sep 26, 2015 3:38 pm

yung october wrote:Great tutorial.

Also, if you have an AHK script with SA:MP binds only you can add this line to the beginning, so it'll only work when you're IG.

Code: Select all

#IfWinActive ahk_exe gta_sa.exe

Nice addition, thanks.

User avatar
McQueen
Mafia
Mafia
Posts: 423
Joined: Wed Jun 22, 2016 11:36 pm

Re: AutoHotkey - Easy Bind Tutorial

Post by McQueen » Fri Dec 22, 2017 3:34 pm

is that allowed?

User avatar
Bok
Civilian
Civilian
Posts: 22
Joined: Wed Oct 18, 2017 9:14 am
Ingame name: Joshua Notti
Location: Philippines
Contact:

Re: AutoHotkey - Easy Bind Tutorial

Post by Bok » Sat Dec 23, 2017 7:42 am

Now this is good, thank you.

User avatar
Kendrick_Underwood
Wannabe Don
Wannabe Don
Posts: 4943
Joined: Wed Mar 19, 2014 5:13 pm
Location: England, United Kingdom
Contact:

Re: AutoHotkey - Easy Bind Tutorial

Post by Kendrick_Underwood » Tue Dec 26, 2017 12:41 am

McQueen wrote:
Fri Dec 22, 2017 3:34 pm
is that allowed?
Yes.

Post Reply

Return to “Player-Created Guides”

Who is online

Users browsing this forum: No registered users and 3 guests