[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - MessageBox Question

MessageBox Question

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

MessageBox Question

Postby SFCurley » Thu Sep 30, 2004 5:16 am

I have a script that displays a message box with some information about certain incoming messages. If I'm not sitting at my computer, though, to click "ok", then all other mail processing is halted until I return.

Is there a way to have a message box displayed but not have Poco script get hung-up on it?

Thanks.
SFCurley
 

Postby Pete » Thu Sep 30, 2004 6:55 am

I'm not aware of a direct way. For what it's worth, I would not want PSI to change the current behavior, but of course it would be fine if they gave us a way to choose how the message box behaves.

I don't know what you're trying to report with the message box, but in general, I don't think that message boxes should be used in Incoming filters (except during testing). For example, even if PocoMail did not wait for the user to dismiss the message, what happens if you download 100 messages that generate 100 message boxes?! Of course that's an extreme example, but you get my point.

Have you considered other ways of notifying yourself of the event. Examples: mark the message with color, add a header that you display in a custom column, play a certain sound, write the message to a log file and then open an external application that displays the log file, save a copy of the message to a special mailbox, send yourself a special email, etc, etc.

Also, if you're using WinXP (or perhaps with a version like it), you could use DOS' msg command to display to yourself (or anyone) these message boxes. WinXP will queue them, so each time you click OK it then shows the next one in the queue.
Pete
 

Postby SFCurley » Thu Sep 30, 2004 8:18 am

Duh! Why didn't I think of that. . . the color coding is a great idea. Thanks, Pete.

As an aside, what I'm using this for is to flag messages that the Bayesian filter says are junk from sender in my address book or domains on my safe list, so I know to train the BFs that these are good messages. (Catching false positives that I might otherwise have missed.)
SFCurley
 

Postby Michael » Thu Sep 30, 2004 1:05 pm

Note to others reading this thread, you can use the Help command to display information in a modeless manner.
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby SFCurley » Thu Sep 30, 2004 1:42 pm

What is a "modeless manner"?
SFCurley
 

Postby Michael » Thu Sep 30, 2004 2:58 pm

It won't stop the application while waiting for a response from the user. The help command has a &modal option which defaults to false (in which case the script continues to execute while the window is displayed). Setting the &modal value to True causes the script to pause until the window is closed.
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby SFCurley » Fri Oct 01, 2004 2:37 am

Thanks for that answer, Michael, and thanks to Pete for a better approach than I was using.
SFCurley
 

Postby huntnyc » Fri Oct 29, 2004 2:34 am

Could anyone provide just a simple example of exactly how this should be written to show this type of box perhaps identifying a certain type of mail?

Thank you.

Gary
huntnyc
 

Postby Hogyt » Fri Oct 29, 2004 12:10 pm

I had a play with Help and it looks like it always opens full screen, plus you need to save the contents of the message to a file so it requires a little effort to use.

Another method is to download an external tool that will display the message box for you and then you can call that from within your PocoScript. I found one at:
http://debrock.org/
It's called msgbox and it's only 15k.

If you wish to use it then download it and try the following from a script:
Code: Select all
Execute "c:\\msgbox.exe" "-i:info -t:\"Caption\" \"Hello World\\nNext line of message\""

Change the path to point to wherever you put msgbox. There are some instructions on the site detailing it's parameters.

I hope thats good enough :)
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England

Postby huntnyc » Fri Oct 29, 2004 12:18 pm

Thank you very much. Will look at it and see how it works. Again, thanks.

Gary
huntnyc
 


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 0 guests

cron