What's new

AutoHotKey bug - urgent HELP!

Status
Not open for further replies.

BGPilot

Bronze Member
Joined
Oct 15, 2013
Messages
153
Location
Bulgaria
Hello!
Two days ago I edited my AHK script and when I logged in game and pressed ALT + 1 for megaphone it seemed to work great! But when I accidently pressed only "1" (without ALT) the megaphone message appeared on the screen again. I pressed Esc and it automatically minimized my game. I tried to click on My Computer and it opened the properties screen instead of the normal one. Of course, the bug stops when I close the script but I can not find a solution.. I re-installed AHK three times in total. The script works on other computers which mean the problem is not into the script. I am unable to play without AHK, so I will be happy if you could help me.
 

jcsef

Silver Member
Joined
Sep 13, 2014
Messages
957
Use numpad

Numpad1::
{ SendInput t/m SASP{!} PULL OVER AND SHIT{!}{enter}
} return

As long as it looks something like that it should be fine.
 

BGPilot

Bronze Member
Joined
Oct 15, 2013
Messages
153
Location
Bulgaria
I don't have NUM buttons on my keyboard.. my script is that

Code:
!q::Sendinput t/elm {enter}t/siren {enter}

!e::Sendinput t/m ** You hear sirens along with red and blue flashing lights in your mirrors.** {enter}t/m This is San Andreas State Police. Please pull your vehicle over to the side of the road. All occupants remain seated. {enter}

!1::Sendinput t/m **[AIRHORN] You can see flashing emergency lights, indicating you to pull over.** {enter}t/m This is San Andreas State Police. Please move aside of the road and let us pass. {enter}

End & 1::Sendinput t/ame rapidly stretches out his forearm towards the duty-belt, enfolding the handle of his 45 Beretta Caliber Pistol, unclipping it, switching the safety to off position. {enter}

End & 2::Sendinput t/ame downlifts his palm whilst dragging his 45 Beretta Caliber Pistol down to his belt, clipping it back whilst moving the safety to ON. {enter}

End & 3::Sendinput t/ame rapidly stretches out his forearm towards the duty-belt, enfolding the handle of his Remington 870, unclipping it, switching the safety to off position. {enter}

End & 4::Sendinput t/ame downlifts his palm whilst dragging his Remington 870 down to his belt, clipping it back whilst moving the safety to ON. {enter}

End & 5::Sendinput t/ame rapidly unholsters his Tazer X26 from his duty-belt, upholding it forwards. {enter}

End & 6::Sendinput t/ame downlifts his palm whilst dragging his Tazer X26 to his belt, clipping it back whilst moving the safety to ON. {enter}


End & 9::Sendinput t/me downlifts his dominant wrist, withdrawing a pair of metal handcuffs from his belt, hoisting them towards the suspect, allocating them onto the wrists, locking them in position. {enter}


End & 7::Sendinput t/stinger {enter}

End & 8::Sendinput t/rstinger {enter}

!9::Sendinput t/carmusic http://slusham.com/radio/city.m3u {enter}

!0::Sendinput t/carmusic stop {enter}

It worked great till I decided to add the binder for cuffing someone. I didn't do anything else.
 

Beth

Donator
Joined
Aug 17, 2014
Messages
11,697
Location
Carlisle, England
BGPilot said:
I don't have NUM buttons on my keyboard.. my script is that

Code:
!q::Sendinput t/elm {enter}t/siren {enter}

!e::Sendinput t/m ** You hear sirens along with red and blue flashing lights in your mirrors.** {enter}t/m This is San Andreas State Police. Please pull your vehicle over to the side of the road. All occupants remain seated. {enter}

!1::Sendinput t/m **[AIRHORN] You can see flashing emergency lights, indicating you to pull over.** {enter}t/m This is San Andreas State Police. Please move aside of the road and let us pass. {enter}

End & 1::Sendinput t/ame rapidly stretches out his forearm towards the duty-belt, enfolding the handle of his 45 Beretta Caliber Pistol, unclipping it, switching the safety to off position. {enter}

End & 2::Sendinput t/ame downlifts his palm whilst dragging his 45 Beretta Caliber Pistol down to his belt, clipping it back whilst moving the safety to ON. {enter}

End & 3::Sendinput t/ame rapidly stretches out his forearm towards the duty-belt, enfolding the handle of his Remington 870, unclipping it, switching the safety to off position. {enter}

End & 4::Sendinput t/ame downlifts his palm whilst dragging his Remington 870 down to his belt, clipping it back whilst moving the safety to ON. {enter}

End & 5::Sendinput t/ame rapidly unholsters his Tazer X26 from his duty-belt, upholding it forwards. {enter}

End & 6::Sendinput t/ame downlifts his palm whilst dragging his Tazer X26 to his belt, clipping it back whilst moving the safety to ON. {enter}


End & 9::Sendinput t/me downlifts his dominant wrist, withdrawing a pair of metal handcuffs from his belt, hoisting them towards the suspect, allocating them onto the wrists, locking them in position. {enter}


End & 7::Sendinput t/stinger {enter}

End & 8::Sendinput t/rstinger {enter}

!9::Sendinput t/carmusic http://slusham.com/radio/city.m3u {enter}

!0::Sendinput t/carmusic stop {enter}

It worked great till I decided to add the binder for cuffing someone. I didn't do anything else.
I'd remove the bind for cuffing someone anyway, as far as I know it isn't allowed? Sure I read a topic on the SP board saying it wasn't, might be wrong.

Try re-doing them all? Maybe you're just doing something generally wrong. Here's my old binds that worked perfectly if you want to use them for reference.
Code:
#IfWinActive GTA:SA:MP

