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 

bind 2 keys into 1

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





PostPosted: Mon Jun 01, 2009 11:41 pm    Post subject: bind 2 keys into 1 Reply with quote

hi all
i spent last few hours trying to bind 2 kyes in to 1

to be specific im trying to bind 2+Rbutton so i can play Sacred 2 (game) a bit easyer.

so this is what i tryed

2::
send, {2}
send, {Rbutton}

it works fine when i test it in notepad. but in game when i press 2 only right click happens.
so i tough maybe i need a bit delay, so i tryed

2::
send, {2}
sleep 100
send, {Rbutton}

alsou 2 wont be pressed in game Sad

then i tough why not try
z::2
x::
send, {z}
sleep 100
send, {Rbutton}

so ingame when i press X it shoud execute z(2) and Rbutton
but again only Rbutton works Sad

if i try just this
z::2

and when i press Z ingame 2 works..

i cant think of anything else so if anyone can help me i would realy appriciate it.

[Title edited. Please write descriptive titles for your topics. ~jaco0646]
Back to top
Guest






PostPosted: Mon Jun 01, 2009 11:45 pm    Post subject: Reply with quote

Code:
2::
{
send, 2
sleep 100
send, {RButton}
}
return


x::
{
send, z
sleep 100
send, {RButton}
}
return


RTFM Very Happy
Back to top
kolinaaa
Guest





PostPosted: Mon Jun 01, 2009 11:58 pm    Post subject: Reply with quote

thanks
but it didnt work

2 is not responding again..
Back to top
kolinaaa
Guest





PostPosted: Tue Jun 02, 2009 12:01 am    Post subject: Reply with quote

oh and in your code it shoud be
Z::
{
send, 2
?

anyways still not working Sad
Back to top
Frankie



Joined: 02 Nov 2008
Posts: 2850

PostPosted: Tue Jun 02, 2009 12:17 am    Post subject: Reply with quote

Hotkeys don't usualy work in full screen mode of video games. Is it full screen?
_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run
Back to top
View user's profile Send private message
tidbit



Joined: 09 Mar 2008
Posts: 1807
Location: Minnesota, USA

PostPosted: Tue Jun 02, 2009 12:50 am    Post subject: Reply with quote

also, to send a key that is the same as the hotkey, you need to add a $.

Code:
$2::
    send, 2
    sleep, 100
    send, {rbutton}
return

like so.
_________________
rawr. be very afraid
*poke*
Note: My name is all lowercase for a reason.
Even monkeys fall from trees. - Japanese proverb
Back to top
View user's profile Send private message
lbrtdy



Joined: 13 Apr 2009
Posts: 101

PostPosted: Tue Jun 02, 2009 1:04 am    Post subject: Reply with quote

maybe try something like this in the autoexecute part of your script (top),
Code:
sendmode, input

or
Code:
sendmode, play
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