Cain said:
Looks great!
Is it possible to set the shortcut to open your Autohotkey bind along with the SAMP?
Absolutely. I made
this guide covering that exact subject two years ago, although I can't really recommend it since my writing was awful.
Anyways, you can do this using a batch file. Write in a new empty text document:
Code:
@echo off
cd *GTA SA main directory e.g C:\Program Files (x86)\Rockstar Games\GTA San Andreas\*
start samp.exe 188.165.139.152:7777
cd *Script directory e.g. C:\Users\*My name*\Documents\GTA San Andreas User Files\*
start *Full script filename e.g. RedCountyRoleplay.ahk*
Change the stuff in asterisks (**) to fit you. Now save the file as a batch, click "Save As" and make sure the file name ends with ".bat". This works if you've compiled your script too, just change .ahk to .exe in the batch file.
You can also automate the closing of the script when you quit the game. Add this near the top of your
AutoHotkey script:
Code:
loop {
sleep 6000
IfWinNotExist, ahk_class Grand theft auto San Andreas
{
ExitApp
}
}
See if it works for you, otherwise just leave a reply and I'll write/do something more thoroughly.