ScriptUI [ JS ]: Working with text in a Palette or a Dialog "edittext" field Mac vs. Win
Hello all,
recently I downloaded Peter Kahrels' famous "scriptui-2-0.pdf" and began working on some of his examples. I think Peter is developing mainly on Windows OS, so I think it's worth sharing some observations from "Palettes" and "Dialogs" with an "Textedit" field on a Mac.
I found that in both cases, "palette" and "dialog" kind of Windows objects, there are certain possiblities for working with text inside a "textedit" field on a Mac.
TESTED WITH:
InDesign CS5.5 v7.5.3
InDesign CS5 v7.0.4
InDesign CS4 v6.0.6
Mac OSX 10.6.8
MacBook Pro 5,1 Intel Core 2 Duo
Selecting text:
Tab selects all text in the "edittext" field.
Alt + Shift + Arrow Right selects one character right from the insertion point.
Alt + Shift + Arrow Left selects one character left from the insertion point.
Alt + Shift + Arrow Down selects all text in one paragraph right from the insertion point.
Alt + Shift + Arrow Up selects all text in one paragraph left from the insertion point.
Inserting text:
Ctrl + Return inserts a "new paragraph" (\r) symbol at the insertion point.
Cmd + v inserts text in the "edittext" field regardless where it was copied or cut from (e.g. an InDesign text frame).
Strange: if you choose to copy/paste from an InDesign text frame to the "edittext" field, a new line character (\n) is added after the inserted text in the "edittext" field.
This will NOT happen, if you:
1. copy/paste text from and to the "edittext" field
2. copy/paste text from Apples TextEdit app to the "edittext" field
3. copy/paste text from Adobe Acrobat Pro to the "edittext" field
4. copy/paste text from your browser to the "edittext" field
…
Alt + Tab inserts a Tab character at the insertion point.
Deleting text:
Cmd + x cuts selected text from the "edittext" field.
Ctrl + Cmd + d deletes text right from the insertion point.
Ctrl + Cmd + Shift + d deletes text right from the insertion point.
Delete deletes text left from the insertion point.
Copy text:
Cmd + c copies selected text from the "edittext" field.
Strange: a part of a paragraph with a end of line character (\n) copied from an InDesign text frame was left out.
I still have to verify that phenomenon…
Moving the cursor:
Ctrl + Cmd + a moves the cursor at the beginning of a line.
Ctrl + Cmd + Shift + a moves the cursor at the beginning of the previous line.
Ctrl + Cmd + e moves the curser to the end of a line. Sometimes at the end of the previous line.
Differences from "palette" to "dialog":
Esc closes a "dialog", does nothing on a "palette".
WARNING: Esc also closes a "palette" when a "dialog" is present. It not only closes it, but destroys the "palette".
EDIT: when run in the same #targetengine.
Uwe
Message was edited by: Laubender
