Launching standalones via a net-client.
Wilhelm Sanke
sanke at hrz.uni-kassel.de
Thu Jul 15 23:14:12 EDT 2004
Following the discussion on the use-revolution list ("RevNet
installation") I experimented with the "Download" stack of Metacard
which I have included as a substack in our net client.
First I modified the net client to display not only mc-, but also
exe-files in the list (showing which stacks are available on the
ftp-server) from which the user selects a stack for opening.
Then I tried to add the appropriate script lines to open an exe-file.
I got the exe-file to download - as could be seen by the text and the
progress bar of the download stack, but it did not open.
I tested - in handler "on updateme href" of the stack script of the
download stack, if the exe-file was inside the "cachedURLs", indeed it was.
The problems seems to be how to access the standalone in the
"cachedURLs" and to launch it.
The Transcript Dictionary informs
"Use the cachedURLs function to determine which files have been
downloaded and are currently in the cache. A cached URL can be
"accessed" more quickly than one that is not cached."
but it does not explain *how* to "access" the CachedURL.
I have the feeling that it must be possible to access and launch the
exe-file which is cached, but how?
Please have a look at the changed part of the "updateme href" handler.
Simply using "launch URL href" or "go URL href" does not work.
Any ideas?
"on updateme href
(snip)
if stat contains "cached" then
put "Done" into field "progress"
set the thumbpos of sb 1 to the endValue of sb 1
wait 500 milliseconds
close me
if word 1 of url href is "#!/bin/sh" then
go url href
# else answer "URL" && href && "is not a stack."
else
#=====changed script============
put the cachedURLs into ExeFiles
set the itemdel to "/"
put last item of ExeFiles into CurrentFile
launch CurrentFile
#=========end of changed script==========
end if
unload url href
exit to MetaCard
end if
(snip)
end updateme"
Kind regards,
Wilhlm Sanke
More information about the metacard
mailing list