/* This Genie applies random colours to a selected block of text. Warnings: it is slow, it increases the length of the selected text by a factor of 8 or 9 (because of all the style codes needed), and it slows ProPage down to a crawl. So only do it at the end when you have got everything else right.
Written by Don Cox ⌐ Dec 92 Not Public Domain. All rights reserved. */
trace n
signal on error
signal on syntax
address command
if word(ppm_GetState(), 1) ~= 3 then exit_msg("You must be in edit mode to use this Genie")
text = ppm_GetBlockText(0)
if text = '' then exit_msg("No text selected")
collist = ppm_GetColorList()
collist = substr(collist, pos('0a'x, collist) + 1) /* It begins with a number */