• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can't Wait
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't Wait


  • Subject: Can't Wait
  • From: John McAdams <email@hidden>
  • Date: Thu, 25 Oct 2001 13:48:41 -0400

Dear Scripters,

I'm having trouble getting Distiller and Acrobat coordinated. Acrobat keeps trying to grab the file before it's finished distilling. I'm using the following routine (su_disk is a property for the Startup disk):

--THIS ROUTINE HALTS THE SCRIPT UNTIL THE PDF IS FINISHED
on wait_till_PDF(job_name)
tell application "Finder"
activate
repeat 300 times
try
set PDFs_out to name of every file of folder (su_disk & "Watch This:Out:" as alias) whose file type is "PDF "
if PDFs_out contains job_name then exit repeat
delay 2
on error
display dialog "No PDFs found in out folder!"
delay 2
end try
end repeat
end tell
end wait_till_PDF

I tried using the delay routine that Apple includes in some Folder Action scripts but it was very slow and unreliable (although that could be my fault). Any suggestions?

---------------------------------------
John McAdams
email@hidden


  • Follow-Ups:
    • Re: Can't Wait
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: any way to tell if a script has a 'return' statement?
  • Next by Date: Re: run script
  • Previous by thread: Re: Adjusting height of textbox in Qxp
  • Next by thread: Re: Can't Wait
  • Index(es):
    • Date
    • Thread