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 

number 2 key

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



Joined: 16 Nov 2008
Posts: 2

PostPosted: Sun Nov 16, 2008 7:46 pm    Post subject: number 2 key Reply with quote

Hello, sorry im noob and also dont speak eng very well.. Very Happy

i need a script for a PC game that need to press the "2" key every second, but if i use the numpad2 doesnt work on this game (it recognise only the "2" key over the Q-W keys)

can someone show me a quick sample, or existing tutorial?
Thanks,
Alberto
Back to top
View user's profile Send private message
Frankie



Joined: 02 Nov 2008
Posts: 2850

PostPosted: Sun Nov 16, 2008 7:55 pm    Post subject: Reply with quote

send {2} should work


Code:

loop
{
    ifwinactive, name of window
        send {2}
}


untested
Back to top
View user's profile Send private message
albe99



Joined: 16 Nov 2008
Posts: 2

PostPosted: Sun Nov 16, 2008 8:20 pm    Post subject: Reply with quote

work!
thanks very much Frankie
Back to top
View user's profile Send private message
hassoun



Joined: 01 Apr 2008
Posts: 12

PostPosted: Mon Nov 17, 2008 4:12 am    Post subject: Reply with quote

Code:
$F2::
loop
{
    ifwinactive, AutoHotkey - Notepad
        send {2}
    if #F2
        break

}



How do I make F2 toggle the function?
Back to top
View user's profile Send private message
Frankie



Joined: 02 Nov 2008
Posts: 2850

PostPosted: Mon Nov 17, 2008 12:02 pm    Post subject: Reply with quote

Code:

$F2::
loop
{
    ifwinactive, AutoHotkey - Notepad
    {
        send {2}
        sending = true
    }
    if(sending)
        break
}
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