Can't read text from file on OS 9
J. Landman Gay
jacque at hyperactivesw.com
Tue Sep 28 11:37:59 EDT 2004
On 9/28/04 7:09 AM, Robert Brenstein wrote:
>> On 9/24/04 6:47 AM, Robert Brenstein wrote:
>>
>>>> I don't have an OS 9 machine to check right now, but maybe someone
>>>> else can. If I remember right, OS 9 will return a path something like
>>>> this:
>>>>
>>>> Hard Disk/AppFolder/Folder/file.rev
>>>>
>>>> The Classic engine returns this path:
>>>>
>>>> /Hard Disk/Folder/Folder/file.rev
>>>>
>>>> The OS X engine returns this path:
>>>>
>>>> /Folder/Folder/file.rev
>>>>
>>>> If I'm right about the OS 9 path, then checking for a leading "/"
>>>> would seem to do it. But someone with native OS 9 should check to
make
>>>> sure. My husband is playing solitaire on our machine and family
>>>> harmony forbids interference. ;)
>>>>
>>>> --
>>>> Jacqueline Landman Gay | jacque at hyperactivesw.com
>>>> HyperActive Software | http://www.hyperactivesw.com
>>>
>>>
>>>
>>>
>>> Just checked that OS9 returns the leading slash just as Classic does.
>>
>>
>> Oh well. It was a nice thought while it lasted. Does Andre's
>> suggestion about checking the prefs folder work?
>>
>> --
>> Jacqueline Landman Gay | jacque at hyperactivesw.com
>> HyperActive Software | http://www.hyperactivesw.com
>
>
>
> Ken's post on another thread just gave me another idea to try to
> differentiate between native OS9 and Classic. Ken's script:
>
> function isAppRunning pAppname
> replace ".app" with "" in pAppName
> put "tell application " & q("Finder") & cr & "return the
processes" & \
> cr & "end tell" into tAS
> do tAS as AppleScript
> put the result into tProcs
> return (offset("process" && q(pAppName),tProcs) <> 0)
> end isAppRunning
>
> I am pretty sure that there is always some process running under OSX
> that is not running under OS9. The question is whether this function
> will return only OS9-specific processes under Classic or all, classic
> and osx, processes. Can't check at the moment, though.
Good idea. I just tried it, and under OS X there is a process called
"Classic Support". I suspect this doesn't run in OS 9, so maybe checking
for that would tell you if you are in OS X.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list