Jump to content

_IsPressed()


Recommended Posts

If _IsPressed("61", $dll) Then
    Send("y^4hey everyone ^7what are you ^9all up too?")
EndIf

That works but if I dont tap it really fast once it does it several times how do i make it only do it once per time it is pressed down?

Link to comment
Share on other sites

If _IsPressed("61", $dll) Then
    Send("y^4hey everyone ^7what are you ^9all up too?")
EndIf

That works but if I dont tap it really fast once it does it several times how do i make it only do it once per time it is pressed down?

Do you use for call of Duty??

From help:

SendKeyDelay : Alters the the length of the brief pause in between sent keystrokes.

Time in milliseconds to pause (default=5). Sometimes a value of 0 does not work; use 1 instead.

Edited by Fabry
A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza รจ il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center]
Link to comment
Share on other sites

Use a delay after the send..

If _IsPressed("61", $dll) Then
    Send("y^4hey everyone ^7what are you ^9all up too?")
    Sleep(100)
EndIf
that works but its not 100% perfect if im still holding down the key 100 it does it again

I only want it to do it once per press so even if i hold it in for 5 seconds i want it to do it only once

and its for ET, Enemy Territory. The only call of duty I've played was CoD3 for xbox360

Link to comment
Share on other sites

$count = 0
If _IsPressed("61", $dll) And $count = 0 Then
    $count += 1
    Send("y^4hey everyone ^7what are you ^9all up too?")
EndIf

Will only ever do it once.

Edit: Toady's solution is probably what you're looking for. Cheers.

Edited by mikehunt114
IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...