Forum Home
Press F1
 
Thread ID: 33518 2003-05-18 04:00:00 html coding JoBo (2795) Press F1
Post ID Timestamp Content User
145359 2003-05-18 04:00:00 I would be grateful for help with this problem.
A hyperlink to a movie file Play Movie (movie.exe) works OK but does not close the movie when finished. Screencam standalone movies can be run with a command switch /c to close the player when finished. Can anyone show me how to add the command to the hyperlink statement so that the movie player closes on completion?

Thanks
JoBo (2795)
145360 2003-05-19 01:13:00 Based on my total ignorance ... try an experiment. Add the option inside the quoted string: "movie.exe /c". :D The string is passed into the magic stuff, so an option might just get there too. If it makes up a legal command, it should be carried out. A legal command can contain options. Graham L (2)
145361 2003-05-19 01:22:00 Hyperlinks only link files, they don't execute them.

If that link was used on the web, it'd either expect me to download the file or open it in an associated program.

HTML won't be able to do what you want. If this is for localhost shortcuts then just alter your movie.exe shortcut to use the switch.
Kame (312)
145362 2003-05-19 01:38:00 That one as it is is a local reference . It is to a . exe file, therefore the browser should pass it to the OS to be executed, shouldn't it? Whatever happens to the rest of the string, I don't know .

I suppose you could make a batch file to run the programme, with any arguments . . . a batch file seems more "concrete" than a shortcut to me .

Anyway, I've stirred this thread to the first page . . . somone will know . :D
Graham L (2)
145363 2003-05-19 03:13:00 I would probably switch to a javascript popup window that will automatically open and play the movie. You could then probably set a timeout to close the window.. (like a metatimeout redirect except the redirect link pointing to a javascript closewindow link?)

Though this would be tricky as you have to guage the status of the download: users on dial up are going to take longer than users on dsl.. so you have to assume a certain download time and take that into account for your timeout. So your timeout would be (download time + movie playback time + a few seconds)

You could pull it off with a whole bunch of code or you could just simply throw in a "close browser window" link/button/image just below your movie window. This is easily pulled off by inserting the following code into your popup page:

*This goes into your <head></head> area
<script language="javascript">
function close_window(){
window.close;
}
</script>

*This is the link in the <body></body> area, wherever you wanna put it.
*This assumes you are using an image
CloseBrowser.gif (javascript:close_window();)
whetu (237)
145364 2003-05-19 03:27:00 Graham, no disrepect or anything but linking to movie.exe as typed out as stated above means movie.exe in the current directory, either web or local it still isn't clear, if the OS takes over then it's possibly switched to explorer.exe, I think this is only IE/Windows related, other browser may not do this. The browser however, would possibly use the OS to run the associated program with it, movie.exe I have no idea what it is, as the movie is not in avi, etc format. So movie.exe I assume is the movie player? or a movie that's been turned into an .exe?

I'm however assuming it's local as it's the only way I can see it being executed without it being an old exploit that was found in XML/ActiveX.
Kame (312)
145365 2003-05-21 02:58:00 Hi and thanks to all who responded. Still no luck with this. The file is a self executing Screencam movie which if executed from a command line will close the player, when finished, if /c is added after the filename. If I put this in a <a href etc. statement IE says it cant find the file "movie.exe /c"
I wrote a batch file and from that a .lnk file and that works fine...but the .lnk files obviously must refer to a Registry entry because when I then try to copy the whole folder to a CD the .lnk files are totally renumbered and no longer work when run from the CD.Hope this all makes sense! What I want is to be able to run the exe file then close the player ready for the user to choose another exe to run, all from a web page link. I've tried "movie.exe /c" and "movie.exe""/c" Any more ideas I can try?
JoBo (2795)
1