[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] sending PHP file to browser / star-commands



> In message <538a0009-169d-5447-d613-da3adaa7599a@xxxxxxxxxxxxxxxxxx>
>           Vince M Hudd <atdotcodotuk@xxxxxxxxxxxxxxxxxx> wrote:
>> ...another alternative would be to issue a star command to invoke an
>> external program that handles changing the file path to a URL, then
>> calls either *URIdispatch or the equivalent SWI.

Fred Graute  wrote on 17 Aug:
> ... Here's what I threw together. Bit rough but it seems to do the
> job. [snip] ...

Works a treat!  Thanks, Fred.

Now why didn't I think "star-command" at the outset?!  I could easily 
enough have managed to write a Basic prog to combine the contents of 
the two system variables (the one from StrongEd giving the pathname of 
the current file, and my own <webjames-thissite$dir> that tells 
Webjames what to consider as the root when it serves the current site) 
and broadcast the resulting URL for Netsurf to pick up.  My Basic 
wouldn't have been as polished as Fred's though!

I did get as far as considering the list of functions shown in the 
Reference section of StrongEd's iconbar help.  Found the one called 
"BroadcastURL" -- it looked promising but I still had the problem of 
manipulating the string to be its argument.

Trying to do it all from inside StrongEd, I failed to look outside the 
box.  What I needed was StrongEd's "Run" function, which Fred used to 
call a routine from elsewhere in the OS.  The new line in my HTML Mode 
file covering what the "running man" icon does is:
-->Adjust -->SetTmp () Run ("<StrongED$Tmp_ToolPath>.LaunchPHP")


With hindsight, the potential of "Run" is obvious.  I have to say that 
plain * would have rung my bells much more clearly.

Is it in fact possible in StrongEd to issue a star-command, as we have 
always been able to do from within Basic?  If so, and if * had been in 
the list of functions, my instinct would have been to put my Basic 
file LaunchPHP into $.!Boot.Library and use the syntax *LaunchPHP -- 
which would have been intuitive (and tidier than the brackets and 
quotemarks in  Run ("LaunchPHP") )


Anyway, thanks again, Fred.  Got this working now and it's proving a 
very handy tool.

-- 
Jim Nagel                            www.archivemag.co.uk



-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives and instructions at
http://stronged.torrens.org/index.html