Re: script will error when nothing in a watched folder
Re: script will error when nothing in a watched folder
- Subject: Re: script will error when nothing in a watched folder
- From: Sander Tekelenburg <email@hidden>
- Date: Thu, 8 Mar 2001 01:26:44 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At 10:14 -0600 UTC, on 07/03/2001, Keith Bailey wrote:
>
the script I have written will...
>
take a PDF from a watched IN 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??
Something like this perhaps:
if theFile is not {}
tell application "Acrobat 4.0"
activate
open theFile as alias
end tell
end if
HTH
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <
http://www.pgp.com>
iQA/AwUBOqbRsusywKfXgqKdEQK5tACgjC38Zfb/DVtgALlNMfKg8XED5DcAoO1w
fSX8PA80Zg3j03TbjVWUQq30
=So6B
-----END PGP SIGNATURE-----
--
Sander Tekelenburg, <
mailto:email@hidden>
Web site at <
http://www.euronet.nl/~tekelenb/>
Mac user: "Macs only have 40 viruses, tops!"
PC user: "SEE! Not even the virus writers support Macs!"