bonnmike at gmail.com
Tue May 7 14:19:56 EDT 2013
If you want the value of the clickline you can use value(the clickline) the
clickcharchunk returns a char offset at which point you can "put the number
of lines in char 1 to (word 2 of the clickcharchunk) of container" then
subtract the number of chars of line 1 to (word 2 of the clickcharchunk) -
1) from word 2 of the clickcharchunk (I think, this is just off the top of
my head real quick) Something like that, though the indexes make it mucho
easier. I'm sure there are other probably easier ways but these work ok.
On Tue, May 7, 2013 at 12:09 PM, Peter Haworth <pete at lcsql.com> wrote:
> Struggling a little with the correct use of the clickline.
> It returns something like "line 3 of field 1" so I would have expected that
> something like "put the clickline into tLine" would get me the contents of
> line 3 of field 1, but it gets me "line 3 of field 1".
> Is there a way to use the full contents of the clickline? Right now, I'm
> doing "put line (word 2 of the clickline) of field (word 4 of the
> clickline) into tLine", but that seems unnecessarily longwinded. I guess I
> could use "do" and piece together a command but that doesn't seem like a
> good solution either.
> Got a related issue with the clickCharChunk. It gets me the overall
> character number within a field; what I need is the character position
> within the line of the field. I know there are some indexxxx functions
> from 5.5 onward but how did people figure this out prior to 5.5?
> lcSQL Software <http://www.lcsql.com>
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode