okay.
You can do it with letters, but not with words.
when gf clicked set [counter v] to [1] set [letter count v] to [0] repeat (length of (document)) if <(letter (counter) of (document))=[letter wanted]> change [letter count v] by (1) end change [counter v] by (1) end
Last edited by berberberber (2012-06-29 00:04:27)
Offline
Adding on to what berberberber said... you can just take that script and use multiple letters to read words.
You can also have what is inputted a list or variable, so you can just make a script that reads it.
EDIT: I think my newest project may help you a little bit. I made it so when a certain element is put in, it will tell you a number. You can do something similar with it so instead, it tells you the amount of times it was inputted.
Last edited by JJROCKER (2012-06-29 02:06:37)
Offline
This is possible, here is a nice code for it:
Put your document into a variable called "document".
Create these variables:
loopcounter
adder
and this list:
words
and use this script:
delete (all v) of [words] set [adder v] to [] //Blank. set [loopcounter v] to [1] repeat (length of (document)) if <(letter (loopcounter) of (document)) = [ ]> //A space. add (adder) to [words v] set [adder v] to [] //Blank. else set [adder v] to (join (adder) (letter (loopcounter) of (document))) end change [loopcounter v] by (1) end add (adder) to [words v] set [adder v] to [0] set [loopcounter v] to [1] repeat (length of [words v]) if <(item (loopcounter) of [words v]) = [YourWord]> change [adder v] by (1) end change [loopcounter v] by (1) endThe "adder" variable will contain your answer when the script is finished.
Last edited by SciTecCf (2012-06-29 03:05:08)
Offline