Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Originally by https://www.reddit.com/user/Stembolt_Sealer , edited to add timestamping by https://www.reddit.com/user/AI221/
- #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.
- ;space engineers periodic save file copier
- one_minute=60000 ;definition - one minute is 60000ms
- sleep_time:=one_minute*5 ;initialize sleep_time (default is 5 minutes)
- ShowWhenSaved:= 1
- save_directory_original=C:\Users\Jackson\AppData\Roaming\SpaceEngineers\Saves
- save_directory_backup=D:\Backups\SpaceEngineers
- while 1
- {
- Process, Exist, spaceengineers.exe
- ;ErrorLevel is the process_id, if it exists, if it is 0 the process does not exist
- If (ErrorLevel=0)
- {
- ;TrayTip Nop,SpaceEngineers isnt running
- ;do nothing! the process doesn't exist!
- }
- else{
- ;FileCopyDir Documetation - https://www.autohotkey.com/docs/commands/FileCopyDir.htm
- FileCopyDir, %save_directory_original%, %save_directory_backup%/%A_NowUTC%, 0
- if (ShowWhenSaved)
- {
- TrayTip SEBackups,Backup was created!
- }
- }
- sleep, %sleep_time% ;wait for a set time
- }
Add Comment
Please, Sign In to add comment