• 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
Running an application -- dock question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Running an application -- dock question


  • Subject: Running an application -- dock question
  • From: "David G. Simmons" <email@hidden>
  • Date: Wed, 23 Apr 2003 12:18:07 -0700

I have written a small (very small) Applescript to do random signature
generation, and have a question about it.

The first version ran in a repeat loop, with a delay in it, but running
it this way seemed to use a TON of CPU time (consistently ran my CPU
meter at about 80% on a 1 GHz G4), so I changed tactics and now it runs
as a cron job every minute or so. However, every time it runs, it pops
up in the Dock, then goes away. I wonder if either a) there is a way
to stop it from popping up in the dock or b) have it not suck up so
much cpu time in a delay.

I know, I can use the 'random' signature feature of Mail, but, well, it
you want to pull your sigs out of somethign like fortune, as I do, then
that means creating THOUSANDS of signatures and then randomizing them.
Not something I want to do, frankly.

Any ideas?

dg

Here is the script, which works just fine ...

tell application "Mail"
set sigs to signatures
set tmp_fortune to (do shell script "/bin/fortune -s")
set my_name to "David G. Simmons"
set myHome to "408-481-9222 (Home)"
set myCell to "408-480-2229 (Cell)"
set myURL to "http://www.simmons-family.org/";
set tmp_sig to "--
" & my_name & "
" & myHome & "
" & myCell & "
" & myURL
set content of signature "Home" to tmp_sig & "
" & tmp_fortune
set content of signature "Internet" to "--
" & my_name & "
" & tmp_fortune
end tell
--
David G. Simmons
Life is a whim of several billion cells to be you for a while.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Running an application -- dock question
      • From: Adam Hinshaw <email@hidden>
    • Re: Running an application -- dock question
      • From: "John C. Welch" <email@hidden>
  • Prev by Date: Re: Complete newbie
  • Next by Date: Re: Inheritance dilemma
  • Previous by thread: iCal - Set to be None recurrence event
  • Next by thread: Re: Running an application -- dock question
  • Index(es):
    • Date
    • Thread