'launch and scripts running other scripts.
[1/14] from: reboler:programmer at: 19-Dec-2001 23:07
If I enter the following at the REBOL console, then the button works.
view layout [button [launch %feedback.r]]
If I save this as a REBOL script, and run it, then the button doesn't work.
Seems like a bug to me. If this is a security issue then 'launch could be configured
to always 'ask?
Anyway, I would like to be able to run a script that has, as one part, something similar
to the above.
I cannot use "'do script", because then the original script exits and the script designated
by 'script runs.
I have tried various combinations of
script: load file (or load/next or load/all)
view/new script (or view/new layout [do script])
Or even
parse file [from 'layout copy script to 'view]
script: layout script
view/new script
Nothing seems to work.
*** Perhaps I should try some sort of face/pane operation? But I would still need some
way to interactively layout the script and then "view/new script". ***
*** Please, I need ideas on how to run an arbitrary script from a View face button, while
keeping the original face open.*** (I am choosing the script from a text-list)
Essentially, I want a View script that will interactively run other scripts while remaining
open. 'launch is almost what I need.
Any ideas?
BTW: the following works when I enter simple text into the field, such as "area" or "text
{trial field} field"
view layout [f: field button [view/new layout to-block f/text]]
[2/14] from: jasonic:cunliffe:verizon at: 19-Dec-2001 11:58
Alan
I tried 'launch and it works for me. I wrote a launch-test.r script:
REBOL []
view layout [
button "imagine" [launch %imagine.r]
button "quit" [unview/all]
]
My %imagine.r does a number of things, so is a good test I think: uses
request-file to select a PNG file, then extract and execute an embedded
rebol script, opening another window printing the output if the embedded
script if needs be. The nice thing is I can keep on doing this as long as I
liek becuase launch-test gui is just sitting their independently :-) Just
what I think we both needed.
That is how it behaves when I run it from within the _same_ directory it
starts from:
do %launch-test.r
But when I move it somewhere else in the directory structure, for example:
do %../tools/launch-test.r
then I do have a obvious problem. REBOL/View looks for a REBOL installation
in ../tools directory and if it does not find it, then throws up its
installation GUI [the first time]. The next time it will run dierctly as it
finds rebol.exe in ../tools.
This behavior is something generally I still don't understand about
REBOL/View [Win98se]. Namely why and when REBOL/View plants more versions of
rebol.exe all over the file structure. I don't know if my config is damaged,
or if there is a simple refinement or script param needed to avoid this.
I hope this is some help to you, and that we both get sorted soon.
cheers
./Jason
----- Original Message -----
From: "alan parman" <[reboler--programmer--net]>
To: <[rebol-list--rebol--com]>
Sent: Wednesday, December 19, 2001 10:07 AM
Subject: [REBOL] 'launch and scripts running other scripts.
> If I enter the following at the REBOL console, then the button works.
>
> view layout [button [launch %feedback.r]]
>
> If I save this as a REBOL script, and run it, then the button doesn't
work.
> Seems like a bug to me. If this is a security issue then 'launch could be
configured to always 'ask?
[...snip...]
[3/14] from: greggirwin:mindspring at: 19-Dec-2001 10:17
Hi Alan,
<<
If I enter the following at the REBOL console, then the button works.
view layout [button [launch %feedback.r]]
If I save this as a REBOL script, and run it, then the button doesn't work.
>>
It works fine for me here. I just put this in a file and double-clicked it
(I'm running under W2K).
REBOL []
view layout [button [launch %feedback.r]]
Are you doing something else?
--Gregg
[4/14] from: reboler:programmer at: 20-Dec-2001 2:50
Please pardon me if this is a repeat, I don't think the first one went through.
----------------------------------
If I enter the following at the REBOL console, then the button works.
view layout [button [launch %feedback.r]]
If I save this as a REBOL script, and run it, then the button doesn't work.
Seems like a bug to me. If this is a security issue then 'launch could be configured
to always 'ask?
Anyway, I would like to be able to run a script that has, as one part, something similar
to the above.
I cannot use "'do script", because then the original script exits and the script designated
by 'script runs.
I have tried various combinations of
script: load file (or load/next or load/all)
view/new script (or view/new layout [do script])
Or even
parse file [from 'layout copy script to 'view]
script: layout script
view/new script
Nothing seems to work.
***Perhaps I should try some sort of face/pane operation? But I would still need some
way to interactively layout the script and then "view/new script".***
*** Please, I need ideas on how to run an arbitrary script from a View face button, while
keeping the original face open.*** (I am choosing the script from a text-list)
Essentially, I want a View script that will interactively run other scripts while remaining
open.
BTW: the following works when I enter simple text into the field, such as "area" or "text
{trial field} field"
view layout [f: field button [view/new layout to-block f/text]]
[5/14] from: reboler:programmer at: 20-Dec-2001 2:54
Please pardon me if this is a repeat, I don't think the first one went through.
-----
If I enter the following at the REBOL console, then the button works.
view layout [button [launch %feedback.r]]
If I save this as a REBOL script, and run it, then the button doesn't work.
Seems like a bug to me. If this is a security issue then 'launch could be configured
to always 'ask?
Anyway, I would like to be able to run a script that has, as one part, something similar
to the above.
I cannot use "'do script", because then the original script exits and the script designated
by 'script runs.
I have tried various combinations of
script: load file (or load/next or load/all)
view/new script (or view/new layout [do script])
Or even
parse file [from 'layout copy script to 'view]
script: layout script
view/new script
Nothing seems to work.
***Perhaps I should try some sort of face/pane operation? But I would still need some
way to interactively layout the script and then "view/new script".***
*** Please, I need ideas on how to run an arbitrary script from a View face button, while
keeping the original face open.*** (I am choosing the script from a text-list)
Essentially, I want a View script that will interactively run other scripts while remaining
open.
BTW: the following works when I enter simple text into the field, such as "area" or "text
{trial field} field"
view layout [f: field button [view/new layout to-block f/text]]
[6/14] from: ammonjohnson:y:ahoo at: 19-Dec-2001 15:42
<snip>
.
> This behavior is something generally I still don't understand about
> REBOL/View [Win98se]. Namely why and when REBOL/View plants more versions
of
> rebol.exe all over the file structure. I don't know if my config is
damaged,
> or if there is a simple refinement or script param needed to avoid this.
</snip>
I also have this problem, but NOT with /View, with /Command. Why??
Thanks!!
Ammon
[7/14] from: hijim:pronet at: 20-Dec-2001 17:34
I tried the script you posted (with my own programs), but when I ran it, I
got a REBOL Dialog box that says "Launch can only be used by launcher
programs." The dialog box has an OK button. I don't get an error.
I haven't read all of the posts on this subject. What did I miss? This would
be a great way to collect all my programs into a menu.
Thanks,
Jim
REBOL []
view layout [
button green / 1.8 "Registers" [launch %registers.r]
button green / 1.8 "Text Editor" [launch %ed-70.r]
button red "Quit" [unview/all]
]
----- Original Message -----
From: Jason Cunliffe <[jasonic--cunliffe--verizon--net]>
To: <[rebol-list--rebol--com]>
Cc: <[reboler--programmer--net]>
[8/14] from: nitsch-lists:netcologne at: 21-Dec-2001 3:23
RE: [REBOL] Re: 'launch and scripts running other scripts.
if you start rebol to run a script, launch is disabled after %user.r finishs.
you have to go to console and start script from there by hand.
seems its more meant to be an internal function for desktop
than a general tool.
-Volker
[hijim--pronet--net] wrote:
[9/14] from: jasonic:cunliffe:verizon at: 19-Dec-2001 20:07
> > This behavior is something generally I still don't understand about
> > REBOL/View [Win98se]. Namely why and when REBOL/View plants more
versions
> of
> > rebol.exe all over the file structure. I don't know if my config is
> damaged,
> > or if there is a simple refinement or script param needed to avoid this.
> </snip>
>
> I also have this problem, but NOT with /View, with /Command. Why??
Hi Ammon
correction: I _am_ using /Command/View
I do get them confused all the time, since it is hard to detect the
difference between /View and /Command unless one is usign the extra
features. Yes there is boot list of extra /Comamnd functions, but that soon
recedes into sheel history.
The fact your are having trouble too makes me less paranoid.. One of the
most annoying things is the way it blindly creates the REBOL family of
sub-folders. Not only is this an ironic waste of space [Rebol is rightly
proud of its small footprint], but it @#$! confusing, espxecially to
beginners. It also represents a big security threat on a server, where one
might unintentioanlly end up with core executables in exposed places!
I guess an antidote could be to write a little %sniff-rebol.r script to do
routine cleanup of thus bug/feature. If it is a feature I wish there was
decent README on it. It is really my #1 concern about distibuting REBOL/View
programs to end-users, until I underatndn adn can control/prevent this
accidental behaviour. If it is only a /Command/View problem, then I am less
worried.
Any ideas how to clear this mess up?
Is it only a Windoze effect?
./Jason
[10/14] from: jasonic:cunliffe:verizon at: 21-Dec-2001 0:35
> RE: [REBOL] Re: 'launch and scripts running other scripts.
> if you start rebol to run a script, launch is disabled after %user.r
finishs.
> you have to go to console and start script from there by hand.
> seems its more meant to be an internal function for desktop
> than a general tool.
Thanks..
..damn yeah that's true :-(
I guess the answer is to copy easy-vid:
/rebol/view/public/www.reboltech.com/library/scripts/easy-vid.r
That works for the parts which don't need a shell window open
Any other ideas?
./Jason
[11/14] from: ammonjohnson:yah:oo at: 31-Dec-2001 19:55
I actually think that it is a CGI special, but that is just what I think.
;-) It doesn't do with /view or /core so...
Enjoy!!
Ammon
[12/14] from: bzr:francenet at: 1-Jan-2002 9:10
Hi,
The macintosh version of rebol/view also insists on
creating FIVE copies of the executable the first
time it runs. It is very irritating, and I cannot
find any reason for doing that. If you try to delete
them, they are automatically re-created at the
next run.
The unix version has another ennoyance. When it
runs for the first time, it apparently wants to
rewrite the executable file. It is OK if you
have your own version of the program, but if you install
rebol in a well known directory (/bin or /usr/bin
for example) for a public usage, rebol stops
and complains about the rebol file being not
found or not writable.
RT says that rebol is very easy to install, just
copy and run, but I do not agree. There seems to
be a lot of unnecessary complicated things
going on in our back, and there is not explanation
of them anywhere.
It is a pity because rebol is really a great
language which I try to promote in my company,
but I need arguments to refute criticisms against
this strange behaviour.
[13/14] from: holger:rebol at: 1-Jan-2002 10:43
On Tue, Jan 01, 2002 at 09:10:08AM +0100, Jean-Francois BOUZEREAU wrote:
> Hi,
> The macintosh version of rebol/view also insists on
<<quoted lines omitted: 3>>
> them, they are automatically re-created at the
> next run.
This is necessary in order to support "launch". Unfortunately
MacOS does not allow an application to run multiple processes
from the same binary, so REBOL/View needs to duplicate the binary
a few times in order to allow more than REBOL/View process to run
simultaneously.
> The unix version has another ennoyance. When it
> runs for the first time, it apparently wants to
<<quoted lines omitted: 4>>
> and complains about the rebol file being not
> found or not writable.
This will be improved in the next version. Again, the
reason is launch. For that REBOL/View needs to know where it is
installed. At the moment the file that contains that
information is ~/.rebol, in the user's home directory. If
that file does not exist then REBOL/View assumes it has not been
installed and attempts to copy the binary over to the
installation directory.
We realize this does not work well in the kind of
situation you describe. There should probably be a
file /etc/rebol.rc that contains the same kind of
information as ~/.rebol, but system-wide, in situation
where REBOL/View is installed by an administrator.
Just for completeness: the installation information for
Windows is contained in the Windows registry. For
AmigaOS it is in L:.rebol
> RT says that rebol is very easy to install, just
> copy and run, but I do not agree.
For /Core. For /View the situation is different because
of features such as "launch".
--
Holger Kruse
[holger--rebol--com]
[14/14] from: bzr:francenet at: 2-Jan-2002 14:33
Holger,
Thank you for the informations about the launch process.
Now that I see the full picture, I think I will encapsulate
the rebol command into a shell script , in order to check for
the existence of the .rebol file in the current user's directory,
and set the environment expected by rebol, whenever it
doesnt exist yet.
Cheers
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted