Custom property & selection of text
themacguy at macosx.com
Thu Jul 8 16:36:08 CDT 2004
I have a stack with a field that contains a line of text. I want to
programmatically select (hilite) a portion of the text. If I use something
select word 1 to 4 of field 1
wait 2 seconds
...that works fine. However, each card on which the field appears will have
a different sentence with varying qtys of words. The content will be static.
I¹d like to utilize some custom properties in each field to keep track of
which groups of words are to be hilited. I was thinking of something like
this (for one of the fields):
Custom peoperty holding
sec1 "word 1 to 4"
sec2 "word 5 to 8"
(note that another card¹s field might have three custom properties of ³word
1 to 4², ³word 5 to 7², and ³word 8 to 12²)
...but the scripting of this escapes me. I've looked at:
get the customproperties["customKeys"] of field 1
...but this returns nothing.
The script I envision would work something like this:
1. Determine the number of custom properties in the field (which tells me
how many groups of words I have).
2. Loop through the custom properties and highlight the respective groups in
a timed sequence.
Any assistance would be appreciated.
More information about the use-livecode