[GUIDE]Auto Hot Key Basic Tutorial
4 posters
Los Santos Real World Roleplay | SA-MP Roleplay Server :: Server Informantion! :: Server Information!
Page 1 of 1
[GUIDE]Auto Hot Key Basic Tutorial
What is AHK?
AHK or Auto Hot Key was a Program that to make a bind key. So it's some kind of macro that will type automatically when we press one of Hotkey that we use on that program. With this we can RPly easily without typing so much word and shorten the time when we use it on RP, I am using this when I am writing /me and /do command to reduce the time to typing.
Where can I Download it?
You can check on this page http://www.autohotkey.com/download/
Tutorial 1 : How to make an AHK script?
1. Open the AHK shortcut program
2. Take a look at bottom right corner and find AHK icon and right click on it and choose "Edit this Script"
Tutorial 2 : Making a simple command in AHK
Let me show you the code first and I'll explain every piece of that later
^g:: "It's command the script to run the script when we pressed Ctrl+G"
SendInput "It's command the script to Send Keystrokes Input"
t/me Takes out his .45 from his belt. " t To trigger the text input in SA-MP and the rest is The output when we pressed Ctrl+G"
{enter} "To end it with {enter} keystrokes and your /me will appear without needing to press the Enter anymore."
return "to end the command and not keep running when we start another command (This is have to be added every command)"
Tutorial 3 : Making Double line in one Command
It's same with Tutorial 2, the different things is, in this script with one hotkey (Ctrl+G) it will show 2 line of /me. InGame it will show like this
*Kazuya Nakata Takes out his .45 from his belt.
*Kazuya Nakata Aims the .45 at the suspect.
This things would be convenient for LSPD to force the suspect RP Fear
Tutorial 4 : Delaying between command
Hmm Self explanation I think
So in this tutorial I'll only explain the Sleep 3000 script
Sleep in AHK script function is to add delay time to the script, so I'll give it Sleep between those command to prevent automatic anti-spam.
because this script using [millisecond] variable so to add 3 seconds delay I wrote it 3000 (3000 ms = 3 seconds)
Tutorial 5 : Making a variable or string
It will show
*Kazuya Nakata and Carlos are The Best.
Tutorial 6 : Loops
It would show
* Kazuya Nakata start drinking the soda.
* 1/3 (( Kazuya Nakata ))
(( 1 Second Delay ))
* 2/3 (( Kazuya Nakata ))
(( 1 second delay ))
* 3/3 (( Kazuya Nakata ))
((1 second delay))
* Kazuya Nakata throws away the soda can.
Tutorial 7 : Random Command
It would show one of the command randomly
I am sorry if I have very bad grammar, and this tutorial is far from perfection, if you have something to ask to me about AHK Script don't hesitate to Reply this thread to ask me
Also if I had mistype or something wrong on these code, go on correct me
Thanks for sparing your time to read this simple tutorial. Happy RPing
AHK or Auto Hot Key was a Program that to make a bind key. So it's some kind of macro that will type automatically when we press one of Hotkey that we use on that program. With this we can RPly easily without typing so much word and shorten the time when we use it on RP, I am using this when I am writing /me and /do command to reduce the time to typing.
Where can I Download it?
You can check on this page http://www.autohotkey.com/download/
Tutorial 1 : How to make an AHK script?
1. Open the AHK shortcut program
2. Take a look at bottom right corner and find AHK icon and right click on it and choose "Edit this Script"
Tutorial 2 : Making a simple command in AHK
Let me show you the code first and I'll explain every piece of that later
- Code:
^g::
SendInput t/me Takes out his .45 from his belt.{enter}
return
^g:: "It's command the script to run the script when we pressed Ctrl+G"
SendInput "It's command the script to Send Keystrokes Input"
t/me Takes out his .45 from his belt. " t To trigger the text input in SA-MP and the rest is The output when we pressed Ctrl+G"
{enter} "To end it with {enter} keystrokes and your /me will appear without needing to press the Enter anymore."
return "to end the command and not keep running when we start another command (This is have to be added every command)"
Tutorial 3 : Making Double line in one Command
- Code:
^g::
SendInput t/me Takes out his .45 from his belt.{enter}
SendInput t/me Aims the .45 at the suspect.{enter}
return
It's same with Tutorial 2, the different things is, in this script with one hotkey (Ctrl+G) it will show 2 line of /me. InGame it will show like this
*Kazuya Nakata Takes out his .45 from his belt.
*Kazuya Nakata Aims the .45 at the suspect.
This things would be convenient for LSPD to force the suspect RP Fear
Tutorial 4 : Delaying between command
Hmm Self explanation I think
- Code:
^g::
SendInput t/me Takes out his .45 from his belt.{enter}
Sleep 3000
SendInput t/me Aims the .45 at the suspect.{enter}
return
So in this tutorial I'll only explain the Sleep 3000 script
Sleep in AHK script function is to add delay time to the script, so I'll give it Sleep between those command to prevent automatic anti-spam.
because this script using [millisecond] variable so to add 3 seconds delay I wrote it 3000 (3000 ms = 3 seconds)
Tutorial 5 : Making a variable or string
- Code:
^a::
MyString = The Best
SendInput t/me and Carlos are %MyString%.{enter}
return
It will show
*Kazuya Nakata and Carlos are The Best.
Tutorial 6 : Loops
- Code:
^a::
MyVar = 1
SendInput t/me start drinking the soda.{enter}
Loop 3
{
SendInput t/do %MyVar%/3{enter}
MyVar++
Sleep 1000
}
SendInput t/me throws away the soda can{enter}
return
It would show
* Kazuya Nakata start drinking the soda.
* 1/3 (( Kazuya Nakata ))
(( 1 Second Delay ))
* 2/3 (( Kazuya Nakata ))
(( 1 second delay ))
* 3/3 (( Kazuya Nakata ))
((1 second delay))
* Kazuya Nakata throws away the soda can.
Tutorial 7 : Random Command
- Code:
^g::
Rand = 0
Random, Rand, 1, 3
if(Rand == 1)
{
SendInput t/me Takes out his .45 from his belt.{enter}
}
else if(Rand == 2)
{
SendInput t/me Takes out his .45 from his coat.{enter}
}
else if(Rand == 3)
{
SendInput t/me Takes out his .45 from his bag.{enter}
}
return
It would show one of the command randomly
I am sorry if I have very bad grammar, and this tutorial is far from perfection, if you have something to ask to me about AHK Script don't hesitate to Reply this thread to ask me
Also if I had mistype or something wrong on these code, go on correct me
Thanks for sparing your time to read this simple tutorial. Happy RPing
Last edited by Daichi_Nakata on Sun Apr 17, 2011 6:44 am; edited 1 time in total
Re: [GUIDE]Auto Hot Key Basic Tutorial
Awesome, but i think SA:MP keybinder is same.
Hossien- Member
- Posts : 58
Reputation : 0
Join date : 2011-03-29
Age : 39
Location : 455
Re: [GUIDE]Auto Hot Key Basic Tutorial
Hossien wrote:Awesome, but i think SA:MP keybinder is same.
I never heard of that
Co-Owner- Member
- Posts : 30
Reputation : 2
Join date : 2011-04-09
Re: [GUIDE]Auto Hot Key Basic Tutorial
Alex_Josh wrote:Hossien wrote:Awesome, but i think SA:MP keybinder is same.
I never heard of that
SA:MP Keybinder let you fast-command, example: i pressed key E, it says 'Hossien Newman has opened a Cola'.
Hossien- Member
- Posts : 58
Reputation : 0
Join date : 2011-03-29
Age : 39
Location : 455
Re: [GUIDE]Auto Hot Key Basic Tutorial
Hossien wrote:Awesome, but i think SA:MP keybinder is same.
Well, it's just alternative from SA:MP keybinder
Re: [GUIDE]Auto Hot Key Basic Tutorial
LOL i never heard of it . How do i use it?
Co-Owner- Member
- Posts : 30
Reputation : 2
Join date : 2011-04-09
Re: [GUIDE]Auto Hot Key Basic Tutorial
Alex_Josh wrote:LOL i never heard of it . How do i use it?
So what program are you using Alex? is it AHK too like me?
Re: [GUIDE]Auto Hot Key Basic Tutorial
Daichi_Nakata wrote:Alex_Josh wrote:LOL i never heard of it . How do i use it?
So what program are you using Alex? is it AHK too like me?
No i aint using any program and i think i dont need it i can type good
Co-Owner- Member
- Posts : 30
Reputation : 2
Join date : 2011-04-09
Re: [GUIDE]Auto Hot Key Basic Tutorial
This works very very well to...
Bl4ckJack- Game Admin
- Posts : 188
Reputation : 5
Join date : 2011-04-06
Location : Europe
Re: [GUIDE]Auto Hot Key Basic Tutorial
Bl4ckJack wrote:
This works very very well to...
Damn that's the automatic one, mine seems lame I'll try thanks for share the video
Re: [GUIDE]Auto Hot Key Basic Tutorial
Damn that's the automatic one, mine seems lame I'll try thanks for share the video
To be honest i'm just very very lazy, you're amazing, big-ups to you
Bl4ckJack- Game Admin
- Posts : 188
Reputation : 5
Join date : 2011-04-06
Location : Europe
Re: [GUIDE]Auto Hot Key Basic Tutorial
Bl4ckJack wrote:Damn that's the automatic one, mine seems lame I'll try thanks for share the video
To be honest i'm just very very lazy, you're amazing, big-ups to you
Hhaha not really, i think i'll keep using AHK beside it had more feature than SAMP bind, like Auto Click, Random, unfortunately it's not automatic. And it's pretty easy though
Re: [GUIDE]Auto Hot Key Basic Tutorial
I use AHK for Auto Click and Auto Space for CS:S.Daichi_Nakata wrote:Hhaha not really, i think i'll keep using AHK beside it had more feature than SAMP bind, like Auto Click, Random, unfortunately it's not automatic. And it's pretty easy though
Shhhhhhhhhhhhhhhhhhhhhhh...
Bl4ckJack- Game Admin
- Posts : 188
Reputation : 5
Join date : 2011-04-06
Location : Europe
Re: [GUIDE]Auto Hot Key Basic Tutorial
Ahhh, I just read through the article again and wanted to know about the delay thing, I may make a hot key script for it now! Thanks
Bl4ckJack- Game Admin
- Posts : 188
Reputation : 5
Join date : 2011-04-06
Location : Europe
Re: [GUIDE]Auto Hot Key Basic Tutorial
Anytime you can ask me if you don't know about somethingBl4ckJack wrote:Ahhh, I just read through the article again and wanted to know about the delay thing, I may make a hot key script for it now! Thanks
Re: [GUIDE]Auto Hot Key Basic Tutorial
Daichi_Nakata wrote:
Anytime you can ask me if you don't know about something
Sad news...
I've become a cop. I have yet to put an IC message to you about James Connor.
:'(
I dun wanna leave u. D':
Bl4ckJack- Game Admin
- Posts : 188
Reputation : 5
Join date : 2011-04-06
Location : Europe
Re: [GUIDE]Auto Hot Key Basic Tutorial
Colonel Ronnie Clay of San Andreas State Police.Daichi_Nakata wrote:What is ur IG name ?
Bl4ckJack- Game Admin
- Posts : 188
Reputation : 5
Join date : 2011-04-06
Location : Europe
Similar topics
» [GUIDE] Learn more about RP and Roleplay basic Vocabulary
» [GUIDE] Proper /report and /n (HIGH RECOMMENDED GUIDE)
» Guide to Medium Roleplay
» [GUIDE] Dealing Drug and Weapon
» [GUIDE] Tips about correct time to pull out your 'little friends'
» [GUIDE] Proper /report and /n (HIGH RECOMMENDED GUIDE)
» Guide to Medium Roleplay
» [GUIDE] Dealing Drug and Weapon
» [GUIDE] Tips about correct time to pull out your 'little friends'
Los Santos Real World Roleplay | SA-MP Roleplay Server :: Server Informantion! :: Server Information!
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum