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

want to open .ai file in illustrator using javascript

Explorer ,
Oct 09, 2017 Oct 09, 2017

Copy link to clipboard

Copied

Hi.

i want to open a .ai file in illustrator using javascript.

1.my file structure is like this.

structure.PNG

2.added script in main.js

main.PNG

the code above the function open_image is developed before and i have added this function atlast.

3. code inserted in hostscript.jsx

host.PNG

in the above file i have inserted the function openfile

4. now in html

<img ng-src="data:image/png;base64,{{item.imageByte}}"  onclick="open_image({{item.aIimagePath}});" class="hover" alt="..." data-toggle="tooltip" data-placement="top" title={{item.aIimagePath}}>

that is a image and upon clicking the image i need to open that ai file. and the item.alimagepath contains the path of the .ai file.

upon executing this an error occured stating that anonymous function.

could you please help me with this issue or how to open an .ai file.

TOPICS
Scripting

Views

5.9K

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

Valorous Hero , Oct 10, 2017 Oct 10, 2017

Well it's an angular error, so that needs to be fixed before anything can run. Do you have your remote debugger chrome inspector panel running?

Votes

Translate

Translate
Adobe
Explorer ,
Oct 16, 2017 Oct 16, 2017

Copy link to clipboard

Copied

how to use this..?

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
Valorous Hero ,
Oct 16, 2017 Oct 16, 2017

Copy link to clipboard

Copied

Maybe like this: File(File("/Volumes/Scan/SKPULDANDA/Cheshire Cat [Converted].ai").fsName);

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 22, 2017 Oct 22, 2017

Copy link to clipboard

Copied

hey silly. sorry for the late reply. found the solution.

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
Valorous Hero ,
Oct 23, 2017 Oct 23, 2017

Copy link to clipboard

Copied

Great! Okay what was it?

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 24, 2017 Oct 24, 2017

Copy link to clipboard

Copied

LATEST

when we open a file from remote server mac copies in location with the url as i said before with volumes prefixed. now if we trim that volumes and try to send it to app.open and then it works fine.

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