Sign in to follow this  
Followers 0
narayanjr

_IsPressed()

7 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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]

Share this post


Link to post
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

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites

You may want to call _IsPressed just to clear the buffer first, before you actually get into your loop.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

$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]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

lol y didnt u say so?

If _IsPressed("61", $dll) Then
    Send("y^4hey everyone ^7what are you ^9all up too?")
While _IsPressed("61",$dll)
    Sleep(10)
Wend
EndIf
Edited by Toady

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

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