Here's a short script to export a Mori note (or multiple notes) to a Palm memo.
I've installed the script in my Mori toolbar, and have been successful in exporting various notes.
It's been tested with Mori 1.1.3 and Palm Desktop 4.2.1 and Palm OS 5.2.1.
property palm_end : ASCII character 13
property mac_end : ASCII character 10
property maxTitleLength : 254
(*In Palm Desktop 4.2.1 and Palm OS 5.2.1 the max title length is 255 char. It might fewer in other versions.
There is also a max note length of around 4000 characters for notes that can later be edited on the palm.
Longer notes will be read-only.
There are currrently no checks implemented concerning this limitation*)
tell application "Mori"
with transaction
set theDoc to front document
set theSelection to the selection of theDoc
if theSelection = {} then
display dialog "There are no notes selected."
else
tell theDoc
try
repeat with eachEntry in theSelection
tell eachEntry
set theName to the name as string
if (count of theName) is greater than maxTitleLength then
set memoTitle to text 1 thru maxTitleLength of theName
else
set memoTitle to theName
end if
set theContent to the my replaceFeeds(note)
--log "new memo: " & theName & " " & theContent
my makeMemo(memoTitle, theContent)
end tell
end repeat
on error
display dialog "There was a problem generating a memo from the note titled: " & theName
end try
end tell
end if
end transaction
end tell
on makeMemo(memoTitle, theContent)
tell application "Palm Desktop"
set allMemos to (every memo whose contents = theContent)
if allMemos = {} then
make new memo with properties {title:memoTitle, contents:theContent}
end if
end tell
end makeMemo
on replaceFeeds(theText)
set saveDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to mac_end
set itemList to every text item in theText
set AppleScript's text item delimiters to palm_end
set palmText to itemList as string
set AppleScript's text item delimiters to saveDelim
return palmText
end replaceFeeds
Thanks. If you get a chance
Thanks. If you get a chance would you mind zipping up your script and adding it to the scripts and plugins page? I'll also add it to the Mori Sample Scripts collection, but it would probably be a good idea to give this it's own page too.