Thank you all for your help.
Apologies for the lack of clarity in my question but have now managed to solve my difficulty.
I stumbled across the 'lineoffset' command in the dictionary which gave me the answer.
Just in case its of use to anyone, what I basically wanted to do was to delete a line of a list that contained some defined text.
so what I did was:
- put the text into a variable
- put the variable into the lineoffset command
- this told gave me the line number that the text was in
- and so I was then able to delete that line
The code looked like this:
Code: Select all
if field"Field" of card "Main" contains tTextToDelete then
go to card"Main"
put lineoffset(tTextToDelete, field"Field") into tLinetoDelete
delete line tLinetoDelete of field"Field"
I was particularly proud of myself as I'd not come across the lineoffset command before and managed to use it successfully!
Everyday a new livecode learning event... yesterday it was the 'exists' command!
Thank you again,
Glenn