Question
newline in script string
This is so basic but I haven't found my way round it yet.
function mytest() {
var bt = new BridgeTalk ();
var theScript = "alert('Hello World');";
bt.target = 'photoshop';
bt.body = theScript;
bt.send();
}
mytest();
If I want Hello and World on different lines I would expect the following to work but it doesn't, in fact it kills the script.
var theScript = "alert('Hello\nWorld');";
I have tried various things like \\n and reversing the ' and " - so far no progress.
Andrew
function mytest() {
var bt = new BridgeTalk ();
var theScript = "alert('Hello World');";
bt.target = 'photoshop';
bt.body = theScript;
bt.send();
}
mytest();
If I want Hello and World on different lines I would expect the following to work but it doesn't, in fact it kills the script.
var theScript = "alert('Hello\nWorld');";
I have tried various things like \\n and reversing the ' and " - so far no progress.
Andrew
