ah ok now it works perfectly well.
thanks a lot:)
just one thing (which has no influence on the actual script). when using auto format to structure the text, i get as an error: 1024
(and heaps of red printed text with detailled information about the error.
I'm not sure whether this might be useful, so i post it here. it does influence at all the script, but maybe you have an idea what this error is all about.
anyway thanks for helping me with the StringBuffer!!!
java.lang.ArrayIndexOutOfBoundsException: 1024
at processing.app.tools.AutoFormat.getnl(AutoFormat.java:341)
at processing.app.tools.AutoFormat.show(AutoFormat.java:619)
at processing.app.Editor$20.actionPerformed(Editor.java:620)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.ja
va:1872)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:321)
at javax.swing.AbstractButton.doClick(AbstractButton.java:269)
at javax.swing.plaf.basic.BasicMenuItemUI$ClickAction.actionPerformed(BasicMenuItem
UI.java:1073)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1535)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2470)
at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:658)
at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:666)
at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:666)
at javax.swing.JMenuBar.processKeyBinding(JMenuBar.java:642)
at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:253)
at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:240)
at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2547)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2539)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2433)
at processing.app.syntax.JEditTextArea.processKeyEvent(JEditTextArea.java:1637)
at java.awt.Component.processEvent(Component.java:4975)
at java.awt.Container.processEvent(Container.java:1613)
at java.awt.Component.dispatchEventImpl(Component.java:3681)
at java.awt.Container.dispatchEventImpl(Container.java:1671)
at java.awt.Component.dispatchEvent(Component.java:3543)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1713)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManage
r.java:627)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusMan
ager.java:831)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusMan
ager.java:741)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.j
ava:592)
at java.awt.Component.dispatchEventImpl(Component.java:3572)
at java.awt.Container.dispatchEventImpl(Container.java:1671)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3543)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:2
34)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184
)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)