1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Run small program every time prompt is displayed

Discussion in 'TCC/LE Support' started by MarkS, Aug 10, 2010.

  1. MarkS

    Joined:
    Jan 16, 2010
    Messages:
    1
    Likes Received:
    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
     
  2. Rod Savard

    Joined:
    May 26, 2008
    Messages:
    481
    Likes Received:
    3
    Check out the PRE_INPUT alias. Alternatively you could add an %@EXEC to your PROMPT variable, but I think PRE_INPUT is better.
     
  3. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    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
     
  4. Rod Savard

    Joined:
    May 26, 2008
    Messages:
    481
    Likes Received:
    3
    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.
     

Share This Page