path names to CD across platforms
Ken Ray
kray at sonsothunder.com
Fri Sep 5 19:04:00 EDT 2003
Dan's idea is a good one, but I'd check D: through Z: in Windows (you
never know where they might have their CD installed).
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
> -----Original Message-----
> From: use-revolution-admin at lists.runrev.com
> [mailto:use-revolution-admin at lists.runrev.com] On Behalf Of
> Dan Friedman
> Sent: Friday, September 05, 2003 4:55 PM
> To: RunRev Mail List
> Subject: Re: path names to CD across platforms
>
>
> 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