path names to CD across platforms

Ken Ray kray at sonsothunder.com
Sat Sep 6 01:26:00 EDT 2003


You can test for the OS version by checking the systemVersion, something
like:

set the itemDel to "."
if (item 1 of the systemVersion >=10) then
  -- you're in OS X
else
  -- your're not
end if

If someone is running a Classic app inside OS X, you can check the
currently running processes for a line that says "Classic Environment"
(I believe). The tip to get a list of processes is at my site:

  http://www.sonsothunder.com/devres/revolution/revolution.htm?_proc002

HTH,

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 
> Byron Turner
> Sent: Friday, September 05, 2003 6:45 PM
> To: use-revolution at lists.runrev.com
> Subject: Re: path names to CD across platforms
> 
> 
> 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
> 
> _______________________________________________
> 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