kataklysim Posted June 22, 2011 Share Posted June 22, 2011 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 More sharing options...
ibroadbent Posted June 22, 2011 Share Posted June 22, 2011 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 More sharing options...
hannes08 Posted June 22, 2011 Share Posted June 22, 2011 (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. Edited June 22, 2011 by Hannes123 Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now