Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

System Events Wierdness



Title: System Events Wierdness
I'm working on a script that displays the contents of a .plist file.
It contains the following:

on open dropList
...
.  tell application "System Events"
.  .  POSIX path of pFile -- required
.  .  set pContents to (contents of property list file the result)
.  .  set listCount to (count property list items of pContents)
.  .  repeat with i from 1 to listCount
.  .  .  "" & i & " - " & (name of property list item i of pContents) & " ...
.  .  .  display dialog the result
.  .  end repeat
.  end tell
end open ------------------------------------
The script above works properly, but while stepping thru the repeat,
I get an error from another script. The other script is a stay-open
application that monitors my UPS. The error is -1728, Can't get
<<class uien>> of application "System Events". The source of the error
is:

on getUIEnabled()
        repeat
                tell application "System Events" to UI elements enabled
                if the result then return true
Does anyone have any ideas why or how one script
would interfere with another via System Events?
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

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 © 2007 Apple Inc. All rights reserved.