Jump to content

Recommended Posts

Posted

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
Posted

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

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
Posted

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

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.

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...