SetTitleMatchMode, 2 SetKeyDelay, 30, 90 #SingleInstance force CoordMode, Mouse, Client SetControlDelay -1 isStarted:=False isPaused:=False defText1 := "" defText2 := "" Gui, New, hwndhGui AlwaysOnTop Resize MinSize Gui, Add, Text,section w120, Lines to type Gui, Add, Edit, R12 vTextInput w120, %defText1% Gui, Add, Text,section ys, Delay between lines (ms) Gui, Add, Edit, w70 Gui, Add, UpDown, vLineDelayMinMS Range1-50000, 2000 Gui, Add, Text,yp+3 x+5, - Gui, Add, Edit, w70 yp-3 x+5 Gui, Add, UpDown, vLineDelayMaxMS Range1-50000, 3000 Gui, Add, Text,xs, Delay after all lines (s) Gui, Add, Edit, w70 Gui, Add, UpDown, vChunkDelayMinS Range1-50000, 3 Gui, Add, Text,yp+3 x+5, - Gui, Add, Edit, w70 yp-3 x+5 Gui, Add, UpDown, vChunkDelayMaxS Range1-50000, 5 Gui, Add, Text,xs, Times to loop (0 for infinite) Gui, Add, Edit, w140 Gui, Add, UpDown, vLoopTimes Range0-50000, 0 Gui, Add, CheckBox,vDeleteAfterType Checked, Delete message after typing Gui, Add, Button,xs gPauseit w135 vPauseButton, Start Gui, Add, Link,xs-120 w260, Patreon - Discord Autotyper that runs in background, use your computer at the same time Gui, Show,w300 h230, Auto delete Autotyper return TextSpam: Sleep, 3000 if (LoopTimes > 0) { Loop, %LoopTimes% { GoSub, TypeLabel } } else { Loop { GoSub, TypeLabel } } return TypeLabel: for index, myString in currChatList ; Enumeration is the recommended approach in most cases. { if (isPaused) { return } sendLine(myString) } Sleep rand_range(ChunkDelayMinS*1000,ChunkDelayMaxS*1000) return sendLine(myLine) { global isPaused,LineDelayMinMS,LineDelayMaxMS,DeleteAfterType Loop, Parse, myLine { if (isPaused) { return } SendRaw, %A_LoopField% } if (isPaused) { return } Send, {Enter} if (DeleteAfterType) { Sleep, 1000 Send, {Up} Sleep, 700 Send, {Ctrl Down} Send, {Shift Down} Sleep, 500 Send, {Backspace} Sleep, 100 Send, {Backspace} Send, {Ctrl Up} Send, {Shift Up} Sleep, 700 Send, {Enter} Sleep, 700 Send, {Enter} } Sleep rand_range(LineDelayMinMS,LineDelayMaxMS) } Pauseit: Gui, Submit, Nohide currChatList := StrSplit(TextInput, "`n") if (!isStarted) { isStarted := True UpdateText("PauseButton", "Pause") Settimer, TextSpam, -1 return } isPaused := isPaused ? false : true Settimer, TextSpam, -1 UpdateText("PauseButton", isPaused ? "Resume" : "Pause") return HexToDec(Hex) { if (InStr(Hex, "0x") != 1) Hex := "0x" Hex return, Hex + 0 } Concatente2(x, y) { Return, x y } rand(range=5) { Random, r, -range, range return r } rand_range(min, max) { Random, r, min, max return r } UpdateText(ControlID, NewText) { static OldText := {} global hGui if (OldText[ControlID] != NewText) { GuiControl, %hGui%:, % ControlID, % NewText OldText[ControlID] := NewText } } HasVal(haystack, needle) { if !(IsObject(haystack)) || (haystack.Length() = 0) return 0 for index, value in haystack if (value = needle) return index return 0 } ObjIndexOf(ByRef obj, item, case_sensitive:=false) { mycount := 1 for i, val in obj { mycount++ if (case_sensitive ? (val == item) : (val = item)) return mycount } return 2 } target_random(min, target, max){ Random, lower, min, target Random, upper, target, max Random, weighted, lower, upper Return, weighted } GuiClose: ExitApp