include
include
- Subject: include
- From: Isaac Ordonez <email@hidden>
- Date: Tue, 18 May 2004 14:41:44 -0700
Hello,
I have a Applescript project in Xcode that has multiple scripts for
different functions and buttons. One thing they all have in common is
they access the keychain for a username and password. To do this I
have to set properties calling small routines to get each value from
keychain (server, name, password). For this I have to add the
following into the top of each script:
on keychainpass(myvalue)
try
tell application "Keychain Scripting"
tell keychain 1
unlock
set theKey to first key whose name is "Add User Info"
set endvalue to (password of theKey) as string
return endvalue
end tell
end tell
end try
end keychainpass
on keychainname(myvalue)
try
tell application "Keychain Scripting"
tell keychain 1
unlock
set theKey to first key whose name is "Add User Info"
set endvalue to (account of theKey) as string
return endvalue
end tell
end tell
end try
end keychainname
on keychainserver(myvalue)
try
tell application "Keychain Scripting"
tell keychain 1
unlock
set theKey to first key whose name is "Add User Info"
set endvalue to (server of theKey) as string
return endvalue
end tell
end tell
end try
end keychainserver
property importpass : my keychainpass("password") as string
property importname : my keychainname("account") as string
property myServer : my keychainserver("server") as string
Is there any possible way to have this chunk of data as another script
and make applescript include it in to every script? This way I could
have it once and then force prepend it to all scripts.
Isaac Ordonez
Technology Support Specialist II
San Rafael City Schools
415.302.8114
_______________________________________________
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.