Page 1 of 1

Does anyone know how to make this script faster?

Posted: 14 Jul 2017, 23:32
by Blixky
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

setkeydelay -1

setbatchlines -1ms

#maxhotkeysperinterval 99999999


numpad1:: ; Lctrl+v+enter

Sendinput ^v{enter}

Sendinput ^v{enter}

Sendinput ^v{enter}

Sendinput ^v{enter}

Sendinput ^v{enter}





return

numpad2:: ; Lctrl+z+enter

Sendinput ^z{enter}
Sendinput ^z{enter}
Sendinput ^z{enter}

Re: Does anyone know how to make this script faster?  Topic is solved

Posted: 15 Jul 2017, 11:01
by Sam_

Re: Does anyone know how to make this script faster?

Posted: 15 Jul 2017, 12:23
by jeeswg
This maybe?

Code: Select all

q:: ;faster
vText := Clipboard
vOutput := ""
VarSetCapacity(vOutput, StrLen(vText)*6*2)
Loop, 5
	vOutput .= vText "`r`n"
Clipboard := vOutput
SendInput ^v
return

w:: ;slower
Loop, 5
	SendInput ^v{Enter}
return