Using the Library
An example
The Library Handlers
property stimList : {"
% ", " $ ", " @
", " ? ", " & ", " ^
", " > ", " < ", " (
"} -- the list of mask characters
set listHandler to
load script ""
to createMaskStimuli
( howmany ) -- returns a list
of mask words
set maskListOut to {} -- will contain a list of mask stringsend createMaskStimuli
set theMaskCharacters to sample ( howmany , stimList , false ) of listHandler -- grab 7 unique mask characters
repeat with aMaskCharacter in theMaskCharacters -- pad each mask character out to a length between 3 and 7 repeatsset theMaskString to ""end repeat
repeat with n from 1 to ( random number from 3 to 7 )set theMaskString to theMaskString & aMaskCharacterend repeat
set end of maskListOut to (" ' " & theMaskString & " ' ") -- single quotes so it is not interpreted as an instruction
return maskListOut
set minlength to count of characters of item wordIndex of WordStimuliend packMaskLengthToPreceedingWord
set theCharString to text 2 through -2 of item maskIndex of maskList -- step over quote
set maskLength to count of theCharString
if maskLength < minlength thenset theMaskCharacter to character 1 of theCharStringend if
repeat with n from 1 to ( minlength - maskLength )set theCharString to theCharString & theMaskCharacterend repeat
set item maskIndex of maskList to " ' " & theCharString & " ' "
return maskList
| MACCS | |
Documentation | Downloads | FAQ | Mailing List | Last change: echo date( "F d Y.", getlastmod() ); ?> |
| Advanced Search |