Re: Accessing Stickies' data
Re: Accessing Stickies' data
- Subject: Re: Accessing Stickies' data
- From: "Stockly, Ed" <email@hidden>
- Date: Thu, 9 Dec 2010 18:03:06 -0600
- Acceptlanguage: en-US
- Thread-topic: Accessing Stickies' data
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