• 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: Accessing Stickies' data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing Stickies' data


  • Subject: Re: Accessing Stickies' data
  • From: Jim Thompson <email@hidden>
  • Date: Fri, 10 Dec 2010 09:10:47 +0900

Dear ES,

Thanks a lot for your advice and example.

Jim



On Dec 10, 2010, at 9:03 AM, Stockly, Ed wrote:

Aside from parsing the Stickies data file, which may be doable, GUI seems to
be your best option.


This script will give you the number of stickies and some info about each.

It does launch stickies in the bg, but then quits when it's finished.

ES

tell application "Stickies" to launch
delay 3
tell application "System Events"
tell process "Stickies"
set stickyStuff to get name of every menu item of menu 8 of menu bar 1
end tell
end tell
set stickyStuff to items 9 thru -1 of stickyStuff
set stickyCount to count of stickyStuff
set AppleScript's text item delimiters to {return}


tell application "Stickies" to quit
choose from list stickyStuff with prompt (stickyCount as text) & " Stickies
items"




On 12/9/10 1:55 PM, "Jim Thompson" <email@hidden> wrote:

Thanks, Axel.

I wish there's (or were) a different way so that Stickiers will (or
would) not launch itself.

Jim


On Dec 10, 2010, at 6:43 AM, Axel Luttgens wrote:

Le 9 déc. 2010 à 18:20, Jim Thompson a écrit :

Thanks.  Reading Stickies' data as text would not be a problem.  I
thought initially that Stickies' file is a database file.  In such
case, I thought I could get the number of records easily.  Since
Mr. Thompson said it's not a database file, I didn't think I could
get the number of records or windows, which is my only objective.
So I gave up.

Hello Jim,

As a last resort, there's the GUI scripting way:

tell application "System Events"
tell application process "Stickies"
count of windows
end tell
end tell

HTH,
Axel

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

This email sent to email@hidden

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


This email sent to email@hidden


_______________________________________________ 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: 
 >Re: Accessing Stickies' data (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: Accessing Stickies' data
  • Next by Date: Re: osascript weirdness...
  • Previous by thread: Re: Accessing Stickies' data
  • Next by thread: Re: Need help sending emails.
  • Index(es):
    • Date
    • Thread