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

Get help with using AutoHotkey and its commands and hotkeys
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}


numpad2:: ; Lctrl+z+enter

Sendinput ^z{enter}
Sendinput ^z{enter}
Sendinput ^z{enter}
User avatar
Posts: 6722
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

w:: ;slower
Loop, 5
	SendInput ^v{Enter}
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: flyingDman, gigiiiii, MikeyG12, NewberEnerNeeder1, Permagrin, Sanbenito, TAC109 and 66 guests