AutoHotkey Community

It is currently May 27th, 2012, 11:43 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: flash game combo attack
PostPosted: May 18th, 2010, 12:19 am 
Offline

Joined: May 18th, 2010, 12:12 am
Posts: 2
Ok im playing this flash game which has some annoying combo attack keys such as Left(a),Left(a),attack(spacebar)
right(d),right(d),attack(spacebar)

there is more but I could probly make em work by substituting keys in a working template.

Ive tried this thing myself but im really unexperienced with Ahk


a::
SetKeyDelay, 20, 20, 10
Send, a
Send, a
Send, Space
Return


here is the game it self

http://www.funny-games.biz/agony-the-portal.html

[Title edited. Please write descriptive titles for your topics. ~jaco0646]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 18th, 2010, 2:05 pm 
So what's the question?


Report this post
Top
  
Reply with quote  
PostPosted: May 18th, 2010, 2:30 pm 
Offline

Joined: August 26th, 2009, 11:15 pm
Posts: 38
Location: Canada
When you bind a:: then send a, you're creating a recursive loop try something to trigger the combo like a modifier such as shift.

i.e

Code:
#NoEnv
SendMode Input

+a::
Send, {a}
sleep, 500
Send, {a}
sleep, 500
Send, {space}
return


Alternatively you may want or find it useful to just hold the key down for the desired combo to cycle. In that case try this example.

Code:
#NoEnv
SendMode Input

$a::
   Loop 2
   {
    if not GetKeyState("a", "P")
      break
     Send, {a}
     sleep 500
    }
send, {space}
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 18th, 2010, 9:31 pm 
Offline

Joined: May 18th, 2010, 12:12 am
Posts: 2
Thanks second script didnt work for me but first one almost perfect I had to replace shift with ctrl because originally shift is "Block"

the only problem im having is that if I hold ctrl and press A(left) it doesnt work I have to let go of ctrl and then press it again.


Report this post
Top
 Profile  
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: Bing [Bot], MSN [Bot], Yahoo [Bot] and 19 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