[REBOL] Re: Community (was IOS).
From: brett:codeconscious at: 22-Mar-2002 10:27
Hi Gregg,
Nice demo. I was chuffed to see vid-notes mentioned too :^)
I just want to draw out of your example that you can start View using a
command line switch to specify a specific script. So
one does not need View/Pro to start a specific script as long as you have
something that can call other programs.
The other thing is I'd like to help ensure the example works on various of
installations. So I modified it to use path-thru and
urls. Modified script below.
Regards,
Brett
REBOL []
rebol-exe: to-string to-local-file system/options/boot
to-call-str: func [f [file!]] [to-string to-local-file f]
run-script: function [url] [file] [
if exists? file: path-thru url [
call rejoin [rebol-exe " " to-local-file file]
]
]
run: func [cmd /in dir] [
if in [change-dir dir]
call cmd
]
view lay: layout [
origin 0x0
backdrop sky effect [gradcol 0x1 80.80.80 32.32.32]
space 6x0
style ctl vtext
ctl "View Ref" [run-script http://www.rebol.com/view/docs/view-ref.r]
ctl "Easy VID" [run-script http://www.rebol.com/view/demos/easy-vid.r]
ctl "VID Notes" [run-script
http://www.codeconscious.com/rebsite/vid-notes.r]
ctl "Easy Draw" [run-script
http://www.nwlink.com/~ecotope1/reb/easy-draw.r]
ctl "Core" [run/in to-call-str %/c/rebol/_core/rebol %/c/rebol/_core/]
ctl "View" [call to-call-str system/options/boot]
ctl "Shell" [call "cmd.exe"]
ctl "Quit" [quit]
]