LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
i need a little script that find a string and then after take some chars on the right of this string...until encounter another string for example "pippo"...
find "minutes" in field"search"
if the foundtext is "minutes" then
put the char 1 to string"pippo" after the foundtext into field"test"
end if
In other words i need to get the chars on the right of a find command until i encounter a string that i want...in this case pippo....(it's an example)...
You see how compact and robust Simon's script is. You do not need to find anything.
But he wrote in a way that will work with words, not strings. This may be what you intended, given your example, even though you used "string" and "chars" instead of "word".
So if this is the case, you are done. But if not, and you really wanted strings (like "min" and "ppo"), can you make his ideas work for you?
Glad it worked for you!
You should check out wordOffset in the dictionary and figure out the "words to skip". That way if your search terms come up multiple times in a document you can keep track of where you were and then just skip your first find when used in a loop.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!