我的文件类型为.unitypackage
,例如something.unitypackage
。
我想每执行一次"E:\Unity\2018.2.1f1\Editor\Unity.exe" -openfile "%1"
(通过Enter或双击)就运行命令something.unitypackage
。
我该如何实现?
似乎“打开方式”不允许为命令指定选项,因此,如果我仅选择Unity.exe进行打开,则不会执行-openfile "%1"
选项。
答案 0 :(得分:1)
您可以编写如下的批处理脚本Sub find_my_stuff()
Dim xFoundCell as Variant
Dim Runner as Long
Dim SomeString as String
Set xFound Cell = Sheets("Sheet1").Range("A1:A" & LastRow).Find("DI", lookat:=xlPart_
, MatchCase:=True
Sheets("Sheet2").Range("A" & Runner) = xFoundCell.Address
SomeString = Sheets("Sheet2").Range("A" & Runner)
SomeString = Replace(SomeString, "A", "")
SomeString = Replace(SomeString, "$", "")
Sheets("Sheet2").Range("B" & Runner) = SomeString
Sheets("Sheet2").Range("C" & Runner) = Sheets("sheet1").Cells(SomeString,1)
End Sub
:
unity.bat
比您可以用set params=%1
if "%params%" NEQ "" (E:\Unity\2018.2.1f1\Editor\Unity.exe -openfile %params%) else (E:\Unity\2018.2.1f1\Editor\Unity.exe)
文件“打开”。