Sign in to follow this  
Followers 0
swabby

How to perform 1 action every 3 seconds? Need help

2 posts in this topic

Hello all,

I'm trying to create a script that can press a keystroke every 3 seconds. If someone could provide me some direction on a function that can do this, i'll research this up.

I'd like to be able to hold a key down and have it do the script while its held. So for example if I hold down my mouse button, it will press 'Y' once every 3 seconds. So if I held my mouse button down for 9 seconds it would have pressed 3 'Y' keystrokes.

Something along those lines.

Please help :)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hello all,

I'm trying to create a script that can press a keystroke every 3 seconds. If someone could provide me some direction on a function that can do this, i'll research this up.

I'd like to be able to hold a key down and have it do the script while its held. So for example if I hold down my mouse button, it will press 'Y' once every 3 seconds. So if I held my mouse button down for 9 seconds it would have pressed 3 'Y' keystrokes.

Something along those lines.

Please help :)

While 1
    If _IsPressed("01") Then
        Send("Y")
        Sleep(3000)
    Else
        Sleep(100)
    EndIf
WEnd
Edited by Airwolf123

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

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