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: Malcolm Fitzgerald <email@hidden>
- Date: Thu, 4 Oct 2001 08:48:58 +1000
--- this is untested but should be pretty close to what you want
set imageNames to {}
set imageExists to {}
tell application "FileMaker Pro" to set imageNames to (get field
"IMAGE NAME" of layout 0 of database "xxxx")
tell application "Finder"
repeat with anImage in imageNames
set end of imageExists to ( file anImage of folder "IMAGES" exists )
end repeat
end tell
tell application "FileMaker Pro" to set field "IMAGE EXIST" of
layout 0 of database "xxxxx" to imageExists
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
_______________________________________________
applescript-users mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/applescript-users
--
Malcolm Fitzgerald
Database Manager
The Australian Society of Authors
ph: 02 9318 0877 fax: 02 9318 0530 email: email@hidden
www.asauthors.org www.asauthors.org/award www.asauthors.org/web_of_poets