 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
PiroKun Guest
|
Posted: Wed May 20, 2009 11:28 pm Post subject: how quick press two button in a intermittent form? |
|
|
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 !
darkdemetrio@gmail.com |
|
| Back to top |
|
 |
PiroKun Guest
|
Posted: Thu May 21, 2009 2:20 am Post subject: |
|
|
jelp  |
|
| Back to top |
|
 |
defrostedchemist
Joined: 09 Sep 2008 Posts: 6
|
Posted: Thu May 21, 2009 3:35 am Post subject: |
|
|
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...  |
|
| Back to top |
|
 |
PiroKun Guest
|
Posted: Thu May 21, 2009 4:37 am Post subject: |
|
|
thx
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
and sry for my english, is auspicied by babelfish xD |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|