Palm tasks applecript break with 4.1
Palm tasks applecript break with 4.1
- Subject: Palm tasks applecript break with 4.1
- From: Mikael Byström <email@hidden>
- Date: Sun, 1 Jun 2003 13:32:04 +0200
I wrote a script some years back that let's me reschedule Tasks that I
still haven't done in the Palm Desktop application, that would put
forward my tasks in time by a certain amount of days, thus sliding my to
dos into the future to give me another shot at them and not all of them
on the same day. With some input from another scripter I recently added
dialog input for the amount of days.
The real problem here is when upgrading to Palm Desktop 4.1, it broke my
script and I understand this is because Palm decided to replace/abandon
parts of the old Palm applescript API. I don't understand how I can now
do what I need as the results of my script seem quite illogical to me.
Can you people help?
Here is the old script:
tell application "Palm Desktop"
set Tasks to count to do
--PROBLEM 1: if I have a list with any amount of items in Palm 4.1,, say
3 or 5, when executing the codeline above, I get Tasks = 474 (ehum)
--In Palm 4.0 it gives me the same amount as visible tasks in list, which
is what I want.
set Dagar to ((text returned of (display dialog "Move how many days?"
default answer "7")) as number) * days
-- So this loop below wants, because of error above, to loop 474 times,
not what I had in mind
repeat with n from 1 to Tasks
set taskDate to (due date of to do n)
--PROBLEM 2: at the above point the script complains taskDate has
"missing value", but if I step it gets the proper date.
set due date of to do n to (taskDate + Dagar)
--PROBLEM 3 (related to 2 I'm sure) the result above gets "undefined" and
the script stops
end repeat
end tell
So how can I refer to the actual amount of tasks in the list?
Why does the date at "set taskDate to (due date of to do n)" not get
assigned every time. Do I need to slow down the script or wait for an event?
I'm not an experienced Applescripter. This script was built from
ignorance, experimentation and some input from others. I haven't seen any
other script that attempts to do something similar.
Can you help me fix this script up? What have been abandoned and/or
replaced in 4.1 and how can I get the same functionality as 4.0?
Scripter 3.03, Palm Desktop 4.1 under Mac OS X 10.2.5.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.