• 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
Snow Leopard and my randsig script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Snow Leopard and my randsig script


  • Subject: Snow Leopard and my randsig script
  • From: LuKreme <email@hidden>
  • Date: Thu, 3 Sep 2009 10:03:29 -0600

I have the following script:

#!/bin/bash

MAIL=`ps -U"$USER" -co command | grep "\bMail\b"`
$HOME/bin/fortune $HOME/mysigs > $HOME/.signature
MYSIG="$(<$HOME/.signature)"

if [ "$MAIL" ]; then
osascript <<EOF
tell application "Mail" to set content of signature "Fortune" to "-- " & return & "$MYSIG"
EOF
fi
--END OF SCRIPT


It is controlled with a LaunchAgent:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd ">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.kreme.home.randsig</string>
<key>ProgramArguments</key>
<array>
<string>/Users/kreme/bin/randsig</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>15</integer>
</dict>
</plist>


This now gives the following error in Console.app

com.kreme.home.randsig[58548] syntax error: A identifier can’t go after this “"”. (-2740)
com.apple.launchd.peruser.601[237] (com.kreme.home.randsig[58754]) Exited with exit code: 1
com.apple.launchd.peruser.601[237] (com.kreme.home.randsig) Throttling respawn: Will start in 7 seconds
com.apple.launchd.peruser.601[237] (com.kreme.home.randsig) Throttling respawn: Will start in 4 seconds
com.apple.launchd.peruser.601[237] (com.kreme.home.randsig) Throttling respawn: Will start in 8 seconds
com.apple.launchd.peruser.601[237] (com.kreme.home.randsig) Throttling respawn: Will start in 1 seconds
com.apple.launchd.peruser.601[237] (com.kreme.home.randsig) Throttling respawn: Will start in 5 seconds
com.apple.launchd.peruser.601[237] (com.kreme.home.randsig) Throttling respawn: Will start in 9 seconds
com.apple.launchd.peruser.601[237] (com.kreme.home.randsig) Throttling respawn: Will start in 2 seconds


This is new in Snow Leopard, as it all worked (finally) in 10.5 without any errors. It still works in Snow Leoaprd, it just throws all these errors all over the console.

If I run the script manually, there are no errors.

If it matters, this user is NOT an admin user.

--
Penny! *Everything* is better with BlueTooth

_______________________________________________
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
  • Follow-Ups:
    • Re: Snow Leopard and my randsig script
      • From: LuKreme <email@hidden>
    • Re: Snow Leopard and my randsig script
      • From: Paul Scott <email@hidden>
  • Prev by Date: Re: documentation for Snow Leopard Quicktime?
  • Next by Date: Re: Snow Leopard and my randsig script
  • Previous by thread: KosmicTask AppleScript Client/Server Application
  • Next by thread: Re: Snow Leopard and my randsig script
  • Index(es):
    • Date
    • Thread