kskatec Posted May 12, 2008 Posted May 12, 2008 For some reason when I run this script the sleep doesnt do anything, it still works like sleep is at zero.. #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.11.1 (beta) Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here HotKeySet("{end}","spam") While 1 sleep(13000) WEnd Func spam() send("{enter}") send("Sit") send("{enter}") send("The") send("{enter}") send("Fuck") send("{enter}") send("Down.") send("{enter}") send("LnE > You") send("{enter}") EndFunc
Immensee Posted May 12, 2008 Posted May 12, 2008 Hey actually, the sleep is working. i can proof this by writing the following: HotKeySet("{end}","spam") sleep(13000) MsgBox(0,"","WORKS") Func spam() Exit EndFunc if you wait 13 seconds, it will show a message box with the text WORKS. but if you press the END button before the 13 seconds it wont. immense
Zedna Posted May 12, 2008 Posted May 12, 2008 Try to use sleep(100) instead of sleep(13000) Resources UDF ResourcesEx UDF AutoIt Forum Search
kskatec Posted May 12, 2008 Author Posted May 12, 2008 (edited) Speed still is an issue, I just need to slow it down some... Edit: Just read it, how come it doesnt work with my script though? Edited May 13, 2008 by kskatec
kskatec Posted May 12, 2008 Author Posted May 12, 2008 Hey actually, the sleep is working. i can proof this by writing the following: HotKeySet("{end}","spam") sleep(13000) MsgBox(0,"","WORKS") Func spam() Exit EndFunc if you wait 13 seconds, it will show a message box with the text WORKS. but if you press the END button before the 13 seconds it wont. immenseWhen I do this, I press End and the script automatically quits out.
kskatec Posted May 13, 2008 Author Posted May 13, 2008 Heres a better description of what I want. I want it to ENTER type Sit then ENTER again. Then ENTER the ENTER. etc. Just need it to go slow between typing and ENTER.
BrettF Posted May 13, 2008 Posted May 13, 2008 (edited) The sleep in the loop is too long. The hotkey press won't register because of that time. Do as Zedna said, make it Sleep (100). If you want to delay it, add a sleep just after you declare your function. The reason his example closes is because he set the end key to close. Read the script EDIT: And reading your third post in a row (THERE IS SUCH A THING AS AN EDIT BUTTON) Persudo Code: Send Sleep Send Sleep Send... Edited May 13, 2008 by Bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
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