Can't read text from file on OS 9

Ken Ray kray at
Wed Sep 29 10:34:38 EDT 2004

On 9/29/04 5:04 AM, "Robert Brenstein" <rjb at> wrote:

> Yes, we are indeed trying to find a reliable to know whether running
> under true OS9 or in Classic.

Here's what I use - it's run from a PPC application and it determines
whether the PPC app is running under Classic mode on OS X or under "true" OS
9. It needs to be done in two parts - the first part determines if the app
itself is an OS X app or not, and if not, it then checks the status of the
classic mode:

function InClassicMode
  -- First, check to see if we're running on OS X
  if the fileName of this stack contains "Contents/MacOS/" then
    return "false"
    -- Second, check to see if the process "Classic Support" is in the
    -- current process list. This will be true when running in OS X Classic
    -- mode, but will be false if running in OS 9.
    -- If true, then the app is a PPC app and Classic Mode is running,
    -- so it must be running in Classic Mode.
    -- If false, then the app is a PPC app and Classic Mode is *not*
    -- running, which would mean that the app is running in OS 9 and
    -- not in Classic Mode.

    put format("tell app \"Finder\"\nget the processes\nend tell") into tAS
    do tAS as AppleScript
    put format("process \"Classic Support\"") into tClassicProcName
    return (the result contains tClassicProcName)
  end if
end InClassicMode


Ken Ray
Sons of Thunder Software
Web site:
Email: kray at

More information about the use-livecode mailing list