🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.misc
3 messages
3 total messages Started by bruce Tue, 20 Apr 1999 00:00
Netscape + helpers + .cmd
#16888
Author: bruce
Date: Tue, 20 Apr 1999 00:00
31 lines
2303 bytes
I wrote a little REXX script so I can access 'Shout Servers' so I can listen to streaming
MP3 content.

<----------------------------
/* shout.cmd */
Parse Arg ShoutFile  /* File sent from the Shout Server via NetScape */

PlayList=CharIn(ShoutFile,1,200) /* Hope the file is no longer than 200 characters */
Do HereTis = 1 to Length(PlayList) /* Search the length of 'PlayList' string */
If SubStr(PlayList,HereTis,4) = 'http' Then Leave /* When we find http... leave */
End

'd:\mp3\work\mp123.exe' SubStr(PlayList,HereTis)
exit

<------------------

Using Netscape 4.4, I setup the mime setting and pointed netscape to use the helper file
'shout.cmd' whch I wrote, as above. I'm using mp123.exe to play the streaming MP3 content. The problem
is that Netscape does not actually launch the helper program 'shout.cmd' but instead of sending
it to the command processor [cmd.exe or 4os2.exe] for execution, it hands it to the operating
system which in turn launches e.exe and then I get the chance the edit 'shout.cmd'. This I don't want.
I have placed the line '4os2.exe shout.cmd' in the helper/application line and this works OK but again,
not really what I want although is does accomplish the task. The other thing I did was to convert
my 'shout.cmd' file to a .exe via RexxToExe and this too works. Again not really what I want.

How can I get Netscape to simply execute a .cmd file when used as a helper?

Any help would be great, Thanks.

 bruce@transit.omen.com.au
Re: Netscape + helpers + .cmd
#16889
Author: danielh
Date: Tue, 20 Apr 1999 00:00
47 lines
3013 bytes
>I wrote a little REXX script so I can access 'Shout Servers' so I can
>listen to streaming MP3 content.
........
>Using Netscape 4.4, I setup the mime setting and pointed netscape to use
>the helper file 'shout.cmd' whch I wrote, as above. I'm using mp123.exe
>to play the streaming MP3 content. The problem is that Netscape does not
>actually launch the helper program 'shout.cmd' but instead of sending it
>to the command processor [cmd.exe or 4os2.exe] for execution, it hands it
>to the operating system which in turn launches e.exe and then I get the
>chance the edit 'shout.cmd'. This I don't want. I have placed the line
>'4os2.exe shout.cmd' in the helper/application line and this works OK but
>again, not really what I want although is does accomplish the task. The
>other thing I did was to convert my 'shout.cmd' file to a .exe via
>RexxToExe and this too works. Again not really what I want.
>How can I get Netscape to simply execute a .cmd file when used as a
>helper?

It's Easy...

   a) preferences-applications-
   b) assuming you are modifying an existing application, highlight it in the applications list and
       hit the edit button (if it's a new entry, click on New Type)
  c) click oh the application radio button,

  d) (this is the part you probably don't already know....)
      fill in the field with
            cmd.exe  /c  "x:\dir\shout.cmd  arglist "
       where:
            x:\dir\shout is the fully qualified name of your rexx .cmd program
            arglist is an optional argument list to be read by "shout.cmd".  
           and the quotes (") are NOT optional -- make sure you type them in!
     
    Note that  that netscape will save the response to a temporary file, and 
    append it's name of a temporary file to this "x:\dir... arglist " string.  
    Thus,  if arglist is a single word (say, a 0 or a 1), then SHOUT.CMD should contain:
         parse arg  arglist infile
    Using this, infile would contain the name of the temporary file into which netscape 
    stored the response from the server. 

    Of course, if you did not include arglist (say, used "x:\dir\shout.cmd " ), then 
    you would use:  
          parse arg infile 
    

-----------------------------------------------------------
danielh@crosslink.net
-----------------------------------------------------------
Re: Netscape + helpers + .cmd
#16890
Author: Ken Kahn
Date: Tue, 20 Apr 1999 00:00
8 lines
1002 bytes
bruce@omen.com.au wrote:
> How can I get Netscape to simply execute a .cmd file when used as a helper?

You can't; it has to do with the fact that NS/2 4.04 uses OPEN32 which
cannot
directly launch a command (NS/2 2.02 allowed this).  You'll have to
launch
your command file via CMD or 4OS2.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads