Help - shadow job folders appearing
Help - shadow job folders appearing
- Subject: Help - shadow job folders appearing
- From: Brett Conlon <email@hidden>
- Date: Mon, 10 Apr 2006 18:19:04 +1000
Hiya,
On two (that I know of so far) of my
designer's Macs (10.3.7 & 10.3.9) when they run an AutoPDF script I
wrote they are finding that their job folders are duplicating. But it's
like they are "shadows" as their names are identical but if you
force quit the Finder or if you send one to the trash then Undo the shadow
disappears. Sometimes if they run the script 3 or 4 times in a row there
will be 3 or 4 shadows.
When I was trying to diagnose the problem
code I could see the duplicate in the Finder window but when I click in
the Finder the duplicate disappears. But most of the time it stays.
I recently added the following handler
to the script and that's when the duplication issue showed up:
to
movePDF(FilePath, TimeNow, PDFType)
tell
application "Finder"
set
EnclosingFolder to
container of
FilePath
try
repeat
until
name of
EnclosingFolder contains
"Output"
set
EnclosingFolder to
container of
EnclosingFolder
end
repeat
if
PDFType is
"Client approval" then
set
PDFFolder to
first
folder of
(container of
EnclosingFolder) whose
name contains
"PDF"
else
set
PDFFolder to
first
folder of
(container of
EnclosingFolder) whose
name contains
"Dispatch"
end
if
set
TopFolder to
container of
EnclosingFolder
on
error
activate
set
PDFFolder to
choose folder with prompt "Move the new PDF to which folder?"
end
try
try
tell
(first
file in
desktop whose
file type is
"PDF " and
creation date is
greater than
TimeNow)
repeat
until
exists
delay
0.5 (* release some processing time to other operations - modify as
appropriate *)
end
repeat
move to PDFFolder with
replacing
delete
end
tell
activate
open PDFFolder
set
current view of
window (name of
PDFFolder) to
list view
tell
(first
file in
PDFFolder whose
file type is
"PDF " and
creation date is
greater than
TimeNow) to
select
update
TopFolder
display
dialog "The PDF is saved to the \"" & (name of
PDFFolder as
text) & "\" folder (opened for your convenience)."
on
error
display
dialog "There was an error creating or moving the PDF file."
with icon stop buttons {"OK"} default button 1
end
try
end
tell
end
movePDF
On all of the Macs I tested the script
on the issue didn't show. I even tried putting an update command for the
folder containing the job folders but that hasn't cleared it up.
I think the issue showed up when I commented
the bottom try statement so the issue could be in the top one but I also
think that running both try statements made the issue happen more consistently.
Can anyone see anything that could be
causing this weird shadowing?
Your urgent help is most appreciated!
Regards,
Cojcolds
_______________________________________________
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