AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to I make one key type a sentence?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Tue Jun 19, 2007 12:05 am    Post subject: How to I make one key type a sentence? Reply with quote

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 Smile thx for any help...
Back to top
Travley



Joined: 13 May 2007
Posts: 47

PostPosted: Tue Jun 19, 2007 12:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Guest






PostPosted: Tue Jun 19, 2007 12:36 am    Post subject: Reply with quote

thank you tons!!!
Back to top
Guest






PostPosted: Tue Jun 19, 2007 12:40 am    Post subject: Reply with quote

Its giving me an error

004: Pause, 200
Back to top
Travley



Joined: 13 May 2007
Posts: 47

PostPosted: Tue Jun 19, 2007 12:46 am    Post subject: Reply with quote

Errr replace Pause with Sleep

Sorry about that, brain fizzle.
Back to top
View user's profile Send private message
Superfraggle



Joined: 02 Nov 2004
Posts: 1019
Location: London, UK

PostPosted: Tue Jun 19, 2007 12:47 am    Post subject: Reply with quote

It should be

Code:
Sleep, 200

_________________
Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle
Back to top
View user's profile Send private message MSN Messenger
Guest






PostPosted: Tue Jun 19, 2007 12:49 am    Post subject: Reply with quote

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

PostPosted: Tue Jun 19, 2007 1:52 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group