path names to CD across platforms
Byron Turner
byront at mac.com
Fri Sep 5 18:51:00 EDT 2003
Thanks, according to our programmer, the platform returns MacOS in both
classic and OSX so this fails. He says he has a solution which we'll
test today. If it indeed does work, I'll ask him to post his method.
Thanks for everyone's help.
Byron
On Friday, September 5, 2003, at 02:54 PM, Dan Friedman wrote:
> Byron,
>
> Try this... (This assumes that you pass a movie path without the drive
> name/letter, and the CD (for the Mac) is named "myCDROM")...
>
>
> put getMoviePath("datafiles/movies/movie001.mov") into mPath
>
>
> function getMoviePath fileName
> if the platform = "MacOS" then
> if there is a file ("myCDROM/" & fileName) then
> return ("myCDROM/" & fileName)
> end if
> else
> if there is a file ("D:/" & fileName) then
> return ("D:/" & fileName)
> else if there is a file ("E:/" & fileName) then
> --just incase they mapped the CD drive to "E"
> return ("E:/" & fileName)
> end if
> end if
>
> -- you might put some kind of warning or error
> -- routine here. Probably don't want to continue
> -- if the movie was not found
>
> return false
> end getMoviePath
>
>
> There's probably a better way to do this, but it should work (I didn't
> test
> it!). Hope it helps,
>
> Dan
>
>
>> Message: 10
>> Date: Fri, 5 Sep 2003 12:36:35 -0700
>> Subject: path names to CD across platforms
>> From: Byron Turner <byront at mac.com>
>> To: use-revolution at lists.runrev.com
>> Reply-To: use-revolution at lists.runrev.com
>>
>> Forgive me if this gets posted twice, the first was held up and this
>> is
>> urgent. How would I compensate for the differences in file path names
>> when deploying to OS 9, OS X and Windows? For example a movie resides
>> on a CD . . how do we have one app that can be built for multiple
>> platforms that can find the file regardless?
>>
>> Thanks,
>>
>> Byron
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list