mirror of
https://github.com/opus-tango/tfc-forge-macro.git
synced 2026-07-17 23:12:44 +00:00
script to run the macros from macro deck
This commit is contained in:
19
tfc-forge-macro/run.vbs
Normal file
19
tfc-forge-macro/run.vbs
Normal 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
|
||||||
Reference in New Issue
Block a user