Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

special characters makes trouble with bridge talk in loaded script

Community Expert ,
Jun 10, 2013 Jun 10, 2013

Why is this so and what can I do?

I use several scripts in Illustrator. Some of them I use in this way:

http://www.davidebarranca.com/2012/11/scriptui-bridgetalk-persistent-window-examples/

Now I tried to built in two other scripts in the palette. In this scripts it is required to use special characters in variables. Standalone these scripts are work correct.

Here is an simple example:

// exampleScript.jsx

var a = '\u201d'+" example "+'\u201d';

alert(a)

I get this (correct) result:

script_standalone.png

But when I call this example script with bridge talk:

var scriptToLoad = new File(pathToScript + "/exampleScript.jsx");

var win = new Window('palette', 'own palette');

var btnSelect = win.add('button', undefined, 'example');

btnSelect.onClick = function()

{scriptToLoad.open("r"); var bt = new BridgeTalk;

bt.target = "illustrator"; var script = scriptToLoad.read();

scriptToLoad.close(); bt.body = script; bt.send();}

win.center();

win.show();

Here is the same script and the wrong result:

scriptBridgeTalk.png

What can I do to fix this?


TOPICS
Scripting
1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 11, 2013 Jun 11, 2013

hmm...Davide says we can't use back slash (\) with BridgeTalk in the Link you provided...

...check this thread to see if you can't get something to work

http://forums.adobe.com/message/3577867#3577867

Translate
Adobe
Community Expert ,
Jun 11, 2013 Jun 11, 2013

hmm...Davide says we can't use back slash (\) with BridgeTalk in the Link you provided...

...check this thread to see if you can't get something to work

http://forums.adobe.com/message/3577867#3577867

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2013 Jun 11, 2013

Hello CarlosCanto,

thank you for sharing the link. (Oh god, so much to read - and this with my English)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2013 Jun 11, 2013

your English is fine, it is waaaaaaaaaaay better that my German

edit:

is it German? or Deutsch?

Message was edited by: CarlosCanto

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2013 Jun 12, 2013

Really fine or amusing?

CarlosCanto wrote:

… Deutsch?

Woah!

100% perfect grammar and orthography.

Certainly there are not so much people are able to imitate this result.

back to topic

In your link I have found what I was looking for.

Even if the subject matter was a completely different - probably is the "Backslash-BUG" also the cause. Now I use an alternative syntax for the special characters and everything works perfect.

Thanx

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2013 Jun 12, 2013

Certainly there are not so much people are able to imitate this result.

I'm not that smart...I googled that

Now I use an alternative syntax for the special characters and everything works perfect.

do you mind sharing how you solved it?

thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2013 Jun 12, 2013

CarlosCanto wrote:

do you mind sharing how you solved it?

thanks

No problem:

...check this thread to find the solution

http://forums.adobe.com/message/3577867#3577867

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2013 Jun 12, 2013

I hope you'll forgive me the little joke.

There are several ways to (call) special characters about their unicode.

This linked thread has reminded me.

decodeURI()

unescape()

String.fromCharCode()

and so on …

I use the unescape-method.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2013 Jun 12, 2013

hahaha, no problem, I did the same to you earlier

thanks for sharing

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2013 Jun 12, 2013
LATEST

My pleasure,

and thanks for the help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines