Finding an item number
Posted: Tue Jan 06, 2009 12:31 am
Hi, I've jumped projects again (as I tend to do) and for this particular project, I'm using Custom Properties to save text data. I've based my script on a good stack I found in RevOnline. That all works fine except it loads one line from each field.
So I've been thrashing about trying to come up with a way to retrieve/save multiple lines from each field. For retrieving, my thinking is that when the user selects a particular line in a list box, then if I could find that particular string in the field with the data saved as the custom property, then the next amount of items could easily be put into the relevant fields.
So here's my clumsy code (in the list field):
The basic problem with this is I don't know how to find the item number within the field "Main" of the string taken from field "Choice". (i.e my code "put the number of item Thisone in field "Main" into tCount" doesn't work...) Could anyone advise me please 
So I've been thrashing about trying to come up with a way to retrieve/save multiple lines from each field. For retrieving, my thinking is that when the user selects a particular line in a list box, then if I could find that particular string in the field with the data saved as the custom property, then the next amount of items could easily be put into the relevant fields.
So here's my clumsy code (in the list field):
Code: Select all
on mouseUp pMouseBtnNo
set itemdel to "#"
put the selectedText of me into Thisone
find Thisone in field "Main"
put the number of item Thisone in field "Main" into tCount
put item tCount into field "A"
put item tCount + 1 into field "B"
put item tCount + 2 into field "C"
end mouseUp
