Sg2.9
Problems with text areas? or...
Recent RSS
Problems with text areas? or textframes in general?
From:  g
Date:  8. April 2007, 02:12

I've been trying to create some textFrames via code and also tried to use the TextPencil script I found on the site:

it seems that the textFrames are created, but they are empty. (or contain unknown size letters - the textframe shows the red Wrapping button [+] but never shows any text, not even when i try to edit it, etc.

I did find out that when i save a file that I tried using textpencil on to SVG, suddenly all the letters appear (with my textframes from my other script as well.)

Also, I was trying to write a quick script to reverse text within selected frames -> console messages sometimes doesn't show up (unless there's something i'm missing) - and sometimes the same code seems not to work - also, Illustrator sometimes completely crushes when I try those things.

code:

function reverseText()
{
	var selection = activeDocument.selectedItems;

	var textFrameCount = 0;

	for (var i = 0; i < selection.length; i++)
	{
		item = selection[0];

		if (item instanceof TextFrame) 
		{
			textFrameCount++;
			
			var textFrame = TextFrame(item);

			var text = textFrame.getContent();
			
			var newText = "";
			
			for (var j=0; j<text.length; j++)
			{
				newText = text[j] + newText;
			}

			textFrame.setContent(newText);
		}
	}
	if (textFrameCount == 0)
	{
		Dialog.alert("no text frames are selected.")
	}
}
Re: Problems with text areas? or textframes in general?
From:  Jürg Lehni
Date:  8. April 2007, 04:56

Could you please provide more information about your system and the versions of Illustrator, Scriptographer and Java? Thanks! Also, could you send a crash-log to sg AT scriptographer DOT com?

Re: Problems with text areas? or textframes in general?
From:  g
Date:  10. April 2007, 11:41

I'm running cs3 on osx and the latest scriptographer.

I'll get home later and try to generate the crushes again and check the java version as well.

thanks.

Re: Problems with text areas? or textframes in general?
From:  g
Date:  10. April 2007, 18:18

OSX 10.4.9,
and when i look at the system profiler:
javavm is 11.5.0

anything else?

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Ideé replacer 02.07.11
by peko