Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Solution: Launch Programs from REBOL/View

 [1/13] from: jsc::dataheaven::de at: 28-Sep-2000 7:20


I've found a solution to launch programs easily from REBOL/View. the Solution is pretty simple but would only work under UN*X/Linux. Now I'am not sure if I should make it public... Regards Jochen

 [2/13] from: gschwarz:netconnect:au at: 28-Sep-2000 16:31


Please Do........ (If only it does not effect the amount of work going your way)

 [3/13] from: jsc:dataheaven at: 28-Sep-2000 7:57


My first Idea was to use the "browse" function: you can say: browse "http://www.rebol.com" and if your system is properly configured a web-browser will pop-up. Under UN*X REBOL/View is using netscape. So netscape will be startetd by following command triggered through REBOL: /usr/local/bin/netscape -remote "openURL(http://www.rebol.com, new-window)" but if you use browse _this_ way: browse "myapp par1 par2 par3" it will try following: /usr/local/bin/netscape -remote "openURL(myapp par1 par2 par3, new-window)" What we would have to do, is to replace netscape by a simple shell-script that cuts out the URL part of the command args and then launches the application therein. Some minutes ago I'd another Idea that enables us to run programs with all REBOL-releases. (I don't no why nobody else had the idea) In the REBOL-Library lies a cute little script namely "little-bell.r" This script implements a little telnet-client. By using this code we are able to launch programs on all computers that have telnet access!!! Regards Jochen

 [4/13] from: dado:slovkaufring:sk at: 28-Sep-2000 8:02


> This script implements a little telnet-client. By using this code we are able > to launch programs on all computers that have telnet access!!!
Oh, great... I know of many workarounds, but hey, give me break. Isn't this great that we can call a telnet client or do a wrap around client/server (like telnet, but specialized only for this purpose) for calling one single OS system call? This should be in REBoL. Just like the open "listen" "write" "read", these are basically system calls. We need execute/spwan and/or "fork" and have many things that we could stop complaining about for quite some time. I know Carl wanted to implement it in different way (to have task! and stuf) but this wouldn't break that schema, I believe... Well, whatever... Jano

 [5/13] from: rebol:techscribe at: 27-Sep-2000 23:15


Hi Jochen, I previously had a similar idea regarding browse. I'm not quite sure (wanted to first check into it, but I haven't had time yet, however since you raised the issue ...) don't browsers support mime types, and can't exe mime types be used to launch an executable via the browser? Isn't that how browsers automate the process of unpacking executable archives (at least under MS Windows)? So - at least under windows - you should be able to send the browser the executable with an exe mime type, thereby instructing the browser to execute the application. I'm not sure that'll work ... Your second idea is cute ;-). That one didn't occur to me ...

 [6/13] from: jsc:dataheaven at: 28-Sep-2000 8:26


On Thu, 28 Sep 2000, you wrote:
> > This script implements a little telnet-client. By using this code we are > > able to launch programs on all computers that have telnet access!!!
<<quoted lines omitted: 8>>
> in different way (to have task! and stuf) but this wouldn't break that > schema, I believe...
Well imagine following: in pseudo-code: ftpcopy rebol to host x open telnetsession to host "x" run rebol on host "x" Do you see the possibilities? Regards Jochen

 [7/13] from: rebol:techscribe at: 27-Sep-2000 23:23


Hi Jano, REBOL/Command gives you quite a lot of access to the OS (launching programs, redirecting program output to the console, loading libraries ...). What's wrong with paying for a program? ;-)
>> ;- Elan [ : - ) ]
visit my Website http://www.TechScribe.com author of REBOL: THE OFFICIAL GUIDE REBOL Press: The Official Source for REBOL Books http://www.REBOLpress.com

 [8/13] from: sharriff:aina:med-iq at: 28-Sep-2000 7:27


Hier damit Jochen ;-) Sharriff Aina med.iq information & quality in healthcare AG Gutenbergstr. 42 41564 Kaarst tel.: 02131-3669-0 fax: 02131-3669-599 www.med-iq.de

 [9/13] from: dado:slovkaufring:sk at: 28-Sep-2000 9:52


> Well imagine following: > in pseudo-code:
<<quoted lines omitted: 4>>
> Regards > Jochen
You're right with this one, but then again, if rebol will be accessible on the other side, you can/could execute your code in a more direct manner. We're talking about local execution here. I have no problem with executing programs on other machines, with rebol or not, but be it rebol, it would be much easier and simpler to implement. Regarding Elan's answer:
> REBOL/Command gives you quite a lot of access to the OS (launching > programs, > redirecting program output to the console, loading libraries > ...). What's wrong with paying for a program? ;-)
I'm not against commercial software, but there have been many points and questions already raised by Pekr. Not going into this... (again!?:) But what you're telling me is: if you want to execute an external program, pay $250 for it. You know, I need a single system call! I like the abilities that /Command gives you, but I don't need all this to do exec. I'm not saying you can't go with wrap-arounds, but WHY??? Imagine all the great networking code that's in REBoL would be there, but there would be no "listen". You would be offered a /Network version for just a $250 (cause, you know "listen", that's for servers, right?). I hope you get the idea. I'm not saying I don't want to pay for anything, nor trying to state anything bad about REBoL. This is about something else... Jano

 [10/13] from: g:santilli:tiscalinet:it at: 28-Sep-2000 11:21


[jsc--dataheaven--de] wrote:
> I've found a solution to launch programs easily from REBOL/View. > the Solution is pretty simple but would only work under UN*X/Linux.
I think that almost everyone knows how to launch programs from /View on Unix, it's just a matter of: view -q myscript.r | bash One of the first things I did with /View was an application panel for my desktop... :-) (after deleting GNOME completely and switching to just enlightenment). Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/

 [11/13] from: g:santilli:tiscalinet:it at: 28-Sep-2000 11:24


[jsc--dataheaven--de] wrote:
> This script implements a little telnet-client. By using this code we are able > to launch programs on all computers that have telnet access!!!
You don't even need to go thru tcp; a pipe is enough. Hey, it's so simple, really no one had thought of that? :) Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/

 [12/13] from: joel:neely:fedex at: 28-Sep-2000 6:51


Jochen, Thanks for kicking off an interesting discussion. I haven't yet seen a post with the following variation on your theme: browse "http://localhost/cgi-bin/script-or-app?parameterlist" which gets arguments to, and standard output from, the external code. Of course, it's probably so obvious that nobody bothered... -jn- [jsc--dataheaven--de] wrote:

 [13/13] from: ryanc:iesco-dms at: 28-Sep-2000 9:17


This effectively does the same thing on a windows platform. rebol -c batch.r | command.com Does this mean I am not going to buy command? No, I need command for much more than this. Does this mean I would'nt buy a $30 view or core with shell access? That is a better question. --Ryan

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted