Re: OS X: determine if Explorer is Classic
Re: OS X: determine if Explorer is Classic
- Subject: Re: OS X: determine if Explorer is Classic
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 14 Jun 2002 09:29:47 -0700
On 6/14/02 8:47 AM, "Michael Turner" <email@hidden> wrote:
>
Wow, very useful technique. Thanks!
>
>
Is there a related technique to _launch_ (& direct commands to) the
>
classic vs. the OSX version of (for example) ASP?
>
>
tell application "Apple System Profiler.app"
>
is compiled as:
>
tell application "Apple System Profiler"
If it's on your own machine, you can tell the whole file path of the version
you want and it won't get the other one, e.g.
tell application "OS X Hard Disk:Applications:Apple System Profiler.app"
but to get that in a foolproof method for unknown users is not possible.
Even in the case of an OS-supplied app, people will,somey=times ove them to
mother partitions. I think the best you can do is this:
property aspFile : "" -- an alias
if aspFile "" then
try
get aspFile
on error
set aspFile to ""
end try
end if
if aspFile = "" then
try
set aspFile to alias ((path to applications as string) & Apple
System Profiler.app")
on error
set aspFile to (choose application with prompt "Choose your OS X
Apple System Profiler, denoted as \"Application\", not Classic) as alias
end try
end if
set aspPath to aspFile as string
tell application aspPath
--etc.
end tell
----------------------
In 99% of cases, the user won't be asked to choose the application. In the
other 1%, you hope they choose the right one. They will only have to do it
once.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.