mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-12-10 08:51:34 +08:00
Add Run multiple commands at one time
This commit is contained in:
@@ -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