Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Run small program every time prompt is displayed

Jan
1
0
I use the command line a lot and I want to run a small command line program that will check my email every time the prompt is printed.

Is there any way to do this?

Thanks

Mark
 
Check out the PRE_INPUT alias. Alternatively you could add an %@EXEC to your PROMPT variable, but I think PRE_INPUT is better.
 
Mark S:
| I use the command line a lot and I want to run a small command line
| program that will check my email every time the prompt is printed.
|
| Is there any way to do this?

Rod Savard:
| Check out the PRE_INPUT alias. Alternatively you could add an
| %@EXEC to your PROMPT variable, but I think PRE_INPUT is better.

PRE_INPUT is performed after the PROMPT variable is used to place
the command line prompt on the screen, thus it is the latest possible
opportunity to generate a "new mail" message. However, none of the
possible methods detects new mail received AFTER the alias PRE_INPUT
is executed, and TCC is just waiting for the next command to be
entered.
If you use TCC and not TCC/LE, you can also use the FOLDERMONITOR
command to display a MSGBOX when any file in the folder containing
your emails is "modified". Probably will need a batch file to make
your report if your mail client is like Outlook Express, which
updates modification times even when no new mail is actually
received, so that you would need to save the filesize each time it is
triggered, and use its changes to detect actual email. If you use
message rules, you may need to make a lot more checks.
--
HTH, Steve
 
Good point, Steve! I use PRE_INPUT to do something each time a prompt is displayed but it's to modify the title bar with the current working directory.
 
Back
Top