This is a tip to avoid the multiple errors problem with HookWindowEvents:

Problem:
If there is an error, which will cause Powerpro to show an error
message, in your HookWindowEvents command list, or in any script
which it calls such as the HookMax script I suggested for Sue,
then the error message dialog is a new window, which is a window event.
Therefore the error message causes HookWindowEvents to be run again,
which causes another error message -- a cycle which repeats forever
until you close Powerpro.

Solutions:
One solution is the "bHookOn" method suggested by Ted in this thread.

Here is a different, much simpler solution:
Whenever you will be changing the HookWindowEvents command list
or editing any scripts which it calls, first run this command:
Exec.OnError("file")

That instructs Powerpro to never show any error dialogs.
Instead it sends each error message to the file ErrorLog.txt
(which is in the same folder as your .pcf).
A file write does not count as a window event; therefore any error
does not create a further error.

After doing your new edits to your Hook things and applying them,
exercise the system by switching, minimising, maximising a few
windows; then have a look at ErrorLog.txt.
IF there is an error in your script, then a new line will be added
to ErrorLog.txt every time there is a window event.
If it keeps growing in size, there is something wrong with your edits,
so fix it. When ErrorLog.txt stops growing in size, you know that
your scripts are working.
Now you can tell Powerpro to go back to its default behaviour
of showing error messages, by running this command once:
Exec.OnError("display")

You could add the two different Exec.OnError commands to one of
your menus, or just run them from the Tiny Run box when needed.

By the way, when Powerpro is quit and restarted the error response
goes back to the default "display".



Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to