[Oberon] Re. simplifying Dialer.DoScript
easlab at absamail.co.za
easlab at absamail.co.za
Thu Sep 9 18:14:08 CEST 2004
Peter E. wrote:
> Here is a question about Dialer.DoScript.
> System.Text in PC Native 05.01.2003 describes the receive
> command of the Dialer script thus.
> " rcv = int string .
> wait up to int seconds for string to be received, abort on failure"
>
> If the string is empty, there is nothing to wait for and nothing
> is received immediately.
>
In ver '2001' (probably the same as your ver) I read:
] script = { snd | rcv | macro } .
] snd = string .
] the specified string is sent to the modem
] rcv = int string .
I've got a problem with this, since 'int string' is a subset of 'string'.
I thought such BNF needed the alternatives to be mutually exclusive ?
I guess the scanner is used to read a 'token', which should be either:
<an integer string>, "USER", "PASSWORD", "CALL" <string>.
Where <string> (using the notation of 'System.Text') is a char-string
other than the other 4 posibilities listed above.
>
> According to the semantic
> specification, the command should have the effect of a
> "continue" statement.
You mean if there's no 'int string' the wait time is zero ?
> In reality the specified time elapses
> and the script aborts.
>
You mean if eg. 'int string' = "8" the scripts aborts unless the
expected action has occured before 8 time units ?
> Mgetty in Linux provides a ringback dialing protocol (google
> "mgetty ringback") which allows a telephone line to be used
> for both voice and modem communications. The initiating
> modem dials, waits for a ring or two, hangs up, waits a few
> seconds and then dials again. mgetty answers the second
> call.
>
> Most modems do not provide a command for pausing
> between two dialings. The existing Dialer does not
> provide a pause.
>
So you need the pause, but can't get if from your modem nor
the dialerscript ?
> The "simple-minded" solution here is to implement a PAUSE
> macro. For example "PAUSE 6" to invoke a 6 second pause.
>
> Alternatively, an empty wait string could invoke a pause.
> Semantically this would be a special case.
>
So you want zero time to be designated by '0', and no 'int string'
to do what ?
> If someone can suggest another approach, I am interested.
> Also, there might be a good argument against pausing for the
> empty wait string.
>
Since there are only about three and a half of us using the
software, you will perhaps have to hack it yourself, as I've had
to do.
If we can consolidate effort in the future, your documentation
will be appreciated.
BTW, since you're looking at this, how would I do the following:
an aquaintance in the neighbouring town, has a WinXX machine
+ modem, but little familiarity. We want to be able to:
I'll dial him, via n-o of course, and download his text
and upload my text. I've got an old DOS based BBS
application, which could do it, but unfortunately he can/will
only use Winxx - cartoon based.
== Chris Glur.
More information about the Oberon
mailing list