[EMAIL PROTECTED] wrote/ schreef:
> In a recent posting regarding displaying a Word file Sjoerd wrote:
>
>> set the HTMLText of field "doc" to url "file:/Mac HD/Docs/MyDoc.html"
>> or
>> set the HTMLText of field "doc" to url "file:C:/Docs/MyDoc.htm"
>>
>>> replace " " with "%20" in localPage
>> Ouch! I think you'd better use:
>> put urlEncode(localPage) into localPage
>>
>> 1) You could also replace a space by "+"
>> 2) The urlEncode function does also convert chars like � and �
>>
>> Hope this helps,
>
> This came as a bit of a surprise, because I didn't know HTMLText could be
> set as an url. [My excuses being that I've only just got interested in that
> sort of thing, and in the index the HTMLText example only uses a string]
Ho! Wait a minute! This commands uses 2 techniques you could also use
everywhere else:
1) The HTMLtext property
2) the url as a container. This means you can also do
answer url "file:C:/test.txt" -- answers the text in file "test.txt"
--or
beep url "file:C:/times.txt" times -- beeps the number of times specified
in file "times.txt"
--or
put url "http://www.whatever.com/images/test.gif" into image "ball" --
because an image is also a container and you could use internet urls
-- or
put field "text" into url "file:c:text.txt" -- because you can also write
> When I started playing with it, I initially had no luck. No error messages,
> or anything specifically discouraging, just a barely perceptible flash. Of
> course, I hadn't specified the URL correctly. A no such file message would
> be handy.
Mmm, I don't know exactly how this works, but if you put something into a
non- existing url, the file is made, so in fact every url exist, but some
(most) of them are empty. So you could check whether the url you're playing
with is empty.
> Also, what is the "file: prefix for? Or, more specifically, what else could
> it be?
An url is build like this:
scheme://host.domain[:port]/path/filename
Scheme is one of these:
file a file on you local system (leave out the thing before path)
ftp a file on an FTP server
http a file on a World Wide Web server
gopher a file on a Gopher server
WAIS a file on a WAIS server
news a Usenet newsgroup
telnet a connection to a Telnet- based service
Examples:
file:C:/test.txt
ftp://ftp.metacard.com/MetaCard/2.3/Win32.zip
http://www.metacard.com/get.html
> If you use HTML text, can you use hot text a la MC using group? It
> is still available in the menu, but seemed to do strange things when I tried
> it (jumped from the selected text to the top of the page)
Do you know a bit of HTML? MetaCard doesn't support all official HTML tags,
but these it does: (a tag: <tagname
attrtibute="parameter">content</tagname>)
<B> -- for bold text
<P> -- for a paragraph
<I> -- for italic text
<U> -- for underlined text
<GROUP> -- for grouped text
<FONT face="fontname" color="textcolor"> -- for a special font
An example: (set the htmlText of a field to this)
Normal text
<P>This is <B>bold</B>, or <I>italic</I>, or <U>underlined</U>, or
<U><B><I>all</I></B></U>
<P>This is text in <FONT face="Times New Roman">Times New Roman</FONT>
<P>This is <GROUP>grouped</GROUP> text
<P>This is <FONT color="#FF0000">red</FONT> text
> The usual apologies for the naive questions.
No need to
> David Glasgow
Hope this helps,
Sjoerd
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.