script to run the macros from macro deck

This commit is contained in:
Nayan Sawyer
2026-04-02 20:52:29 -04:00
parent 70209699c4
commit af6a4b291e

19
tfc-forge-macro/run.vbs Normal file
View File

@@ -0,0 +1,19 @@
Set sh = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
sh.CurrentDirectory = fso.GetParentFolderName(WScript.ScriptFullName)
Function QuoteForCmd(s)
QuoteForCmd = """" & Replace(s, """", """""") & """"
End Function
Dim extra, i
extra = ""
For i = 0 To WScript.Arguments.Count - 1
If Len(extra) > 0 Then extra = extra & " "
extra = extra & QuoteForCmd(WScript.Arguments(i))
Next
Dim cmdLine
cmdLine = "cmd /c uv run main.py"
If Len(extra) > 0 Then cmdLine = cmdLine & " " & extra
sh.Run cmdLine, 0, False