Re: Finding Items Within A Folder (Filemaker) AS
Re: Finding Items Within A Folder (Filemaker) AS
- Subject: Re: Finding Items Within A Folder (Filemaker) AS
- From: Jean-Marie Hoornaert <email@hidden>
- Date: Wed, 03 Oct 2001 20:55:38 +0200
le 3/10/01 20:25, Kevin Morrison a ecrit :
I have a Filemaker database that has a list of image names (field: IMAGE
NAME) as well as blank text field- (IMAGE EXIST).
What I want is for AS too look at the IMAGE NAME in the FM database, and if
it finds a picture with that name in the IMAGES folder, then put a "1" in
the IMAGE EXIST field, if no image is found a "0" in the field.
Seems simple enough, but it only wants to work for the first record. I have
it loop from within FM, but it won't set mytext beyond the first record
(though it does loop through all the records).
tell application "FileMaker Pro"
set nb_records to count records
end tell
repeat with x form 1 to nb_records
tell application "FileMaker Pro"
set myimagename to cell "IMAGE NAME" of record x
end tell
tell application "Finder"
if file myimagename of folder "IMAGES" exists then
set mytext to "1"
else
set mytext to "0"
end if
end tell
tell application "FileMaker Pro"
set cell "IMAGE EXIST" of record x to mytext
end tell
end repeat
--
French is my first language, Dutch my second and ...
AppleScript my third.
Cordialement (cordially)
____________________
Jean-Marie -HOO;-)
____________________
Jean-Marie Hoornaert
email@hidden
http://www.h2o.be
AppleScripting FileMaker
French web site