Finder asking for password?

Greetings,

I have created an Applescript to backup my mail, several preference files and some data odds and ends (just in case something goes wrong with my operating system, most of my day-to-day settings and data will be safe).

The Applescript I’ve created works great when I’m working at my computer. The script fires, does its job, quits and I’m happy. However, I’ve set the script to fire at 2:00 a.m. when I’m asleep and not at the computer. I prefer the script to fire at this time so I’m not there to screw-up any keyboard strokes (the script does some typing for me), as well as for the fact that I don’t want the script to interrupt my work.

When firing at 2:00 a.m. the script begins to execute and then, for some reason, a Finder dialog box appears asking me for my administrative password. What’s up? Has something in the system gone idle and needs to be activated?

Again, my script always fires manually and even fires when I’ve set times during the day for it to fire when I’m there. The script just fails to fire if the computer has been left alone for quite a long period of time.

I’ve set the script to fire with several applications - both Cronnix and iCal (no, not at the same time - I’ve used both the applications at different times to make the script fire).

Here’s the script (it’s quite simple semantically, but a little long):

–set variables
set mainPath to “Volumes:Digital Archive:Macintosh Computer Management:Configurations:Application Configurations:”

–empty trash
tell application “Finder”
activate
empty trash
end tell

delay 20

–GyazMail Backup
–action 1
tell application “Finder”
activate
delete entire contents of folder (mainPath & “GyazMail:put in users/jtowle/library/application support/gyazmail”)
copy entire contents of folder “Volumes:Joshua’s G4:Users:jtowle:Library:Application Support:GyazMail” to folder (mainPath & “GyazMail:put in users/jtowle/library/application support/gyazmail”)
end tell

–action 2
tell application “Finder”
activate
delete entire contents of folder (mainPath & “GyazMail:put in users/jtowle/library/preferences”)
select file “Volumes:Joshua’s G4:Users:jtowle:Library:Preferences:jp.gyazsquare.GyazMail.plist”
duplicate selection to folder (mainPath & “GyazMail:put in users/jtowle/library/preferences”) with replacing
end tell

–DayChaser Backup
tell application “Finder”
activate
delete entire contents of folder (mainPath & “DayChaser:put in users/jtowle/library/preferences”)
copy file “Volumes:Joshua’s G4:Users:jtowle:Library:Preferences:com.econtechnologies.daychaser.plist” to folder (mainPath & “DayChaser:put in users/jtowle/library/preferences”)
copy file “Volumes:Joshua’s G4:Users:jtowle:Library:Preferences:com.econtechnologies.daychaser.backgrounder.plist” to folder (mainPath & “DayChaser:put in users/jtowle/library/preferences”)
end tell

–SpamSieve Backup
–action 1
tell application “Finder”
activate
if file (mainPath & “SpamSieve:Corpus.plist”) exists then
delete file (mainPath & “SpamSieve:Corpus.plist”)
end if
end tell
tell application “Finder”
activate
if file “Volumes:Joshua’s G4:Corpus.plist” exists then
delete file “Volumes:Joshua’s G4:Corpus.plist”
end if
end tell

–action 2
tell application “System Events”
activate
tell application “SpamSieve” to activate
tell process “SpamSieve”
click menu item “Export Corpus…” of menu “File” of menu bar item “File” of menu bar 1
keystroke “Corpus”
click button “Joshua’s G4” of radio group 1 of scroll area 1 of splitter group 1 of group 1 of window “SpamSieve: Export Corpus”
click button “Export” of window “SpamSieve: Export Corpus”
delay 5
tell application “Finder”
copy file “Volumes:Joshua’s G4:Corpus.plist” to folder (mainPath & “SpamSieve”)
delete file “Volumes:Joshua’s G4:Corpus.plist”
end tell
end tell
end tell

–Application Authorization Backup
–action 1
tell application “Finder”
activate
if file (mainPath & “Application Authorization:Application Authorization.sitx”) exists then
delete file (mainPath & “Application Authorization:Application Authorization.sitx”)
end if
end tell

quit application “StuffIt Deluxe”
delay 5

tell application “StuffIt Deluxe”
activate
make new archive with properties {location:file “Digital Archive:Macintosh Computer Management:Configurations:Application Configurations:Application Authorization:Application Authorization.sitx”}
end tell

with timeout of (30 * 60) seconds
tell application “StuffIt Deluxe”
activate
stuff {alias “Joshua’s G4:Applications:Application Authorization:”} into archive “Application Authorization.sitx” compression level maximum
end tell
end timeout

quit application “StuffIt Deluxe”

tell application “Finder”
close every window
end tell

Thanks everyone!