| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Tue Jun 19, 2007 12:05 am Post subject: How to I make one key type a sentence? |
|
|
In battlefield you push j to enable talking then you type your sentence... How would i bind it to a key
Im pretty sure you would start out like this:
numlock::suspend
$NumPad5::
{
then im lost here thx for any help... |
|
| Back to top |
|
 |
Travley
Joined: 13 May 2007 Posts: 47
|
Posted: Tue Jun 19, 2007 12:18 am Post subject: |
|
|
| Code: | Numpad5:: ; the $ is only used when you are going to be calling that key within the script, so it does not conflict
{
Send, J
Pause, 200 ; for buffer (1000 = 1second)
Send, The Message You Wish to Display
Send, {Enter}
Return
} |
Cheers. |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Jun 19, 2007 12:36 am Post subject: |
|
|
| thank you tons!!! |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Jun 19, 2007 12:40 am Post subject: |
|
|
Its giving me an error
004: Pause, 200 |
|
| Back to top |
|
 |
Travley
Joined: 13 May 2007 Posts: 47
|
Posted: Tue Jun 19, 2007 12:46 am Post subject: |
|
|
Errr replace Pause with Sleep
Sorry about that, brain fizzle. |
|
| Back to top |
|
 |
Superfraggle
Joined: 02 Nov 2004 Posts: 1019 Location: London, UK
|
|
| Back to top |
|
 |
Guest
|
Posted: Tue Jun 19, 2007 12:49 am Post subject: |
|
|
Numpad5::
{
Send, J
sleep, 200
Send, Hello
Send, {Enter}
Return
}
tried that but nothing still, did i have to do the bf2142.exe thing where it only opens during that game? |
|
| Back to top |
|
 |
Travley
Joined: 13 May 2007 Posts: 47
|
Posted: Tue Jun 19, 2007 1:52 am Post subject: |
|
|
Yes you should look in to making sure that BF is both running and active.
IfWinActive
IfWinExist
Also try SendInput if regular Send doesn't work, and also lookup AhkClasses as well as WinTitles (run any ahk script > right click its taskbar icon, use windows spy)
Cheers. |
|
| Back to top |
|
 |
|