Re: FileMaker Pro, get image by reference
Re: FileMaker Pro, get image by reference
- Subject: Re: FileMaker Pro, get image by reference
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 23 Nov 2002 09:32:29 -0800
On 11/23/02 8:59 AM, "Gary Lists" <email@hidden> wrote:
>
============== Gary's FileMaker image file copier =============
>
set as_file_reference to (cell "Image Lo Res" of current record)
>
-- its still just a text string, like "HD:Documents:Images:"
>
set as_file_path to as_file_reference as alias
>
-- now its a full mac file reference
>
--
>
tell application "Finder"
>
activate
>
try
>
copy file as_file_path to desktop -- * change dest folder here
"copy"??? to desktop?? In which OS does this work? In OS 9 'copy' in the
Finder - without a reference - means 'copy selection to the clipboard'. And
that work yet in OS X. Furthermore, even if it did, why in the world would
you have set as_file_path to an alias if you're now using the Finder's own
'file' keyword? That takes a string path (or a file name as part of a Finder
expression including all the folders and disks) , not an alias. you must be
depending on Akua or Jon's to coerce it back to string path for you, which
is a waste of effort and won't work for someone who doesn't have either
installed. Without Jon's or Akua, the Finder will understand either the
'alias' reference, or 'file stringPath', but NOT 'file alias' - not both.
And 'file stringPath' is better than giving it an alias.
Or are you actually using some osax which has 'copy file' as a keyword?? (I
would hope no osax would ever have such a confusing namespace-conflicting
keyword.)
Surely what you're trying to do, at least in the Finder, is
set as_file_reference to (cell "Image Lo Res" of current record)
--string path
tell app "Finder"
try
duplicate file as_file_reference to the desktop
DUPLICATE, not copy, with 'file stringPath' as reference. Since you've been
using your script, something is working somehow. But it must be due to
silent osax coercions.
>
on error errMsg number errNum
>
if errNum = -15267 then
>
display dialog "A copy is already on the desktop." buttons "OK"
>
[NO-BREAK-remove] with icon stop
>
else
>
display dialog "Oops.! Can not copy the file." & return & return &
>
[NO-BREAK-remove] errNum buttons "OK" with icon stop
>
end if
>
end try
>
end tell
>
==================================================
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.