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

Get help with using AutoHotkey and its commands and hotkeys
Blixky
Posts: 2
Joined: 14 Jul 2017, 23:28

Does anyone know how to make this script faster?

14 Jul 2017, 23:32

#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}
User avatar
jeeswg
Posts: 6711
Joined: 19 Dec 2016, 01:58
Location: UK

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

15 Jul 2017, 12:23

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
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask For Help”

Who is online

Users browsing this forum: Albireo, blue83, boiler, DRocks, Google [Bot], hitesh, momomo and 185 guests