• [dialog] Is there a script to empty the outbox at a given system time

    From Rudolph Rhein@21:1/5 to All on Mon Nov 14 18:44:44 2022
    Sometimes I want to send articles at a certain time, such as timed announcements.

    I have to set an alarm on my phone to remember to send them.

    Is there any known script that will send all the messages in the dialog
    outbox at a given system time?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bernd Rose@21:1/5 to Rudolph Rhein on Mon Nov 14 23:21:59 2022
    On Mon, 14th Nov 2022 18:44:44 +0200, Rudolph Rhein wrote:

    Is there any known script that will send all the messages in the dialog outbox at a given system time?

    Actually, you need 2 scripts.

    One is an Event script, that will send all messages, when a timer triggers. Which timer of the two predefined ones you use depends on, which isn't used
    for anything else during the time span, your send-timer runs.

    ------------------------------------------------------------------------------ Program OnTimer1;
    Procedure OnTimer1;
    Begin
    ADo('SendAllInOutbox');
    // You probably want to execute SendAll only once
    timer1.enabled := false;
    End;
    Begin
    End. ------------------------------------------------------------------------------

    The second script is necessary to initiate and start the timer. It can be
    part of a larger script, that executes other tasks, as well. (For instance OnStartup.) Or it can be a small Custom script. Question is, how to initiate the timer: You can hard-code a time-span or a certain time, use a time value written in a text file, query the value runtime as input,... Some of these approaches are fairly simple, some quite sophisticated. I'll show the most simple one, using a hard-coded time span of 2 hours in a Custom script. This script could be assigned to a button or a hotkey.

    ------------------------------------------------------------------------------ Program SetSendAllTimer;
    Const
    TimeHours = 2;
    Begin
    With Timer1 Do
    Begin
    // Timer expects value in ms
    Interval := 1000 * 60 * 60 * TimeHours;
    Enabled := True;
    End;
    End. ------------------------------------------------------------------------------

    If you know, what approach you need, we can discuss changes or alternative methods.

    HTH.
    Bernd

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)