|
|
Automate an Internet content filter
An addition to my last post: when I wanted to run my script via the shell it did not work at first. The error message was "Keychain Scripting got an error: Application isn’t running. ". The solution for this problem can be found here: http://support.apple.com/kb/TA23348?viewlocale=en_US
So I added the following code before trying to get the password from the keychain and it works now also when being called from the shell.
-- Quit Keychain Scripting if it's running, since opening this script may have implicitly launched it. try tell application "System Events" set foundApp to first process whose name is "Keychain Scripting" set pid to id of foundApp -- this will exit the try block if the process isn't running quit foundApp -- we get here if the process is found end tell end try -- get Finder to launch Keychain Scripting tell application "Finder" open application file ((startup disk as string) & "System:Library:ScriptingAdditions:Keychain Scripting") as alias end tell |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.13 seconds |
|