scripting challenge: Large/Smaller text size
Claudi Cornaz
claudi.c at fiberworld.nl
Sat Jul 2 17:23:51 EDT 2005
woooooow,
I realy feel humble. I have been working on a text menu with bigger
smaller as one of the features.
I have been working on it quite a while. I have got it working but now
as I see these
bautifull and elegant solutions, I can start all over again. (putting a
couple of checks in of course so not to make
text smaller then 7 pts which gives strange results and a pref for how
to proceed when the smallest size in the
selected text reaches 7pts, stopping or leaving that part at 7 pts and
making the rest smaller)
There are so many ways to do things in runrev and it's very enlightning
to see how the pros
tackle a problem. One of the best ways to learn for me (and others as
well I guess)
Couldn't we have chalenges like this, let's say once a week or once a
month? My guess is that
a lot of people could realy benefit from these chalenges/examples.
In my own solution I used matchChunk to get at all the font tags with a
size attribute, which
also works but uses a lot more code and altough reaseably fast not in a
long shot like the code of Mark.
One advantage of all my toiling though, I learned a bit about regex, I
am not completly confused by it anymore.
Very humbly and awe strikken
Claudi
More information about the use-livecode
mailing list