Jump to content

Looking through help files and having some problems


Recommended Posts

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

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

Link to comment
Share on other sites

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