• 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
Re: script will error when nothing in a watched folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: script will error when nothing in a watched folder


  • Subject: Re: script will error when nothing in a watched folder
  • From: vectormation <email@hidden>
  • Date: Wed, 7 Mar 2001 17:03:46 -0500

check that theFile exits...

on fileExists(aFile)
--aFile is a string representing the file path
set rCode to false

try
set tmp to aFile as alias
set rCode to true
on error
set rCode to false
end try

return rCode
end fileExists

set testPath to "Startup Drive Name:System Folder:"
set theRez to fileExists(testPath)

if theRez then
--do stuff
else
--handle the error
end if


~Phi

>the script I have written will...
>take a PDF from a watched IN folder
>open in Acrobat 4.0
>print out a copy ( or copies )
>and save to an OUT folder
>it works fine until there is no file is in the IN folder.
>
>it errors at:
>
> tell application "Acrobat 4.0"
> activate
> open theFile as alias <----alias is the error highlighted
> end tell
>
>the error reads:
>
> Can't make {} into a alias.
>
>what should I do??
>any help will be appreciated.
>
>p.s.
>Thanks for all the help in the past
>_______________________________________________
>applescript-users mailing list
>email@hidden
>http://www.lists.apple.com/mailman/listinfo/applescript-users


  • Prev by Date: Re: TIDs case insensitive?
  • Next by Date: Re: Signature appPath launch with nested appName tells...
  • Previous by thread: RE: script will error when nothing in a watched folder
  • Next by thread: Re: script will error when nothing in a watched folder
  • Index(es):
    • Date
    • Thread