This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

file oriented topic setting

Old posts that have not been replied to for several years.
Locked
d
d-fiant

file oriented topic setting

Post by d-fiant »

Hi

I've tried to make a script which gets the Output of an php-File via Lynx and comparing the String with a saved one out of a local file. If the strings dosn't match each other it sets the new one as topic and save it into the old local file.

The script should check the php every X minutes and run the procedure automatically. In addition it offers a public command to run a nearly identically procedure to set the topic manually.

The second part runs without problems. But the If-Command to check if the files are identically does'nt work and drives me crazy with producing this error message:

wrong # args: no script following "{[strlwr $ttext] == " argument

If you have an idea what produces this error it would be nice if you help me out.

You can find the script here: http://www.rn-c.de/tcl/tztopic-tcl.txt

Tim
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Brackets being the wrong place.

Missing spaces.

New lines in the wrong place.

Tcl doesn't work like C. You can't place a opening body bracket, below the IF statement, the opening bracket must be in the same line.

Also, at the end of your if statments, you are usign a closing bracket, without a space. There msut at least be a space, preferably a newline.
d
d-fiant

Post by d-fiant »

Thank you.
I'll continue to do my best to learn the basics of TCL. I think this script is a good lesson for me! :)

Tim

Btw. now it works! :-)
Locked