Hi. I have a question.
How can I get keyboard cursor(caret) position in javascript?
I made a multilined edittext in ScriptUI.
But It's not working about Enter key.
All I want is when I push 'enter' key, begin a new line.
If I know how to get keyboard cursor position, I can insert '\n' character in middle of sentances.
/////////////////////////////////////////////////////////////////////////////////////
var win =new Window ("dialog", '');
win.orientation = "column";
var grpContents = win.add("group")
var codeInput = grpContents.add ("edittext", [0, 0, 150, 550], "", {multiline:true});
codeInput.alignment = ['fill', 'top']
codeInput.active = true;
codeInput.onEnterKey = function(){
codeInput.text = codeInput.text+"\n"
}
win.show()
/////////////////////////////////////////////////////////////////////////////////////
I use windowsXP and Illustrator CS3.
If you know about that, please help me!~