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 quick press two button in a intermittent form?

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





PostPosted: Wed May 20, 2009 11:28 pm    Post subject: how quick press two button in a intermittent form? Reply with quote

how to press a button and soon another one quickly and of continuous form, when I leave pressed another button?
example:
I leave pressed the button (f1), and this do as a response ( f7 f8 f9 f7 f8 f9 f7 f8 f9 f7 f8 f9) in a 0.1 sec beetwen f7 and f8 and f9 and f7 etc


I wrote this code a time ago
Code:
#MaxHotkeysPerInterval 1000000
$F1::  ;
Loop  ;
{
    if not GetKeyState("F1", "P")  ;
        break  ;
   Send {F7}  ;
    Send {F8}  ;
    Send {F9}  ;
}
return


its works, but i think maybe exist a better form for this. at form
when (pressed (f1)){
send f7
wait 0.1 sec
send f8
wait 0.1 sec
send f9
wait 0.1 sec
}


please, help me, thx Cool!

darkdemetrio@gmail.com
Back to top
PiroKun
Guest





PostPosted: Thu May 21, 2009 2:20 am    Post subject: Reply with quote

jelp Mad
Back to top
defrostedchemist



Joined: 09 Sep 2008
Posts: 6

PostPosted: Thu May 21, 2009 3:35 am    Post subject: Reply with quote

This code will preform your desired function.
Code:
F1::
KeyWait,F1,D
Loop{
Send {F7}
Sleep 100
Send {F8}
Sleep 100
Send {F9}
Sleep 100
GetKeyState,state,F1,P
if state=U
Break
}
Return

I cant imagine what use it would have, except for a game. So just in case you are using this for an online game, you might want to change the repeated "Sleep 100"s to random sleep times. Otherwise, you might get noticed... Rolling Eyes
Back to top
View user's profile Send private message
PiroKun
Guest





PostPosted: Thu May 21, 2009 4:37 am    Post subject: Reply with quote

thx Cool
and yes, if for a mmorpg game
I need the code because it tires to me to tighten so fast the keys x.x, lvling kill me

ill test it, thx Cool

and sry for my english, is auspicied by babelfish Very Happy xD
Back to top
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