Numpad1:: SendInput t/siren{enter}t/elm{enter}
return
;
 
 
Numpad2::
{
   SendInput t/m **You hear the wail of sirens and see red and blue flashing lights, indicating you to let the Emergency vehicle pass.**{enter}
}
return
;
 
Numpad3::
SendInput t/m **You would see the flashing of blue and red lights in your mirror and wail of a siren** {ENTER}
Sleep 1000
SendInput t/m San Andreas State Police - Pull the vehicle over and turn the engine off! {ENTER}
return
;

Numpad4::
   {
   SendInput t/ame **Reaches down, pulling her Beretta 92FS from under her shirt, flicking the safety OFF.**{enter}
 
   }
   return
;

Numpad5::
   {
   SendInput t/ame **Flicks the safety of her Beretta 92FS ON, reaches down, placing it back under her shirt.**{enter}
   }
   return
;

Numpad6::
   {
SendInput t You have the right to remain silent, Anything you say can and will be used against you in a court of law.{enter}
Sleep 4000
SendInput t You have the right to an attorney, if you cannot afford an attorney, one will be appointed for you.{enter}
Sleep 4000
SendInput t Do you understand these rights? {enter}
   }
   return
;

Numpad7::
   {
   SendInput t/carmusic http://peach.ovh:8000/listen.pls{enter}
 
   }
   return
;

Numpad8::
   {
   SendInput t/carmusic http://icy-e-02.sharp-stream.com/kiss100.mp3{enter}
 
   }
   return
;


Numpad9::
  {
  SendInput t/ame inserts a key into the back of the trunk, twisting it clockwise as she presses a button, opening it.{enter}
Sleep 500
  SendInput t/trunk lock{enter}
Sleep 500
  SendInput t/trunk open{enter}
Sleep 500
  SendInput t/trunk viewguns{enter}  
}
  return
;

Numpad0::
   {
SendInput t/ame presses a small button on her radio, speaking into it.{enter}
   }
   return
;

Edit: didn't read the bit about it works on other computers, eh idk
Just try the #IfWinActive GTA:SA:MP bit at the top?
 

BGPilot

Bronze Member
Joined
Oct 15, 2013
Messages
153
Location
Bulgaria
I will appreciate it if we can do this in teamviewer because I also have another script which works perfectly but on others' PCs, so I want to show you what actually happens.
 

Beth

Donator
Joined
Aug 17, 2014
Messages
11,697
Location
Carlisle, England
BGPilot said:
I will appreciate it if we can do this in teamviewer because I also have another script which works perfectly but on others' PCs, so I want to show you what actually happens.
Eek I'm not that good
Try the IfWinActive part, if not I literally have no clue
 

Earl

Head of Maps
Mapper
Joined
Jan 31, 2011
Messages
10,691
Code:
!q::
Sendinput t/elm {enter}
Sendinput t/siren {enter}
return

!e::
Sendinput t/m ** You hear sirens along with red and blue flashing lights in your mirrors.** {enter}
Sendinput t/m This is San Andreas State Police. Please pull your vehicle over to the side of the road. All occupants remain seated. {enter}
return

!1::
Sendinput t/m **[AIRHORN] You can see flashing emergency lights, indicating you to pull over.** {enter}
Sendinput t/m This is San Andreas State Police. Please move aside of the road and let us pass. {enter}
return

End & 1::
Sendinput t/ame rapidly stretches out his forearm towards the duty-belt, enfolding the handle of his 45 Beretta Caliber Pistol, unclipping it, switching the safety to off position. {enter}
return

End & 2::
Sendinput t/ame downlifts his palm whilst dragging his 45 Beretta Caliber Pistol down to his belt, clipping it back whilst moving the safety to ON. {enter}
return

End & 3::
Sendinput t/ame rapidly stretches out his forearm towards the duty-belt, enfolding the handle of his Remington 870, unclipping it, switching the safety to off position. {enter}
return

End & 4::
Sendinput t/ame downlifts his palm whilst dragging his Remington 870 down to his belt, clipping it back whilst moving the safety to ON. {enter}
return

End & 5::
Sendinput t/ame rapidly unholsters his Tazer X26 from his duty-belt, upholding it forwards. {enter}
return

End & 6::
Sendinput t/ame downlifts his palm whilst dragging his Tazer X26 to his belt, clipping it back whilst moving the safety to ON. {enter}
return

End & 9::
Sendinput t/me downlifts his dominant wrist, withdrawing a pair of metal handcuffs from his belt, hoisting them towards the suspect, allocating them onto the wrists, locking them in position. {enter}
return

End & 7::
Sendinput t/stinger {enter}
return

End & 8::
Sendinput t/rstinger {enter}
return

!9::
Sendinput t/carmusic http://slusham.com/radio/city.m3u {enter}
return

!0::
Sendinput t/carmusic stop {enter}
return

This should fix the issue. Try it and check if it works. ;)
 

BGPilot

Bronze Member
Joined
Oct 15, 2013
Messages
153
Location
Bulgaria
It still bugs.. I do not think the problem is AHK.. it might me something in my keyboard ?
 

jcsef

Silver Member
Joined
Sep 13, 2014
Messages
957
For all of them, do it like this with the curly bracket

!0::
{
Sendinput t/carmusic stop {enter}
} return

Other than that idk but I know without the curly brackets it's not marking the close properly so it kinds reads all binds when you press one if you get me. Try the curly brackets at the end.
 

Witting

Donator
Joined
Aug 12, 2014
Messages
2,723
It could be that the keys you're using are assigned to certain actions on your PC (for example when I use F2 it crashes my screen because its binded to a secondary overlay which I don't use). Try having a rummage through your settings in the control panel to see, if not, I'd reccomend snooping for some youtube tutorials or finding a different software if issues persist!
 
Status
Not open for further replies.
Top