Version 1.2
; Version 1.2
; Fixed where sending symbols like -=!@#$%^&*(){}|:"<>?,./;'[]\`~ would not send.
;Version 1.1
; Fixed saving issues on reload/app close Sorry left one line off and it was not reading correctly.
; Added Channel ID #. I do not use /leave trade but by the ID the channel will be using. Reason being is it is clean and easier to use. Default setting for this is 3
#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.
SetKeyDelay, 100, 100 ; Helps slow typing between sends.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
OnExit, ButtonExit
IfNotExist, %A_ScriptDir%/SpamChat.ini
{
;Default Settings.
IniWrite, [WTS] So and So, %A_ScriptDir%/SpamChat.ini, Main, Text
IniWrite, 200, %A_ScriptDir%/SpamChat.ini, Main, Delay
IniWrite, 3, %A_ScriptDir%/SpamChat.ini, Main, ChannelID
}
IniRead, LoadText, %A_ScriptDir%/SpamChat.ini, Main, Text
IniRead, TimeDelay, %A_ScriptDir%/SpamChat.ini, Main, Delay
IniRead, ChannelID, %A_ScriptDir%/SpamChat.ini, Main, ChannelID
Gui, Add, Edit, x12 y9 w330 h20 vTextEdit, %LoadText%
Gui, Add, Button, x12 y29 w100 h20 , Save
Gui, Add, Button, x142 y29 w90 h20 , Load
Gui, Add, Button, x252 y29 w90 h20 , Exit
Gui, Add, Text, x42 y59 w40 h20 , Delay:
Gui, Add, Edit, x82 y59 w70 h20 vTimeDelay, %TimeDelay%
Gui, Add, Text, x152 y59 w180 h20 , Time is in ms. Default 200ms
Gui, Add, Text, x12 y79 w70 h20 , Channel ID #:
Gui, Add, Edit, x82 y79 w70 h20 vChannelID, %ChannelID%
Gui, Add, Text, x152 y79 w200 h20 , What channel#? Default 3
Gui, Add, Text, x12 y99 w330 h100 , How to use`nF1 to leave then join trade chat then sends the text above.`nF2 to type out the message(must have a place to type to.)`nF3 Reload script`nF4 To exit script.`nSome notes: Make sure trade chat is number 3. If you see somehting I should add just ask on my post.
Gui, Show, x711 y444 h213 w361, Chat Spam by Nipper
Return
ButtonSave:
Gui, Submit, nohide
IniWrite, %TextEdit%, %A_ScriptDir%/SpamChat.ini, Main, Text
IniWrite, 200, %A_ScriptDir%/SpamChat.ini, Main, Delay
IniWrite, 3, %A_ScriptDir%/SpamChat.ini, Main, ChannelID
return
ButtonLoad:
IniRead, LoadText, %A_ScriptDir%/SpamChat.ini, Main, Text
IniRead, TimeDelay, %A_ScriptDir%/SpamChat.ini, Main, Delay
IniRead, ChannelID, %A_ScriptDir%/SpamChat.ini, Main, ChannelID
Guicontrol, , TextEdit, %LoadText%
Guicontrol, , TimeDelay, %TimeDelay%
Guicontrol, , ChannelID, %ChannelID%
return
F1::
Gui, Submit, nohide
Send {enter}
sleep %TimeDelay%
Send /leave %ChannelID%
sleep %TimeDelay%
Send {enter}
sleep %TimeDelay%
Send {enter}
sleep %TimeDelay%
Send /join Trade
sleep %TimeDelay%
Send {enter}
sleep %TimeDelay%
Send {enter}
sleep %TimeDelay%
Send /%ChannelID%{space}
sleep 400 ; This is a fixed number. A Bug I noticed if you try and type to fast before the channel it self switchs over it wont send. Even if a /3 is in front of the message.
SendRaw %TextEdit%
sleep %TimeDelay%
Send {enter}
return
F2::
Gui, Submit, nohide
Send %TextEdit%
return
F3::
{
Gui, Submit, nohide
IniWrite, %TextEdit%, %A_ScriptDir%/SpamChat.ini, Main, Text
IniWrite, %TimeDelay%, %A_ScriptDir%/SpamChat.ini, Main, Delay
IniWrite, 3, %A_ScriptDir%/SpamChat.ini, Main, ChannelID
reload
}
F4::goto, ButtonExit
ButtonExit:
GuiClose:
Gui, Submit, nohide
IniWrite, %TextEdit%, %A_ScriptDir%/SpamChat.ini, Main, Text
IniWrite, %TimeDelay%, %A_ScriptDir%/SpamChat.ini, Main, Delay
IniWrite, 3, %A_ScriptDir%/SpamChat.ini, Main, ChannelID
ExitApp