Marketcircle    Forums  Hop To Forum Categories  Extending Daylite  Hop To Forums  Scripting    Creating New Note with Default Text
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Apprentice
Posted
I am working on a script to create a new note with a default title and contents. Adding the title is no problem but I can't seem to figure out what to add to the default values dictionary to get the script to add the default note text. This is what I have so far:

document := (NSApplication sharedApplication) firstDayliteDocument.
values := NSMutableDictionary dictionary.
values addObject:'My Note Title' forKey:'title'.
document runCreateNoteWindowWithDefaultValues:values linkedToObjects:nil.


That code works. However, if I add:

values addObject:'The default contents...' forKey:'note'.


I get an NSUnknownKeyException. I've tried looking through the EOModel for the key but don't see anything all that useful. I'm guessing that "largeData" may be helpful but I'm not sure of the format for the value (I just want an NSString, no formatting necessary).

Any help is greatly appreciated.

Thanks,
Jon
 
Posts: 5 | Registered: November 06, 2006Reply With QuoteEdit or Delete MessageReport This Post
AJ
Marketcircle Team
Picture of AJ
Posted Hide Post
Humm ... let me get one of our engineers to help out here.

There is a trick to the note body.
 
Posts: 893 | Location: Toronto | Registered: May 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Marketcircle Team
Picture of Ali Lalani
Posted Hide Post
You'll want to use the key plainTextRepresentation.

values addObject:'The default contents...' forKey:'plainTextRepresentation'.
 
Posts: 108 | Registered: June 15, 2006Reply With QuoteEdit or Delete MessageReport This Post
Apprentice
Posted Hide Post
Ding Ding Ding
We have a winner.

Thanks!
Jon
 
Posts: 5 | Registered: November 06, 2006Reply With QuoteEdit or Delete MessageReport This Post
Apprentice
Posted Hide Post
Could someone tell me the keys (or better yet, how to find them) for creating a new Task? I tried 'note' and 'plainTextRepresentation', and those did not work. I'd like the keys for all the fields if possible.

Also, is there a way to suppress the ScriptConfirmation dialogue? I'd like to run a script frequently, and that dialogue is a bit much. I do notice that the Applescript example didn't pop a dialogue. Is there a way to prevent it from fscript?

Thanks,

= Joe =
 
Posts: 14 | Registered: July 28, 2006Reply With QuoteEdit or Delete MessageReport This Post
Apprentice
Posted Hide Post
Hello? Anyone from Daylite reading this bboard? Fscript seems powerful, but a little help (fish) or teaching (how to fish) would be appreciated.

Thanks,

= Joe =
 
Posts: 14 | Registered: July 28, 2006Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

Marketcircle    Forums  Hop To Forum Categories  Extending Daylite  Hop To Forums  Scripting    Creating New Note with Default Text

© Copyright 2006 Marketcircle Inc. All rights reserved.