Jump to content

Recommended Posts

Posted (edited)

Heres my basic script:

; AutoIt Version: 3.0
; Language:    English
; Platform:    Win9x/NT
; Author:        Brandon Kling (Zeke0238@hotmail.com)
;
; Script Function:
;   Runs the command endlessly.
;

; Activates the window
WinActivate("Window - Microsoft Internet Explorer")
WinWaitActive("Window - Microsoft Internet Explorer")


; Now that the window is active
; Use AutoItSetOption to slow down the typing speed to make up for latency
AutoItSetOption("SendKeyDelay", 500)
Send("{ENTER}{BS}")
Sleep(500)

Now my goal is to have it keep pressing {Enter} and {Bs} but I can figure out how. Even if I could put a set number in, say 500, that would work as well.

I did try this but to no avail:

; AutoIt Version: 3.0
; Language:    English
; Platform:    Win9x/NT
; Author:        Brandon Kling (Zeke0238@hotmail.com)
;
; Script Function:
;   Runs the command endlessly.
;

; Activates the window
WinActivate("Window - Microsoft Internet Explorer")
WinWaitActive("Window - Microsoft Internet Explorer")


; Now that the window is active
; Use AutoItSetOption to slow down the typing speed to make up for latency
AutoItSetOption("SendKeyDelay", 500)
$i = 0
Do
    Send("{ENTER}{BS}", $i)
    Sleep(500)
    $i = $i + 1
Until $i = 500
Edited by JuggaloZeke
Posted

Ha, always seem to figure it out myself when I post asking for help.

; AutoIt Version: 3.0
; Language:    English
; Platform:    Win9x/NT
; Author:        Brandon Kling (Zeke0238@hotmail.com)
;
; Script Function:
;   Runs the command endlessly.
;

; Activates the window
WinActivate("Window - Microsoft Internet Explorer")
WinWaitActive("Window - Microsoft Internet Explorer")


; Now that the window is active
; Use AutoItSetOption to slow down the typing speed to make up for latency
When 1
AutoItSetOption("SendKeyDelay", 500)
Send("{ENTER}{BS}")
Sleep(500)
Wend

Didn't understand the When at first but after staring at it in the help file it stuck in.

Posted

You don't need to call AutoItSetOption() every iteration of the loop. Calling it once is enough, it's change stays into affect until you call it again.

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
×
×
  • Create New...