Hey,
Long time, no see…
I am using this new application, which is quite scriptable and quite useful. It’s called Journler.
(You can check the application out at http://journler.com/ )
Anyway, I can’t seem to get the export command to work.
Can someone be so kind to check out the application and see if they can get the export command to work? I seem to think it’s a bug in the 2.5 release, but just in case I’d like to get some expert opinions…
Thanks,
Tom
Model: Power Mac G5 2.0 dual processor
AppleScript: 1.10.7
Browser: Safari 419.3
Operating System: Mac OS X (10.4)
Here’s an example of a Journler script that looks up ToDos some distance in the future, prepares a Journal entry, and exports the entry as rich text. The export command is fussy - only the file type can be left out.
-- Ask how far ahead to search
set today to (current date)
repeat
set Choice to {button returned, text returned} of (display dialog "Please enter the number of days or weeks" & return & "to search ahead for events with dates due." default answer "1" with title "Search for ToDo Deadlines" buttons {"Cancel", "Weeks", "Days"} default button "Days")
try -- if a number is not entered, ask for one
tell Choice to set {U, T} to {item 1, item 2 as number}
set W to run script U -- convert "Weeks" or "Days" as text to AppleScript date constants
exit repeat -- got a number and the units of the search
on error
display dialog "Please enter a number"
end try
end repeat
-- Get Entries that meet the requirement
tell application "Journler"
-- set up some variables as lists
set tasks to {}
set Due to {}
set tName to {}
-- get the entries
set ComingSoon to entries whose date due is less than or equal to (today + T * W)
-- assemble lists of contents, titles and dates due
repeat with anEvent in ComingSoon
set end of tasks to rich text of anEvent
set end of tName to name of anEvent
set end of Due to date due of anEvent
end repeat
-- Post a Journal Entry for tasks coming soon
-- set up a header for the entry
set RText to "ToDos Coming Due within " & T & space & U & " from " & short date string of today & return & return
-- prepare new entry content for each future event
repeat with k from 1 to count tName
set RText to RText & k & ")" & tab & item k of tName & tab & "Due: " & item k of Due & return & tab & item k of tasks & return & return
end repeat
-- Post the new event
set anEntry to make new entry
set name of anEntry to "Tasks Coming Due"
set category of anEntry to "ToDo"
set tags of anEntry to "due"
set the rich text of anEntry to RText
set label of anEntry to red
-- save the database changes
save changes
-- export the new entry
export anEntry as rtf in (path to desktop folder) with header without subfolders
end tell
OK, I’m a doofus…
I was missing “with header without subfolders”
Sonovagun!
Mucho Thanks!
Tom