Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Menu, Tray, NoStandard
- Menu, Script, Add, Change Chatlog Saving Directory, ChangeDir
- Menu, Script, Add, Change Chatlog Name, ChangeName
- Menu, Script, Add, Change Hotkey, ChangeHotkey
- Menu, StandardStuff, Standard
- Menu, Tray, Add, Script Stuff, :Script
- Menu, Tray, Add, Standard Stuff, :StandardStuff
- IniRead, OldHotkey, ChatlogSettings.ini, Settings, Hotkey, !1
- Hotkey, %OldHotkey%, ManualSave, On
- TrayTip, Chatlog Archiver has started!
- Goto, AutoArchiver
- Return
- AutoArchiver:
- Process, Wait, gta_sa.exe ;Change if your GTA works on a different process
- Process, WaitClose, gta_sa.exe ;Change if your GTA works on a different process
- IniRead, Dir, ChatlogSettings.ini, Settings, Dir
- StringReplace, Dir, Dir, &WorkingDir&, %A_WorkingDir%, 1
- StringReplace, Dir, Dir, &YEAR&, %A_Year%, 1
- StringReplace, Dir, Dir, &MONTHNUM&, %A_MM%, 1
- StringReplace, Dir, Dir, &MONTHNAME&, %A_MMMM%, 1
- StringReplace, Dir, Dir, &DAY&, %A_DD%, 1
- StringReplace, Dir, Dir, &HOUR&, %A_Hour%, 1
- StringReplace, Dir, Dir, &MINUTE&, %A_Min%, 1
- StringReplace, Dir, Dir, &SECOND&, %A_Sec%, 1
- IniRead, Name, ChatlogSettings.ini, Settings, Name
- StringReplace, Name, Name, &YEAR&, %A_Year%, 1
- StringReplace, Name, Name, &MONTHNUM&, %A_MM%, 1
- StringReplace, Name, Name, &MONTHNAME&, %A_MMMM%, 1
- StringReplace, Name, Name, &DAY&, %A_DD%, 1
- StringReplace, Name, Name, &HOUR&, %A_Hour%, 1
- StringReplace, Name, Name, &MINUTE&, %A_Min%, 1
- StringReplace, Name, Name, &SECOND&, %A_Sec%, 1
- FileCreateDir, %Dir%
- FileMove, %A_MyDocuments%\GTA San Andreas User Files\SAMP\Chatlog.txt, %Dir%\%Name%.txt
- Goto, AutoArchiver
- Return
- ChangeHotkey:
- Gui, Add, Text,, Click the box below and press your hotkeys
- Gui, Add, Hotkey, vNewHotkey
- Gui, Add, Button, Default gSubmitHotkey, Submit
- Gui, Show
- Return
- ChangeDir:
- Gui, Add, Text,, Enter your new directory to save your chatlogs to:
- Gui, Add, Text,, Use &&WorkingDir&& to use the current directory of your script
- Gui, Add, Text,, Use &&WorkingDir&&/FOLDERNAME to use a sub folder of the current directory of your script
- Gui, Add, Text,,
- (
- Use &&WorkingDir&& to use the current directory of your script.
- Use &&WorkingDir&&\FOLDERNAME to use a sub folder of the current directory of your script.
- Use &&YEAR&& to add the current year to the name.
- Use &&MONTHNUM&& to add the current month number to the name. (i.e. June = 06)
- Use &&MONTHNAME&& to add the current month name to the name. (i.e. June = June)
- Use &&DAY&& to add the current day of the month to the name.
- Use &&HOUR&& to add the current hour to the name.
- Use &&MINUTE&& to add the current minute to the name.
- Use &&SECOND&& to add the current second to the name.
- )
- Gui, Add, Edit, vNewDir w500
- Gui, Add, Button, Default gSubmitDir, Submit
- Gui, Show
- Return
- ChangeName:
- Gui, Add, Text,, Enter your new directory to save your chatlogs to:
- Gui, Add, Text,,
- (
- Use &&YEAR&& to add the current year to the name.
- Use &&MONTHNUM&& to add the current month number to the name. (i.e. June = 06)
- Use &&MONTHNAME&& to add the current month name to the name. (i.e. June = June)
- Use &&DAY&& to add the current day of the month to the name.
- Use &&HOUR&& to add the current hour to the name.
- Use &&MINUTE&& to add the current minute to the name.
- Use &&SECOND&& to add the current second to the name.
- )
- Gui, Add, Edit, vNewName w500
- Gui, Add, Button, Default gSubmitName, Submit
- Gui, Show
- Return
- SubmitHotkey:
- Gui, Submit
- Gui, Destroy
- IniRead, OldHotkey, ChatlogSettings.ini, Settings, Hotkey, !1
- IniWrite, %NewHotkey%, ChatlogSettings.ini, Settings, Hotkey
- Hotkey, %OldHotkey%, ManualSave, Off
- Hotkey, %NewHotkey%, ManualSave, On
- StringReplace, NewHotkey, NewHotkey, +, Shift +` , 1
- StringReplace, NewHotkey, NewHotkey, !, Alt +` , 1
- StringReplace, NewHotkey, NewHotkey, ^, Ctrl +` , 1
- StringReplace, NewHotkey, NewHotkey, #, Win +` , 1
- MsgBox, 64, Chatlog Archiver, [Success]`n`nYour hotkey has been changed to:`n%NewHotkey%
- Return
- SubmitDir:
- Gui, Submit
- Gui, Destroy
- IniWrite, %NewDir%, ChatlogSettings.ini, Settings, Dir
- MsgBox, 64, Chatlog Archiver, [Success]`n`nYour directory has been changed to:`n%NewDir%
- Return
- SubmitName:
- Gui, Submit
- Gui, Destroy
- IniWrite, %NewName%, ChatlogSettings.ini, Settings, Name
- MsgBox, 64, Chatlog Archiver, [Success]`n`nYour name has been changed to:`n%NewName%
- Return
- ManualSave:
- IniRead, Dir, ChatlogSettings.ini, Settings, Dir
- StringReplace, Dir, Dir, &WorkingDir&, %A_WorkingDir%, 1
- StringReplace, Dir, Dir, &YEAR&, %A_Year%, 1
- StringReplace, Dir, Dir, &MONTHNUM&, %A_MM%, 1
- StringReplace, Dir, Dir, &MONTHNAME&, %A_MMMM%, 1
- StringReplace, Dir, Dir, &DAY&, %A_DD%, 1
- StringReplace, Dir, Dir, &HOUR&, %A_Hour%, 1
- StringReplace, Dir, Dir, &MINUTE&, %A_Min%, 1
- StringReplace, Dir, Dir, &SECOND&, %A_Sec%, 1
- IniRead, Name, ChatlogSettings.ini, Settings, Name
- StringReplace, Name, Name, &YEAR&, %A_Year%, 1
- StringReplace, Name, Name, &MONTHNUM&, %A_MM%, 1
- StringReplace, Name, Name, &MONTHNAME&, %A_MMMM%, 1
- StringReplace, Name, Name, &DAY&, %A_DD%, 1
- StringReplace, Name, Name, &HOUR&, %A_Hour%, 1
- StringReplace, Name, Name, &MINUTE&, %A_Min%, 1
- StringReplace, Name, Name, &SECOND&, %A_Sec%, 1
- FileCreateDir, %Dir%
- FileMove, %A_MyDocuments%\GTA San Andreas User Files\SAMP\Chatlog.txt, %Dir%\%Name%.txt
- Return
- GuiClose:
- Gui, Destroy
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement