Jump to content

Key Spam


Ulatec
 Share

Recommended Posts

First I would like to say, that yes I am new here, but i'm not just a noob who is here to leach off of people.

But here is my problem, I'm not a pro at this by any means, also I have looked through the AutoIt help guide for a solution but haven't found one yet, Where I currently how my "Exit 0" I want to find a way to instead of exit the script, to make it Send ("e") again. I basically, want it the be like "Pause" and "Play" buttons. Currently it is "Exit 0" because it is the most simple way for me to make it stop.

#include <Misc.au3>
$dll = DllOpen("user32.dll")

While 1
    If _IsPressed ("7A" , $dll) Then
        Do
        Send ("e")
    Until _IsPressed ("7B" , $dll)
    Exit 0
    EndIf
Wend

Thank you in advance :)

Link to comment
Share on other sites

A small example:

HotKeySet("{1}", "_Start")
HotKeySet("{2}", "_Stop")
HotKeySet("{3}", "_Toggle")
$iSleep = 10
$bGo = False

While 1
    If $bGo = True Then
        Send("-")
    EndIf
    Sleep($iSleep)
WEnd

Func _Start()
    $bGo = True
EndFunc   ;==>_Start

Func _Stop()
    $bGo = False
EndFunc   ;==>_Stop

Func _Toggle()
    If $bGo = True Then
        $bGo = False
    Else
        $bGo = True
    EndIf
EndFunc   ;==>_Toggle
[font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]
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...