"Couldn't save document"
"Couldn't save document"
- Subject: "Couldn't save document"
- From: "Marc K. Myers" <email@hidden>
- Date: Tue, 22 Feb 2005 00:23:02 -0500
This is weird. I have a simple date/time calculator script that I'm
building. I reached a stopping point when it was working as expected
from Script Editor. I went to save it as a compiled script and got the
message "Couldn't save document". I cut the code, pasted it into a
text editor, shut down Script Editor, and restarted the computer. When
it was up again I copied and pasted the code into an empty Script
Editor window, compiled it, and then tried to save it as a compiled
script. Again, "Couldn't save document". I can't figure it out.
Here's the script:
____________________________
property years : 31557600
set stDate to ""
repeat until class of stDate is date
set stDate to text returned of ¬
(display dialog "Enter starting date/time" default answer "")
set stDate to date stDate
end repeat
set {enDate, incr} to {"", false}
repeat until (class of enDate is date) or (incr)
set enDate to text returned of ¬
(display dialog "Enter ending date/time or increment" default
answer "")
try
set enDate to date enDate
on error m number n
if character 1 of enDate is ("+" or "-") then
set incr to true
else
error m number n
end if
end try
end repeat
if class of enDate is date then
set theReturn to dateProc(stDate, enDate)
else
set theReturn to diffProc(enDate)
end if
set theButton to button returned of ¬
(display dialog theReturn buttons {"Again", "Done"})
if theButton is "Again" then tell me to run
on dateProc(stDate, enDate)
set theDiff to (enDate - stDate)
set oYears to theDiff / years
set oDays to theDiff / days
set oHours to theDiff / hours
set oMins to theDiff / 60
set tYears to theDiff div years
set tDays to (theDiff mod years) div days
set tHours to (theDiff mod days) div hours
set tMins to (theDiff mod hours) div 60
set theReturn to ¬
"Years: " & (format oYears into "##########.##########") &
return & ¬
"Days: " & (format oDays into "#############.#######") & return
& ¬
"Hours: " & (format oHours into "###############.#####") &
return & ¬
"Minutes: " & (format oMins into "#################.###") &
return & ¬
"Seconds: " & (format theDiff into "####################") &
return & ¬
"Y: " & tYears & " D: " & tDays & " H: " & tHours & ¬
" M: " & tMins
end dateProc
______________________________________
Has anyone got a clue as to what's going on?
Marc [2/22/05 12:22:29 AM]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden