Sign in to follow this  
Followers 0
Mitzuma

keystroke simple script.

4 posts in this topic

hi, im very new to this scritping business, i need a script that has a keystroke and loops, ive tryed and failed many times :o any help would be helpful :geek:

Share this post


Link to post
Share on other sites



what keys would you liek to press something like

while 1
send("{a}")
wend

would send the a key

Share this post


Link to post
Share on other sites

1

Welcome to the Forums

2

to learn alot quickly see this

http://www.autoitscript.com/forum/index.php?showtopic=21048#

3

a small script that does what you asked ( unknown what you want to send )

; Press Esc to terminate script, F9 to "run/pause"


Global $Paused
HotKeySet("{F9}", "TogglePause")
HotKeySet("{ESC}", "Terminate")


;;;; Body of program would go here;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        ToolTip('Script is "Running"', 0, 0)
        Send("{b}")
        Send("{r}")
        Sleep(100)
    WEnd
    ToolTip("")
EndFunc  ;==>TogglePause

Func Terminate()
    Exit 0
EndFunc  ;==>Terminate

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

If you want keystrokes then look up controlsend() in the helpfile and While and Wend for looping.

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