... more code down to here...
tell application "Finder" set _Today to _Sent & yymmdd & ":" as text set found to exists folder _Today if not found then set new_folder to make folder at alias _Sent with properties {name:yymmdd} set current view of new_folder's container window to list view end if repeat with n from 1 to the count of the theList set _name to name of item n of theList
tell application "Finder" activate set _Today to _Sent & yymmdd & ":" as text set found to exists folder _Today if not found then set new_folder to make folder at alias _Sent with properties {name:yymmdd} set current view of new_folder's container window to list view end if repeat with n from 1 to the count of the theList set _name to name of item n of theList if not (_name = "Dont_Send") then move (item n of theList) to folder _Today with replacing end repeat end tell
This is a part of a script (call it A.scpt). The code works when run by itself.
However, when invoked from another script via:
run script (alias "A.scpt")
it returns an error:
Finder got an error: Finder got an error: AppleEvent timed out.
This error occurs after moving the first file in the list "theList".
Does anyone know why it only gives the error when run from another script?
Jim
move (item n of theList) to folder _Today with replacing end repeat end tell
This is a part of a script (call it A.scpt). The code works when run by itself.
However, when invoked from another script via:
run script (alias "A.scpt")
it returns an error:
Finder got an error: Finder got an error: AppleEvent timed out.
This error occurs after moving the first file in the list "theList".
Does anyone know why it only gives the error when run from another script?
Jim
|