Sign in to follow this  
Followers 0
kataklysim

Looking through help files and having some problems

3 posts in this topic

hey guys have a bit of a problem i have not auto scripted in a awhile and lost some of the basics if someone can write me out a simple sample script for key pressing with delays that i can work on from i would greatly love you

say i want to press the number 5 every 15 mins and press W for 5 seconds A for 5 seconds g for 5 seconds so on and so fourth

Share this post


Link to post
Share on other sites



This should do part of what you want at least (it's based on the sample code in the Help file):

Send("#r")

WinWaitActive("Run")

Send("notepad.exe{Enter}")

WinWaitActive("[CLASS:Notepad]")

While True

Send("5")

sleep(5000)

Send("W")

sleep(5000)

Send("g")

sleep(5000)

Sleep(10000)

WEnd

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

for key presses and releases use Send("{W down}") and then Send("{W up}"):

;~ Presses and holds "W" for five seconds:
Send("{W down}")
Sleep(5000)
Send("{W up}")

;)

Edit:

This can be found in the help file under Send. Well, you'll need to scroll down a bit to reach this info. :huh2:

Edited by Hannes123

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

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