Sign in to follow this  
Followers 0
kskatec

Noob here

8 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by kskatec

Share this post


Link to post
Share on other sites

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

When I do this, I press End and the script automatically quits out.

Share this post


Link to post
Share on other sites

Your's works but why wont mine?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 by Bert

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