Hi Jonathan,
You end up with my quick and dirty solution...
Just a word: else is not necessary in this case since you run a next
repeat if the condition is verified ;-)
Le 20 juil. 05 à 22:48, Lynch, Jonathan a écrit :
I get a small increase in speed by abandoning the inner loop, allowing
the script to just go to the next word when there is not a match. I am
running a bunch of other programs on my computer right now, so my
speed
is compromised. Using Ro's script, I clocked at 75 milliseconds.
Modifying his script as shown below, I improved to 64 milliseconds:
on mouseUp
put the milliseconds into M
put fld "W" into W
put fld "E" into E
repeat for each line L in W
if char 1 to 2 of L is not in E then
next repeat
else if char 3 to 4 of L is not in E then
next repeat
else if char 5 to 6 of L is not in E then
next repeat
else if char 7 to 8 of L is not in E then
next repeat
else if char 9 to 10 of L is not in E then
next repeat
end if
put L & linefeed after F
end repeat
put the milliseconds-M into field "computation time"
put F into field "output"
end mouseUp
Best Regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
So Smart Software
For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch
Free plugins and tutorials on my website
----------------------------------------------------------------
Web site http://www.sosmartsoftware.com/
Email [EMAIL PROTECTED]/
Phone 33 (0)1 43 31 77 62
Mobile 33 (0)6 20 74 50 86
----------------------------------------------------------------
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution