Sending that command to cmd.exe wouldn't help you, as soldatserver.exe is different from cmd.exe.
I have no idea if - by any chance - it would be possible to run the soldatserver.exe with all required params - something like "run soldatserver.exe -<switches> <your parameters/commands>".
Another sollution may be using 2 aliases (that I didn't create but found
here - dunno who originally created them), that should allow you to
1) make soldatserver.exe the active application (if it ain't already) via "/appactivate soldatserver.exe"
and then
2) send a string of keystrokes to that window, i.e.: enter and execute the kick command: "/sendkeys <your kick command here>{ENTER}"
In addition a third alias (a modification of a $proc alias by
myggan ), to see if a specific process is running: if ($isrun(soldatserver.exe) == $true)
on *:text:!kick*:#yourchannel:{
if ($2 isop $chan) { notice $nick Ops cannot be kicked. }
elseif ($2 !ison $chan) { notice $nick $2 is not at $chan $+ . }
elseif (!$3) { notice $nick Syntax Error: !kick <name> <reason> }
else {
kick $chan $2-
if ($isrun(soldatserver.exe) == $true) {
appactivate soldatserver.exe
sendkeys /kick $2- $+ {ENTER}
notice $nick $2 has been kicked out of the game.
}
else { notice $nick soldatserver isn't running. }
}
}
alias -l sendkeys { .comopen a WScript.Shell | .comclose a $com(a,SendKeys,3,*bstr,$$1-) }
alias -l appactivate { .comopen a WScript.Shell | .comclose a $com(a,AppActivate,3,*bstr,$$1-) }
alias -l isrun {
if (($isid) && ($1 != $null)) {
if ($com(isrun_a)) { .comclose isrun_a }
if ($com(isrun_b)) { .comclose isrun_b }
.comopen isrun_a WbemScripting.SWbemLocator
if (!$com(isrun_a)) { return }
.comclose isrun_a $com(isrun_a,ConnectServer,3,dispatch* isrun_b)
if (!$com(isrun_b)) { return }
.comclose isrun_b $com(isrun_b,ExecQuery,3,string,SELECT ProcessId FROM Win32_Process WHERE Name = $qt($1) $+ ,dispatch* isrun_a)
if (!$com(isrun_a)) { return }
noop $com(isrun_a,Count,3)
var %return = $iif(($com(isrun_a).result),$true,$false)
.comclose isrun_a
return %return
}
}Edit: changed the output to notices