Sign in to follow this  
Followers 0
BillLuvsU

I Cant Believe I'm Asking This But...

10 posts in this topic

I can't get autoit tohold down a button *:)

heres my code

Send( "{a down}" )
Sleep( 5000 )
Send( "{a up}" )

Now shouldn't this hold down "a" for two seconds?


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

It does.

Edit - actually that should hold it down for 5 seconds...

Edited by greenmachine

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

look at SendKeyDownDelay() in the help... and use Send('a')

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

I'm going to predict his next question since I've seen it before:

he's going to want to know why it doesn't type repeatedly in any edit field if it's really holding the "a" down. The reason is because of the way AutoIt is set up, and because of the way different computers have different times set for repeat. In the helpfile it says you can do the {a down} and {a up} but also that it is generally useful only for games, and the reason is because AutoIt is built to not let it repeat.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I'm going to predict his next question since I've seen it before:

he's going to want to know why it doesn't type repeatedly in any edit field if it's really holding the "a" down. The reason is because of the way AutoIt is set up, and because of the way different computers have different times set for repeat. In the helpfile it says you can do the {a down} and {a up} but also that it is generally useful only for games, and the reason is because AutoIt is built to not let it repeat.

Yeah... For repeating, I guess you could make your own UDF:
_SendMulti('a', 5)


Func _SendMulti($v_Send, $i_Time, $i_Delay = 0)
    Local $Timer = TimerInit()
    If $i_Delay = 0 Then
        Do
            Send($v_Send)
        Until TimerDiff($Timer) / 1000 >= $i_Time
    Else
        Do
            Send($v_Send)
            Sleep($i_Delay)
        Until TimerDiff($Timer) / 1000 >= $i_Time
    EndIf
EndFunc
Edit: Forgot a Variable.... Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Hmm.. Thanks guys, but I was trying to use it for a game and it was not working =\


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites

What game? Does it have any sort of blocking program attached to it that attempts to prevent outside programs from interacting with it?

Share this post


Link to post
Share on other sites

it's for maplestory, but I already bypassed nprotect


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites

it's for maplestory, but I already bypassed nprotect

Doesn't sound like it...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0