You can try this:

Save the following as restartapp.powerpro in your scripts folder. Set
up a hotkey with command:

.restartapp

Use the hotkey when the mouse is over the "hung" window to close and
restart it including parameters.

Might need some tweaking, I haven't tested it very much (and not on
anything actually "hung".

I did try to split up script lines that would get broken by Yahoo/email.

Regards,
Sheri

pipe.listen_off
local apphandle=win.handle("under")
local underapp=win.exename(apphandle)++".exe"
local wmiccommand=?"/c WMIC process WHERE"
local wmiccommand=wmiccommand++?"(name='"++underapp
local wmiccommand=wmiccommand++?"') GET commandline"
local wmiccommand=wmiccommand++?"  > \\.\pipe\Powerpro"
global g_sPipeData
pipe.listen_on("powerpro", 0, "g_sPipeData")
file.runwait(0, env("COMSPEC"), wmiccommand, "", "hide")
pipe.listen_off
win.close(apphandle)
wait.for(50,win.exists(apphandle)==0)
if (win.exists(apphandle))
  win.closeforce(apphandle)
local commandline= ;;+
regex.pcrereplace(?"CommandLine *|\R\s*", ;;+
g_sPipeData,"")
win.debug(commandline)
do(commandline)
pipe.unload
quit


Reply via email to