kataklysim 0 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 Share this post Link to post Share on other sites
ibroadbent 0 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 Share this post Link to post Share on other sites
hannes08 39 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] Share this post Link to post Share on other sites