• 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: remember in keychain
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: remember in keychain


  • Subject: Re: remember in keychain
  • From: Peter Baxter <email@hidden>
  • Date: Fri, 21 Dec 2007 04:56:32 +1100

Hi Tom,

This has been a particularly interesting challenge and may have implications for scripting a lot of other shells.  

tell application "Keychain Scripting"
set s to system info
set myKey to s's computer name
tell keychain 1
set chosenKey to the first key whose name is myKey as string
set adminpwd to the password of chosenKey as string
end tell
end tell
set myScript to "echo " & adminpwd & " | sudo periodic daily echo job done"

tell application "Terminal"
activate
delay 1
do script myScript
delay 5
repeat
set myProcesses to (the count of processes of tab 1 of window 1)
if myProcesses is not equal to 3 then
set myDialog to the contents of tab 1 of window 1
set activeProcesses to (the processes of tab 1 of window 1)
exit repeat
end if
delay 5
end repeat
tell application "SystemUIServer"
activate
display dialog myDialog & return & "Active processes" & return & activeProcesses
end tell
quit
end tell

--note:  You can set Terminal to close without complaint in its settings pane.


On 19/12/2007, at 11:19 PM, tom evans wrote:

Many thanks for all your help on this - I think I understand what the script will do. One problem - I can't find out what my computer's sharing name is (what to put where you have "MacintoshHome") I've tried a few possibilities, but none of them work...



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >remember in keychain (From: tom evans <email@hidden>)
 >Re: remember in keychain (From: "parag vibhute" <email@hidden>)
 >Re: remember in keychain (From: Peter Baxter <email@hidden>)
 >Re: remember in keychain (From: Peter Baxter <email@hidden>)

  • Prev by Date: Re: sysv and OS X 10.4.10 and .11
  • Next by Date: Re: sysv and OS X 10.4.10 and .11
  • Previous by thread: Re: remember in keychain
  • Next by thread: Re: remember in keychain
  • Index(es):
    • Date
    • Thread