Thread View: news.software.readers
6 messages
6 total messages
Started by Nevans
Fri, 04 Feb 2005 21:21
[Dialog] Script using zRas.ds Include File won't compile
Author: Nevans
Date: Fri, 04 Feb 2005 21:21
Date: Fri, 04 Feb 2005 21:21
32 lines
2000 bytes
2000 bytes
Dialog 2.0.14.1 (beta 37)
I've been using Dialog for well over a year and am now trying to add
code to both my OnStartup and OnTimer1 scripts to check for an active
internet connection before the program tries to download anything from
my subscribed newsgroups. I'm following the instructions at
http://www.40tude.com/dialog/wiki/index.php/HandleDialupConnections
and have added the line:
($I zras.ds)
plus corresponding code to my OnStartup script. But when I compile the
script, it looks like there is a problem in the zRas Include file
because I get the following error:
Failed when compiling
[Error] zRas.ds(27:26): Syntax error
Here is the line in question (which doesn't seem syntactically different
to me than the line preceding it):
szPhoneNumber: array[[0..128]] of Char;
I created the file zRas.ds by copying the include's code from
http://www.40tude.com/dialog/wiki/index.php/ScriptzRas
into Notepad and saving zRas.ds in Dialog's Scripting/Custom folder.
I hope one of you Dialog experts can help!
Thanks,
Nevans
Re: [Dialog] Script using zRas.ds Include File won't compile
Author: Nevans
Date: Fri, 04 Feb 2005 21:27
Date: Fri, 04 Feb 2005 21:27
69 lines
2745 bytes
2745 bytes
On Fri, 4 Feb 2005 15:21:56 -0600, Nevans wrote in
<news:1mdz8f1zmfuu5$.dlg@ID-200090.user.uni-berlin.de>:
> Dialog 2.0.14.1 (beta 37)
>
> I've been using Dialog for well over a year and am now trying to add
> code to both my OnStartup and OnTimer1 scripts to check for an active
> internet connection before the program tries to download anything from
> my subscribed newsgroups. I'm following the instructions at
> http://www.40tude.com/dialog/wiki/index.php/HandleDialupConnections
>
> and have added the line:
>
> ($I zras.ds)
>
> plus corresponding code to my OnStartup script. But when I compile the
> script, it looks like there is a problem in the zRas Include file
> because I get the following error:
>
> Failed when compiling
> [Error] zRas.ds(27:26): Syntax error
>
> Here is the line in question (which doesn't seem syntactically different
> to me than the line preceding it):
>
> szPhoneNumber: array[[0..128]] of Char;
>
> I created the file zRas.ds by copying the include's code from
> http://www.40tude.com/dialog/wiki/index.php/ScriptzRas
> into Notepad and saving zRas.ds in Dialog's Scripting/Custom folder.
>
> I hope one of you Dialog experts can help!
>
> Thanks,
> Nevans
I guess I should have provided my OnStartup script:
program OnStartup;
uses Forms;
{$I zRas.ds}
var connection: LongWord;
procedure OnStartup;
begin
// check, if already connected
connection := RasGetConnection();
if connection = 0 then begin
// no connection, so script exits
exit;
end;
ADo('GetNewHeadersInSubscribedGroups'); //Gets new headers at startup
//NEWS
timer1.interval:=60000*47; //every 47 minutes
timer1.enabled:=true;
end;
begin
end.
Re: [Dialog] Script using zRas.ds Include File won't compile
Author: Nevans
Date: Fri, 04 Feb 2005 23:59
Date: Fri, 04 Feb 2005 23:59
51 lines
2792 bytes
2792 bytes
On Fri, 4 Feb 2005 15:21:56 -0600, Nevans wrote in <news:1mdz8f1zmfuu5$.dlg@ID-200090.user.uni-berlin.de>: > Dialog 2.0.14.1 (beta 37) > > I've been using Dialog for well over a year and am now trying to add > code to both my OnStartup and OnTimer1 scripts to check for an active > internet connection before the program tries to download anything from > my subscribed newsgroups. I'm following the instructions at > http://www.40tude.com/dialog/wiki/index.php/HandleDialupConnections > > and have added the line: > > ($I zras.ds) > > plus corresponding code to my OnStartup script. But when I compile the > script, it looks like there is a problem in the zRas Include file > because I get the following error: > > Failed when compiling > [Error] zRas.ds(27:26): Syntax error > > Here is the line in question (which doesn't seem syntactically different > to me than the line preceding it): > > szPhoneNumber: array[[0..128]] of Char; > > I created the file zRas.ds by copying the include's code from > http://www.40tude.com/dialog/wiki/index.php/ScriptzRas > into Notepad and saving zRas.ds in Dialog's Scripting/Custom folder. > > I hope one of you Dialog experts can help! > > Thanks, > Nevans I found a solution via Thomas Barghahn's post in Message-ID: <cl6c74$896$03$1@news.t-online.com> on newsgroup de.comm.software.40tude-dialog from October 20, 2004. I took Thomas's script zRasXDemo.ds from the above message and created my own zRas.ds include file by removing the "script" portions from the script. My OnStartup and OnTimer1 scripts compiled successfully and work. Now, Dialog only tries to connect to newsservers when a dialup connection is present. When no dialup connection is present, nothing happens. Result: no more needless "can't connect" error messages. Yay! Nevans
Re: [Dialog] Script using zRas.ds Include File won't compile
Author: Nevans
Date: Sat, 05 Feb 2005 04:28
Date: Sat, 05 Feb 2005 04:28
57 lines
3153 bytes
3153 bytes
On Fri, 4 Feb 2005 15:21:56 -0600, Nevans wrote in <news:1mdz8f1zmfuu5$.dlg@ID-200090.user.uni-berlin.de>: > Dialog 2.0.14.1 (beta 37) > > I've been using Dialog for well over a year and am now trying to add > code to both my OnStartup and OnTimer1 scripts to check for an active > internet connection before the program tries to download anything from > my subscribed newsgroups. I'm following the instructions at > http://www.40tude.com/dialog/wiki/index.php/HandleDialupConnections > > and have added the line: > > ($I zras.ds) > > plus corresponding code to my OnStartup script. But when I compile the > script, it looks like there is a problem in the zRas Include file > because I get the following error: > > Failed when compiling > [Error] zRas.ds(27:26): Syntax error > > Here is the line in question (which doesn't seem syntactically different > to me than the line preceding it): > > szPhoneNumber: array[[0..128]] of Char; > > I created the file zRas.ds by copying the include's code from > http://www.40tude.com/dialog/wiki/index.php/ScriptzRas > into Notepad and saving zRas.ds in Dialog's Scripting/Custom folder. > > I hope one of you Dialog experts can help! > > Thanks, > Nevans I'm really having fun talking to myself! In the original version of zRas.ds include file mentioned above, it looks like the problem is that a bunch of lines have double brackets [[ and ]] instead of single brackets [ and ]. I changed all double brackets to single brackets (there were quite a few), compiled the two scripts, and things are working for me with the "modified original" zRas.ds include file. I'm thinking that http://www.40tude.com/dialog/wiki/index.php/ScriptzRas could (should?) be changed but I'm leary of saying that is the case. I am a mainframe programmer and do not know the language used in these scripts. Just because the one function I access from the include file works does not mean that every other function will work properly. They are syntactically correct because my scripts compile. But... are they functionally correct? What do you Dialog scripting experts think? Thanks, Nevans
Re: [Dialog] Script using zRas.ds Include File won't compile
Author: MLC
Date: Sat, 05 Feb 2005 12:50
Date: Sat, 05 Feb 2005 12:50
16 lines
1939 bytes
1939 bytes
_Nevans_, sabato 05/feb/2005: > I'm thinking that http://www.40tude.com/dialog/wiki/index.php/ScriptzRas > could (should?) be changed but I'm leary of saying that is the case. I > am a mainframe programmer and do not know the language used in these > scripts. Just because the one function I access from the include file > works does not mean that every other function will work properly. They > are syntactically correct because my scripts compile. But... are they > functionally correct? You're right, Nevans, those double brackets must be a Wiki glitch I've seen other times. As you said, correcting them the script works well. So, if you go there and edit the page you'll be a meritorious guy :-) -- Maria Luisa C - 05/02/2005 13.45.05
Re: [Dialog] Script using zRas.ds Include File won't compile
Author: Nevans
Date: Thu, 10 Feb 2005 23:32
Date: Thu, 10 Feb 2005 23:32
55 lines
3134 bytes
3134 bytes
On Fri, 4 Feb 2005 22:28:08 -0600, Nevans wrote in <news:19lnrg58re2mi.dlg@ID-200090.user.uni-berlin.de>: > On Fri, 4 Feb 2005 15:21:56 -0600, Nevans wrote in > <news:1mdz8f1zmfuu5$.dlg@ID-200090.user.uni-berlin.de>: > >> Dialog 2.0.14.1 (beta 37) >> >> I've been using Dialog for well over a year and am now trying to add >> code to both my OnStartup and OnTimer1 scripts to check for an active >> internet connection before the program tries to download anything from >> my subscribed newsgroups. I'm following the instructions at >> http://www.40tude.com/dialog/wiki/index.php/HandleDialupConnections >> >> and have added the line: >> >> ($I zras.ds) >> >> plus corresponding code to my OnStartup script. But when I compile the >> script, it looks like there is a problem in the zRas Include file >> because I get the following error: >> >> Failed when compiling >> [Error] zRas.ds(27:26): Syntax error >> >> Here is the line in question (which doesn't seem syntactically different >> to me than the line preceding it): >> >> szPhoneNumber: array[[0..128]] of Char; >> >> I created the file zRas.ds by copying the include's code from >> http://www.40tude.com/dialog/wiki/index.php/ScriptzRas >> into Notepad and saving zRas.ds in Dialog's Scripting/Custom folder. >> >> I hope one of you Dialog experts can help! >> >> Thanks, >> Nevans > > I'm really having fun talking to myself! > > In the original version of zRas.ds include file mentioned above, it > looks like the problem is that a bunch of lines have double brackets [[ > and ]] instead of single brackets [ and ]. I changed all double > brackets to single brackets (there were quite a few), compiled the two > scripts, and things are working for me with the "modified original" > zRas.ds include file. > > I'm thinking that http://www.40tude.com/dialog/wiki/index.php/ScriptzRas > could (should?) be changed .... In case anyone needs it, just wanted to feedback here the script was edited today to remove the extraneous brackets. Nevans
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads