Monday, March 18, 2019

#1 2018-12-29 12:03:09 am

akim
Member
Registered: 2010-04-04
Posts: 92

Change Calendar's Event Description Font

How do I change the font color, family and typeface in a Calendar event? The following applescript approach does not allow any more detail than setting the text content.

Applescript:

tell application "Calendar"
   set TargetEvent to first event of (first calendar whose name contains "Home")
   set description of TargetEvent to "Test"
end tell

I would like to script an event's description's font to achieve the same result, as can be obtained by control clicking on the text, and triggering  menus and floating windows to change the font name and color.
Any help would be much appreciated.

Offline

 

#2 2018-12-29 12:25:39 am

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5586

Re: Change Calendar's Event Description Font

Formatting isn't exposed to scripting, so you're out of luck. Try logging a bug.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Offline

 

#3 2018-12-29 11:29:04 am

akim
Member
Registered: 2010-04-04
Posts: 92

Re: Change Calendar's Event Description Font

1. Can Applescript modify TextKit?
2. If so, might EventKit apply that text change to an event's description?

Offline

 

#4 2018-12-29 07:12:23 pm

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5586

Re: Change Calendar's Event Description Font

I don't think TextKit is going to help. I don't know where the styling is stored -- perhaps you should style an entry and see what EventKit returns.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)