Title: Re: How can I add the category?
On 4/17/04 11:52 PM, "Bruce Klutchko" <[EMAIL PROTECTED]> wrote:
> This works very well. I made a few formatting changes to eliminate blank
> lines, but the addition of categories to the note works very nicely. I had no
> idea how to do that.
>
> As an occasional scripter (very occasional), the problem I face is that each
> new effort usually presents a very steep learning curve. For example, I’ve
> been playing around with trying to get the note to format the name of each
> task to bold, but I can’t seem to format the note at all. The Entourage X
> dictionary doesn’t list formatting commands and the references I’ve found in
> the AppleScript Language Guide PDF don’t seem to apply here. Is there an easy
> way to bold just the name of each task in the note, or would that make this
> simple little script too bloated?
set tasksNote to make new note with properties {name:"Tasks Note - " & today, text:styled text, content:notesText}
Entourage AppleScript has no styled text or HTML features. Entourage does not implement the text suite, there is no 'text' property of a note, you can't do it. And you should remove text:styled text, from the line above since it's meaningless here. I've been asking for styled text to be implemented for about 5 years, since OE 4.5. I was given very clear indications that it would never happen - too hard or something. Maybe if they ever change the text engine.
After opening the note, you might experiment with doing some formatting by doing GUI scripting using the Format menu, but you could never do that after the fact for this longlist of items. You'll have to settle for putting the name of each task in upper case:
set chars to characters of theName
repeat with i from 1 to (count chars)
set aChar to item i of chars
set asciiNum to ASCII number of aChar
if asciiNum > 96 and asciiNum < 123 then -- lower-case letter
set item i of chars to ASCII character (asciiNum - 32) -- upper case equivalent
end if
end repeat
set AppleScript's text item delimiters to {""}
set theName to chars as string
-- or if you have the Satimage osax, this will be faster:
set chars to characters of theName
repeat with i from 1 to (count chars)
set item i of chars to uppercase (item i of chars)
end repeat
set AppleScript's text item delimiters to {""}
set theName to chars as string
It won't uppercase letters with accents and (hopefully) won't do anything with non-Western European words, but most of the time, you'll get all-uppercase with punctuation and special characters intact.
--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: <http://www.entourage.mvps.org/toc.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>
PLEASE always state which version of Entourage you are using - 2001 or X. It's often impossible to answer your questions otherwise.
--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: <http://www.entourage.mvps.org/toc.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>
PLEASE always state which version of Entourage you are using - 2001 or X. It's often impossible to answer your questions otherwise.
- Re: How can I add the category? Paul Berkowitz
- Re: How can I add the category? Bruce Klutchko
- Re: How can I add the category? Paul Berkowitz
- Re: How can I add the category? Bruce Klutchko
