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.

Is there?

Old posts that have not been replied to for several years.
Locked
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Is there?

Post by caesar »

Is there something that chould make my work easier when I'm writing in html files using alot of html code. This *manual* search and add a '\' drives me nuts. Now I found and fix one and another one appears.. seesh. :) Isn't there a easier way to do so?
Once the game is over, the king and the pawn go back in the same box.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I fail to understand where you problem is, and why are you doing a search and replace with / for.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Well, I have to write a html code to tcl file and generate a html page in the end. In the html code are some "'s and to make the tcl work I must put a \ in front of it.

Eg. of html code:

Code: Select all

<META content="foo" name=GENERATOR></HEAD>
and to tcl to make it work should be:

Code: Select all

<META content=\"foo\" name=GENERATOR></HEAD>
Understood now what I meant to say?
Once the game is over, the king and the pawn go back in the same box.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

These are required, otherwise Tcl would interpret it as the end of a arguement.

You can however, suround you argument with curly braces ({}), however, you again have to escape the braces.

Code: Select all

puts $file "Hello to \"ppslim\" {the one and only}"
puts $file {Hello to "ppslim" \{the one and onlu\}}
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Evidently.. seems to be the same thing. I'll think to an alternative/solutin to this cos realy drives me nuts this earching thig :)
Once the game is over, the king and the pawn go back in the same box.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Why don't you put the html in an html file? If all you're doing is a bunch of puts "<blah>blahblah</blah>" then that would be best. If you need to substitute values into it, read in the html template file and use regsub.

Also I don't see what the problem is with ppslim's suggestion of using { }. You rarely use curly brackets in html, so you could do something like

puts {<META content="foo" name=GENERATOR></HEAD>
line 2
line 3
line 4
}

and it would work just fine.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I'll give it a try.. Thank you.
Once the game is over, the king and the pawn go back in the same box.
Locked