Reading header fields...
[1/3] from: chris::starforge::demon::co::uk at: 12-Feb-2001 10:19
Hi,
I've got no idea if this is possible but is there
a way to read the contents of a script's header from
the script itself without having to read in a copy
and pull the details out by hand? I need to write a
script that can display it's version and title in a
html page it generates....
Chris
--
New sig in the works
Explorer2260 Designer and Coder
http://www.starforge.co.uk
[2/3] from: mike:myers:cybarite at: 12-Feb-2001 7:33
Chris,
To get values from the main script use system/script/header/ then the label
e.g
system/script/header/title
system/script/header/author
In view, you might do:
REBOL [
History: "Repeats Itself"
Author: [mike--myers--cybarite--com]
Date: 12-February-2001
]
view layout [size 800x600 across
h1 form system/script/header/date
return h2 form system/script/header/history
return h2 form system/script/header/author]
You can add your own documentation values to the standard header formats.
It might be a good idea to use the base that Carl uses.
[mike--myers--cybarite--com]
[3/3] from: chris:starforge:demon at: 12-Feb-2001 12:42
Mike Myers wrote:
> To get values from the main script use system/script/header/ then the label
>
> e.g
>
> system/script/header/title
> system/script/header/author
Thanks very much :)) One of these day I'll have to take an extended
look at all the stuff going on in system...
Chris
--
New sig in the works
Explorer2260 Designer and Coder
http://www.starforge.co.uk