Back

Variables

CountOfClips
CountOfHistory

These variables contain the number of clips in the yellow section and the number of clips in the Clipboard History sheet respectively. You can use them to set counter values or for the iterations of a loop.

Examples:

Loop CountOfClips

Counter1 = CountOfHistory - 1


LastCopy
This variable holds the last text captured by Spartan

ThisPaste
NextPaste
In a Loop which contains a PasteClipsFrom command, these variables hold the text of the clip to be pasted in the current loop and the text of the clip to be pasted in the next loop.

Examples:

If LastCopy = ""

If ThisPaste = "Fred"

if In$(NextPaste, "Fred", 1) > 0

Note:
The variables ThisPaste and NextPaste are available immediately you start a loop with a PasteClip or PasteClipsFrom command. The LastCopy variable is not available until Spartan has captured the clip. You need to insert a Wait command long enough for Spartan to copy the clip (usually 2 seconds) before using LastCopy.


Button
This variable holds the number the choice made from a menu or of the button clicked in the Message2 and Message4 dialogs.

Example:

[[Script]]
Loop
   Message2 "Follow this clip with a space or a new line?(Space)(New Line)"
   If Button = 1
      Type Space
   Else
      Type Enter
   EndIf
EndLoop

 

Back