newbie script question re Find command

dunbarx at aol.com dunbarx at aol.com
Tue Mar 22 18:20:02 EDT 2011


Joe is giving you tough love.


Check out the "offset" command as well as the "find" command. Note the "chars to skip" parameter. Read about the "foundChunk". If you are really into it, and you should be, try to find several different ways to accomplish your task.


Craig Newman





-----Original Message-----
From: Timothy Miller <gandalf at doctorTimothyMiller.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Tue, Mar 22, 2011 5:31 pm
Subject: newbie script question re Find command


Hiya,

I guess I never tried to write a script like this before. Thought it would be 
simple... Well, it is simple, probably, just not simple in a way that I actually 
understand.

How do I find multiple instances of a string in a given field of a given card 
and record each foundchunk in a variable, and then stop repeating the find 
command when the last instance is found?

I want to do this in the context of a repeat loop that goes to all the cards in 
the stack in sequence.

Sooo, I also need to know... How do I tell the repeat loop to move on to the 
next card:

- if no instance of the string is found on the card

- and

- after the last instance of the string is found on the card

Hope that's clear.

I understand I'll probably want to nest a repeat loop using the find command on 
each card, with exits when certain conditions are met. I'm choking on the 
details.

I don't need a complete and accurate script. Just the general idea.

Thanks in advance.

Tim (the world's oldest newbie)
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the Use-livecode mailing list