Last active
October 8, 2021 04:35
-
-
Save Specnr/81376637228129edcfbfa7620f5b1f51 to your computer and use it in GitHub Desktop.
A single-instance macro for RSG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance, Force | |
SendMode Input | |
SetWorkingDir, %A_ScriptDir% | |
global oldWorldsFolder := "C:\MultiInstanceMC\oldWorlds\" | |
global SavesDirectory = "C:\MultiInstanceMC\MultiMC\instances\1.16INST1\.minecraft\saves\" | |
MoveWorlds() | |
{ | |
dir := SavesDirectories . "saves\" | |
Loop, Files, %dir%*, D | |
{ | |
If (InStr(A_LoopFileName, "New World") || InStr(A_LoopFileName, "Speedrun #")) { | |
tmp := A_NowUTC | |
FileMoveDir, %dir%%A_LoopFileName%, %dir%%A_LoopFileName%%tmp%, R | |
FileMoveDir, %dir%%A_LoopFileName%%tmp%, %oldWorldsFolder%%A_LoopFileName%%tmp% | |
} | |
} | |
} | |
#IfWinActive, Minecraft | |
*U:: | |
SetKeyDelay, 1 | |
Send, {Esc}{Shift Down}{Tab}{Shift Up}{Enter} | |
MoveWorlds() | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment