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

Embed binary code in JavaScript

Explorer ,
Oct 22, 2015 Oct 22, 2015

Copy link to clipboard

Copied

Hi guys...

I would like to embed a file that I exported as binary code (Embed really needed).

But I don't know how to use it with .execute();

Is this possible?

Take a look the picture and many thanks for your time...

3.jpg

TOPICS
Scripting

Views

1.8K

Translate

Translate

Report

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 , Oct 23, 2015 Oct 23, 2015

This works fine in my environment(OSX10.11.0).

Read file contents and evaluate it.

var f = new File("~/Desktop/test.jsx");

if(f.open("r")) {

  eval(f.read());

  f.close();

  }

Votes

Translate

Translate
Adobe
Community Expert ,
Oct 23, 2015 Oct 23, 2015

Copy link to clipboard

Copied

test it:

var bin = "@JSXBIN@ES@2.0@MyBbyBn0ABJAnAEjzFjBjMjFjSjUBfRBFeLjUjFjTjUhAiCjZjOjBjSjZff0DzACByB";

eval(bin);

Votes

Translate

Translate

Report

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
Explorer ,
Oct 23, 2015 Oct 23, 2015

Copy link to clipboard

Copied

Hi Ten

Do you know how to convert this path to mac?

I have tried to do it but it didn't work too.

It works in Windows but not in Mac!

var nf = new File("C:/Users/Dell Inspiron 14/Documents/Actions/Forms/ZoomSel.jsx");

nf.execute();

Best regards_

Votes

Translate

Translate

Report

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
Participant ,
Oct 23, 2015 Oct 23, 2015

Copy link to clipboard

Copied

what address you are passing in file obj

Votes

Translate

Translate

Report

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
Explorer ,
Oct 23, 2015 Oct 23, 2015

Copy link to clipboard

Copied

Hi

I want to use this file in this path

Macintosh HD/Users/Admin/Desktop/Atns/Test.jsx

Votes

Translate

Translate

Report

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
Participant ,
Oct 23, 2015 Oct 23, 2015

Copy link to clipboard

Copied

can you please try this a forward / at the starting


/Macintosh HD/Users/Admin/Desktop/Atns/Test.jsx

Votes

Translate

Translate

Report

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
Explorer ,
Oct 23, 2015 Oct 23, 2015

Copy link to clipboard

Copied

Using “” or not, displays error… another solution with doScript? 😕

Screen Shot 2015-10-23 at 1.55.40 PM.png

Votes

Translate

Translate

Report

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 ,
Oct 23, 2015 Oct 23, 2015

Copy link to clipboard

Copied

This works fine in my environment(OSX10.11.0).

Read file contents and evaluate it.

var f = new File("~/Desktop/test.jsx");

if(f.open("r")) {

  eval(f.read());

  f.close();

  }

Votes

Translate

Translate

Report

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
Explorer ,
Oct 23, 2015 Oct 23, 2015

Copy link to clipboard

Copied

Thanks bro!

I will give it a try in a few minutes... if you gave it a try, I know it work!

On more please... Did you try the binary code? Does it work?

I haven't had the time to see if the binary code works...

A handshake Ten!

Votes

Translate

Translate

Report

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 ,
Oct 23, 2015 Oct 23, 2015

Copy link to clipboard

Copied

LATEST

Previous test.jsx file contain binary codes like below:

@JSXBIN@ES@2.0@MyBbyBn0ABJAnAEjzFjBjMjFjSjUBfRBFeLjUjFjTjUhAiCjZjOjBjSjZff0DzACByB


It worked.

Votes

Translate

Translate

Report

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