"Sheri" wrote:
> I believe win.getprocessid takes a handle, not a caption list, e.g.,
> win.getprocessid(win.handle("caption-list"))
Noted.
> How to process a selection? Messagebox returns a result. For a YesNo
> messagebox, if 6 is returned, Yes was selected. So you can have logical
> processing based on the response to the messagebox.
>
> How to kill the process? You can try window.close("=Opera"). If that doesn't
> totally work, add win.terminateprocess(pid).
>
> To restart Opera, you would add do("path/to/Opera/opera.exe").
The close/start I know how to do it, I just thought that a "restart"
command was available.
> I would suggest to do the whole thing in one script. That script could have
> functions to launchevent, makeevent, destroyevent, testlimit and
> querywmiprocess. You should test it before adding it to autorun by launching
> launchevent yourself for awhile. Launchevent could have arguments for input
> handle, memory limit, and interval for testing. While testing it, the input
> handle could be win.handle("=Opera"). e.g.
>
> .myscr...@launchevent(win.handle("=Opera"), 50000, 120)
>
> When you eventually run it from the Autorun command list, the command entry
> could be:
>
> .myscr...@launchevent(win.handle("autorun"), 50000, 120)
>
I'll work on that and see how it goes.
Thanks.