Files
tfc-forge-macro/run.vbs
2026-04-04 16:45:10 -04:00

20 lines
556 B
Plaintext

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