This content has been marked as final. Show 2 replies
On Mon, 25 Dec 2006 17:29:40 GMT, instructorTek posted in
> Hi all. I have a director movie and when I click a button I would like
> to play an .avi movie using a specific player which I'm distributing
> together with the movie.
> open "OpenWordMajor.avi" with "CamPlay.exe"
> --this would work if I get a way to add the path to the .avi
Are both the .avi and the .exe in the same path as the projector?
open theMoviePath &"OpenWordMajor.avi" with the moviePath &"CamPlay.exe"
Is there a chance there are spaces in the path? Some programs don't like to
see spaces in path names. Some will accept enclosing the path/fileName in
myFile = QUOTE &the moviePath &"OpenWordMajor.avi" "E
myApp = QUOTE &the moviePath &"CamPlay.exe"
open myFile with myApp
When Lingo's 'open' command fails, it does so silently, giving you and the
end user no clue as to why it failed.
Since you have Buddy API, I highly recommend using it over Lingo's 'open'
command. Its functions provide a return code that can tell you pass/fail and
sometimes the reason for failure.
> baOpenFile( the pathName & "OpenWordMajor.avi" , "maximised" )
> --this could have worked if I get it to play the .avi with CamPlay.exe
baOpenFile will only open files with their associated application - not with
a specified application. Use baRunProgram or baShell for this. See the Buddy
API docs for the specific parameters (I'm not on a machine with Dir right
The spaces/quotes issue may still apply (depends on the application, mostly).
Another Buddy method that might help, if running on Windows, is
And do take advantage of the return code. Most of the examples in the Buddy
docs use OK = functionName(). The OK variable will contain the return code
that is documented in the docs.
You can see a good example of how to use its error codes in one of Andrew
Morton's posts to this group (this happens to be for baOpenFile, but you can
adapt it to baRunProgram's return codes).
Mark A. Boyd
On Mon, 25 Dec 2006 21:39:59 GMT, Mark A. Boyd posted in
> open theMoviePath &"OpenWordMajor.avi" with the moviePath &"CamPlay.exe"
Needs a space in case you missed it.
open the moviePath &"OpenWordMajor.avi" with the moviePath &"CamPlay.exe"
I still recommend Buddy API, though.
Mark A. Boyd