This is a script that among other things, creates a string of text from user input adding the words Cyan Magenta Yellow Black at the end. This is for marking plates with the respective colors. This script as far as I can tell, works fine in every file I've tried it on, except one which gives the above cryptic error. Hitting End in the dialog ends the script execution but Draw is then in a state that it can't be used and has to be closed. Doesn't crash, just doesn't update the screen.
Here's the relevant code that is causing the problem, it counts the words in the line of text and selects the relevant color name and applies the correct color to it:
Dim tr1 As TextRange, tr2 As TextRange, tr3 As TextRange, tr4 As TextRange Dim wordcount As Long wordcount = ActiveShape.Text.Story.Words.Count Set tr1 = TxtInfo.Text.Story.Words(wordcount - 3) Set tr2 = TxtInfo.Text.Story.Words(wordcount - 2) Set tr3 = TxtInfo.Text.Story.Words(wordcount - 1) Set tr4 = TxtInfo.Text.Story.Words(wordcount) tr1.Fill.UniformColor.CMYKAssign 100, 0, 0, 0 tr2.Fill.UniformColor.CMYKAssign 0, 100, 0, 0 tr3.Fill.UniformColor.CMYKAssign 0, 0, 100, 0 tr4.Fill.UniformColor.CMYKAssign 0, 0, 0, 100
It gets hung on the first color assign for the Cyan word, "tr1.Fill.UniformColor.CMYKAssign 100, 0, 0, 0" if I comment that out, it gets hung on the next line for Magenta, and I presume from there on, I didn't test that far.
Again, this works fine in other files, just not this particular file for some reason. If I copy out the relevant objects to a new file, then it works fine, but in it's original file, it doesn't work. Kind of an odd thing and there is a work around but if I could find out what in this particular file is causing this issue, that would be nice to eliminate the problem.
Is it for a non-postscript device?
The file is eventually sent to a RIP via PDF, but that has nothing to do with how the script runs, it doesn't care what or even if a printer is used. All it does is take user input, then do some functions to the objects on the page.
Sorry for the delayed response, I was away viewing the eclipse.
Thanks.