Text Suite
467
Command: move range until
Moves the specified range or selection until one of the specified characters is found in the document.
Use this command to return a new text range.
Syntax
move range until text range Required. An expression that returns a text range object.
characters Unicode text Required. One or more characters. This argument is case sensitive.
[count integer\constant] Optional. The maximum number of characters by which the specified
text range is to be moved. Can be a number or either the go forward or go backward constant.
If count is a positive number, the text range is moved forward in the document. If its a
negative number, the text range is moved backward. The default value is go forward.
Example
This example moves
myRange
forward through the next 100 characters in the document until the
character "t" is found.
set myRange to word 1 of active document
set myRange to move range until myRange characters "1" count 100
Command: move range while
Moves the specified text range while any of the specified characters are found in the document. Use
this command to return a new text range object.
Syntax
move range while text range Required. An expression that returns a text range object.
characters Unicode text Required. One or more characters. This argument is case sensitive.
[count integer\constant] Optional. The maximum number of characters by which the specified
text range is to be moved. Can be a number or either the go forward or go backward constant.
If count is a positive number, the text range is moved forward in the document. If its a
negative number, the text range is moved backward. The default value is go forward.
Example
This example moves
aRange
while any of the following (uppercase or lowercase) letters are found:
"a", "t", or "i".
set aRange to character 1 of active document
set aRange to move range while aRange characters "atiATI" count go forward