AutoHotkey Community

It is currently May 26th, 2012, 6:58 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: May 21st, 2009, 12:28 am 
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 8)!

darkdemetrio@gmail.com


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 21st, 2009, 3:20 am 
jelp :x


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 21st, 2009, 4:35 am 
Offline

Joined: September 9th, 2008, 9:41 pm
Posts: 6
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... :roll:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 21st, 2009, 5:37 am 
thx 8)
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 8)

and sry for my english, is auspicied by babelfish :D xD


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: dra, Exabot [Bot], Google [Bot], rbrtryn and 57 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group