mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2026-11-05 15:11:59 +08:00
Add Run multiple commands at one time
This commit is contained in:
1 parent
78be273c7a
commit
41c644f2af
3 files changed
+30
-3
No files matched your search
@@ -190,11 +190,21 @@ namespace GrasscutterTools
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var cmd in commands.Split('|').Select(FormatCommand))
|
||||
Common.OC.Ping().Wait(1000);
|
||||
|
||||
if (Common.OC.CanInvokeMultipleCmd)
|
||||
{
|
||||
var msg = Common.OC.Invoke(cmd).Result;
|
||||
var msg = Common.OC.Invoke(FormatCommand(commands)).Result;
|
||||
Console.WriteLine(string.IsNullOrEmpty(msg) ? "OK" : msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var cmd in commands.Split('|').Select(FormatCommand))
|
||||
{
|
||||
var msg = Common.OC.Invoke(cmd).Result;
|
||||
Console.WriteLine(string.IsNullOrEmpty(msg) ? "OK" : msg);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in new issue
Block a user