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 

Interacting with Flash

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





PostPosted: Sat Jul 19, 2008 8:33 pm    Post subject: Interacting with Flash Reply with quote

Hi, I'm having problems with my .ahk files. I've been messing around with automating flash games, and so far it's been working wonderfully! However, I've only been using SendInput clicks and things like that.

Now, I want to be able to input Up and Right. The typical 'SendInput {Up}' doesn't work on the Flash game where I want it to get received, and clicks are also pointless.

If I could figure this out, my program will actually look wonderfully simple. Something like this is what I have so far, and it's just painful to think I can't have it just loop up and right for me:

[list]
F1::
MsgBox Bot started
Loop
{
if GetKeyState("F2", "1")
{
MsgBox, 0, Paused, Bot paused.
break
}
SendInput {Up} ;these are the ones refusing to work in Flash.
SentInput {Right}

}
return
Back to top
ScionOfWar
Guest





PostPosted: Sat Jul 19, 2008 8:35 pm    Post subject: Reply with quote

Sorry for the typos too lol

Thanks Very Happy
Back to top
Guest






PostPosted: Sat Jul 19, 2008 9:19 pm    Post subject: Re: Interacting with Flash Reply with quote

ScionOfWar wrote:
The typical 'SendInput {Up}'...

...SendInput is not "typical"...it's a faster/more optimized way to send, after everything's already working...when trying to get a Flash game to respond to keys I would use Send 1st & if that works change it to SendInput, then if that don't work, go back to Send...also you need to make sure the Flash game has focus 1st (click it) or nothing will work...manually click the Flash game, then try both of these...

Code:
F1::
Send, {Up}
Send, {Right}
return

F2::
s=319
Send, {Up down}
Sleep, %s%
Send, {Up up}
Send, {Right down}
Sleep, %s%
Send, {Right up}
return

...lower 319 until it don't work (try 219, 119, 19), then raise it again...
Back to top
Display posts from previous:   
Post new topic   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