Finding and replacing "numbers" in calendar day field
Mark MacKenzie
mjmackenzie22 at windstream.net
Sat Nov 29 16:35:40 EST 2008
Hi Joe and Sarah.
I had been working with the find and then replace functions but kept getting an insurmountable pattern error message.
Sarah, your suggestion worked like a charm.
the code snippet is as follows:
on WriteEvent
put the number of lines of field "Month Events List" into tFieldLines
set the itemdelimiter to "/"
repeat with x = 1 to tFieldLines
put item 2 of line x of field "Month Events List" into tDayNeeded
put tDayNeeded && " Event" into tToPaste
find empty
find tDayNeeded in field "Dates" of group "Main_Group"
put tToPaste into foundChunk
-- replace tDayNeeded with tToPaste in field "Dates" of group "Main_Group"
end repeat
end WriteEvent
This works like a charm.
But has also left me with another question.
Thank you
Mark MacKenzie
Art Conservator & Wet Plate Photographer
Alcalde, New Mexico
More information about the use-livecode
mailing list