Then perhaps slower?:
Code: Select all
#SingleInstance, Force
; If !A_IsAdmin
; Try Run *RunAs "%A_ScriptFullPath%"
Var1 := "Hello"
Var2 := "{Hi|hallo|hallo you} i want to {talk with|kill} you"
Var3 := "{Hallooo|Hey} I am availible {now|later|never}"
Var4 := "Greetings"
Var5 := "Bla bla"
F1::
Random, OutputVar, 1, 5
Text := Var%OutputVar%
While, RegExMatch(Text, "{([^}]+)}", EitherOr)
{
EitherOr2 := StrSplit(EitherOr1, "|")
Random, No, 1, EitherOr2.MaxIndex()
Text := StrReplace(Text, EitherOr, EitherOr2[No],, 1)
}
Loop, Parse, Text
RandomSendInput(A_LoopField)
SendInput, `n
Return
RandomSendInput(Char, TMin:=30, TMax:=80)
{ ; Mainly by TheBeginner https://www.autohotkey.com/boards/viewtopic.php?f=13&t=90974
val := DllCall("VkKeyScanA", "char", asc(Char)), low := val & 0xFF, high := val >> 8
, shift := high & 1, ctrl := high & 2 != 0, alt := high & 4 != 0
SendInput,% (shift?"{LShift down}":"") (ctrl?"{LCtrl down}":"") (alt?"{RAlt down}":"")
SendInput,% (vk:="{vk" Format("{:x}", low)) " Down}"
Random, Sleep, TMin, TMax
Sleep, Sleep
SendInput,% vk " Up}" (shift?"{LShift up}":"") (ctrl?"{LCtrl up}":"") (alt?"{RAlt up}":"")
Random, Sleep, TMin, TMax
Sleep, Sleep
}