Finding Items Within A Folder (Filemaker) AS
Finding Items Within A Folder (Filemaker) AS
- Subject: Finding Items Within A Folder (Filemaker) AS
- From: Kevin Morrison <email@hidden>
- Date: Wed, 03 Oct 2001 11:25:53 -0700
Applescript Wizards,
I'm battling this little script. Pretty pitiful, but long days and late
hours have turned my mind into a jello like mush which can't seem to find
the problem. Insights appreciated!
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"
activate
set myimagename to cell "IMAGE NAME" of current record
end tell
tell application "Finder"
activate
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"
activate
set cell "IMAGE EXIST" to mytext
end tell
Thanks in advance to any direction available.
Kevin
Kevin Morrison
Dorian Studio Inc