Skip to content

Instantly share code, notes, and snippets.

@Specnr
Last active October 8, 2021 04:35
Show Gist options
  • Save Specnr/81376637228129edcfbfa7620f5b1f51 to your computer and use it in GitHub Desktop.
Save Specnr/81376637228129edcfbfa7620f5b1f51 to your computer and use it in GitHub Desktop.
A single-instance macro for RSG
#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