• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Substituting missing Classic terms - a bridge to OS X (was Setting and getting a file's icon in OS X?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Substituting missing Classic terms - a bridge to OS X (was Setting and getting a file's icon in OS X?)


  • Subject: Re: Substituting missing Classic terms - a bridge to OS X (was Setting and getting a file's icon in OS X?)
  • From: Kai Edwards <email@hidden>
  • Date: Tue, 01 Oct 2002 21:06:53 +0000

on Mon, 30 Sep 2002 23:17:12 -0700, Seth Milliken <email@hidden> wrote:

> At 9:28 PM +0000 2002-09-10, Kai Edwards wrote:
>
>> Try checking your Finder dictionary in OS 10.2. If the Class icon family
>> entry is still marked '(NOT AVAILABLE YET)', you may have to wait a little
>> longer to repeat the trick.
>
> FWIW, as of 10.2.1, this is still the case: NOT AVAILABLE YET

Thanks for that, Seth. (Oh well... hang in there, folks!)

From what I gather (he said - deftly changing the subject), that's not the
only thing to have 'escaped' a fix so far.

I've recently had a few off-list discussions about certain functions that
appear to be unavailable from the Classic environment. Since some scripted
apps require a script running in Classic, this can obviously be a mite
frustrating.

The only suggestion I've been able to come up with so far is a real kludge -
but it might help until a proper fix comes along. It involves using a
'bridging' applet to issue the commands via OS X - and then pass the results
back to the calling (Classic) applet.

Obviously this will complicate things a little, especially with a
distributed solution but - if all else should fail - here's an outline of
the workaround...

1) Write a general script something along these lines:

--------------------------------------------------------------------
on systemAttribute(x)
system attribute x
end systemAttribute

on everyProcess()
tell application "System Events" to get every process
end everyProcess

on existsProcess(x)
tell application "System Events" to exists process x
end existsProcess

-- add any other required but 'missing' functions here...
--------------------------------------------------------------------

2) Save the script as an OS X application - naming it, say, "Xit"

3) Insert the required Xit command(s) in the Classic script like this:

--------------------------------------------------------------------
tell application "Xit"
launch
set sysv to systemAttribute("sysv")
end tell
-- do something with sysv
--------------------------------------------------------------------

Those are just the bare bones of it. For use on different machines, it may
be necessary to include some code to locate the Xit script, add a few error
traps, etc.

If a Classic script needs to access the OS X commands several times in a run
(especially if any delays might be involved), then the OS X script could be
saved as a stay-open application instead. This will obviate the need for the
'launch' command (but don't forget to tell the OS X script to quit when
you're done).

Of course, if repeated access is required to the OS X terms, it may be worth
launching a stay-open version at startup - and leaving out the quit command
altogether.

Not the most elegant solution, I grant you. But it might just help in a jam.

Kai

--
email@hidden
email@hidden
_______________________________________________
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.

  • Prev by Date: Re: Regex on OS X
  • Next by Date: Re: Limiting number of dialog characters
  • Previous by thread: Re: Regex on OS X
  • Next by thread: Re: Changing codes
  • Index(es):
    • Date
    • Thread