Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: NSAppleScript and System Events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAppleScript and System Events



Chris,
Thank you for your information.

Unfortunately, OSAScript does work same as NSAppleScript, i.e. takes 6 seconds.
> $ osascript -e "tell application \"System Events\" to get process \"TextEdit\" exists"


This script get result immediately on Panther PBG4, even if TextEdit is not launched.
But, on Tiger iMac G5, this script takes 7 secs to get result, when T.E. is not launched.


I guess this is not a bug of System Events, but of NSAppleScript or OSAScript.


On 2005/08/09, at 01:57, Christopher Hickman wrote:

I know you don't want to do this if you want to support Panther, but have
you tested to see if using an OSAScript instead of an NSAppleScript makes a
difference?


-----Original Message-----
Subject: NSAppleScript and System Events

On my Tiger iMac G5, Simple AppleScript does works strangely. like:

tell application "System Events" to get process "TextEdit" exists

This script works well on Script Editor app whether if TextEdit is running or not.

But ... When I run via NSAppleScript,
a.Tiger iMacG5 takes "6 secs" to reply "without" TextEdit running
b.Tiger iMacG5 takes less than 1 sec to reply "with" TextEdit running
c.Panther PBG4 works well whether TextEdit running or not

Is this a bug of NSAppleScript or System Events?
I guess, Script Editor works well ether panther or tiger, so this may
be a bug of NSAppleScript.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-implementors mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.