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

Illustrator Sublime Extension Woes

Advocate ,
Jan 12, 2017 Jan 12, 2017

Copy link to clipboard

Copied

I installed this package for sublime and it installed successfully, except; there is no Illustrator listing within Tools > Build System  ?

I asked on the Sublime forum, after a day, no replyThere as well is no way to contact the author of this sublime extension on his GitHub page.

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

Guru , Jan 25, 2017 Jan 25, 2017

There's 2 packages mentions on this thread, the one you brought up in your opening question. And the one I wrote myself and posted at #5 above, which you should have marked correct some time back, so please do that now.

I have no idea of why the one I wrote doesn't work on ST2 and I don't care 2 hoots about it. It probably doesn't work on windows 98 or xp either. I could look into it and fix it up for you if you pay me a decent fee but I'm not interested in wasted my time on it for nothing.

Probab

...

Votes

Translate

Translate
Adobe
Valorous Hero ,
Jan 13, 2017 Jan 13, 2017

Copy link to clipboard

Copied

Oh goodness, it's been last committed to 3 years ago, and they've released new Sublime versions since then.

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
Advocate ,
Jan 13, 2017 Jan 13, 2017

Copy link to clipboard

Copied

I know there hasn't been any progress on the extension sine then but regardless of what version of Sublime you're using; the extension should work regardless.

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 ,
Jan 13, 2017 Jan 13, 2017

Copy link to clipboard

Copied

Ha, don't we all wish!

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
Guru ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

If your using a Mac it's dead easy to make a build.

See basil.js/extras/Sublime Text/Basiljs at master · basiljs/basil.js · GitHub

just swap the word InDesign with the word Illustrator.

You can use the same Idea on windows using vbs.

For a more sophisticated approach you can look at Vlad's Run In InDesign - Packages - Package Control

See here also http://stackoverflow.com/questions/23923937/sublime-text-build-for-executing-indesign-jsx-scripts-on...

sublimetext3 - Sublime Text Build For Executing Indesign .jsx Scripts on Windows - Stack Overflow

I'll try patch that one up for Ai, I almost exclusively use Ai on the Mac so I never bothered with it.

HTH

Trevor

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
Guru ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

This should work on both Mac and Windows

To target a specific version would be very easy, look at some of the links above

In the sublime text packages folder add a folder "Illustrator"

Add the following 3 files to the folder

Call this one something like Illustrator.sublime-build

// all by me Trevor http://creative-scripts.com

{

  "osx": {

     "cmd": ["osascript", "$packages/Illustrator/Illustrator.scpt", "$file"]

  },

  "windows": {

    "cmd": ["wscript", "$packages/Illustrator/Illustrator.vbs", "$file"]

  }

}

This one's for Mac

Call this one something like Illustrator.scpt

-- plagiarized from https://github.com/basiljs/basil.js/blob/master/extras/Sublime%20Text/Basiljs/run_idscript_CC_2015.s...

on run argv

    set aScriptPath to "#include \"" & item 1 of argv & "\""

    tell application "Adobe Illustrator"

        do script aScriptPath language javascript

    end tell

end run

This one's for Windows

Call this one something like Illustrator.vbs

' all by me Trevor http://creative-scripts.com

myScript = Wscript.Arguments.Item(0)

Set myIllustrator = CreateObject("Illustrator.Application")

Set myFileSystemObject = CreateObject("Scripting.FileSystemObject")

Set myFile = myFileSystemObject.OpenTextFile(myScript, 1)

script = myFile.ReadAll

myIllustrator.DoJavaScript script

Use set build system "Illustrator" and then Build or Build with

HTH

Trevor

P.s. Not really tested but should work

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
Advocate ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

Use set build system "Illustrator" and then Build or Build with

I copied the Illustrator.sublime-build & Illustrator.vbs to the Pristine-packages folder; although I don't see Illustrator listed as a build system in sublime ?

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
Guru ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

I wrote packages folder not Pristine-packages folder

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
Advocate ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

I don't have a packages folder for my installation of Sublime 2. And creating a packages folder and moving the two script files to a newly created packages folder does not show illustrator as a build system in sublime ?

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
Guru ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

Upgrade to ST3

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
Guru ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

Sublime Blog » Upgrades

As you can use the program on trial for a long time you can spread the cost over a year or 2

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
Advocate ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

For a package, upgrading shouldn't be a requirement considering the package was built around an older versions of sublime.

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
Guru ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

Hi Beaver

The code I wrote is not a fix to the existing package, it's a new self contained package constituting of 1 folder and 3 files, it was written for ST3, I can't see why you wouldn't want to upgrade. There are quite a lot of packages out there which are ST3 only.

However if ST2 really has sentimental value for you, try the following.

On ST2

Select browse packages

Explorer should open up the "Packages" folder.

Place your newly created "Illustrator" package, i.e. the folder containing the 3 scripts in the opened "Packages" folder.

Using ST2 open the script Illustrator.vbs right click on the text there and select "Copy file path"

Close the Illustrator.vbs and open the Illustrator.sublime-build file

Replace "$packages/Illustrator/Illustrator.vbs" with the newly copied path which will be something like "C:\some\something else\ something\Illustrator.vbs"

IMPORTANT: change all the \ slashes to / slashes.

I.e. "C:\some\something else\ something\Illustrator.vbs" should be changed to "C:/some/something else/ something/Illustrator.vbs"

or you can escape the slashes.

"C:\\some\\something else\\ something\\Illustrator.vbs"

You can even to a combo

"C:\\some/something else\\ something/Illustrator.vbs"

This should work but as stated it's probably best to just update ST.

To be honest I cannot remember the differences between the 2 versions but...

Add a post whether or not you go it to work.

HTH

Trevor

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 ,
Jan 23, 2017 Jan 23, 2017

Copy link to clipboard

Copied

Ha seems that - the essence can be simply an applescript or vbscript that just gets the active Sublime text's window's path and runs it in the application as javascript.

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
Guru ,
Jan 23, 2017 Jan 23, 2017

Copy link to clipboard

Copied

Precisely!

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
Advocate ,
Jan 23, 2017 Jan 23, 2017

Copy link to clipboard

Copied

From the console it is working Although I have a question about how to use, please correct me if I'm wrong.  As long as I have the file which I'm working on in the path where Illustrator stores scripts, when saving the script I won't have to update the script continuously ?

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
Guru ,
Jan 23, 2017 Jan 23, 2017

Copy link to clipboard

Copied

I'm confused.

If you run the script from ST it doesn't make a difference where you store the jsx file.

Also I don't know what you mean by console

Note the script has to be saved in order to run on ST with this build, however once it's been saved it will run even unsaved changes.

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
Advocate ,
Jan 23, 2017 Jan 23, 2017

Copy link to clipboard

Copied

A script will run no matter where I save the JSX file; as well a script will run even if it's not saved.  I made a change to a script, and I didn't save the script, but when I ran the script the changes were not reflected ?

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
Guru ,
Jan 23, 2017 Jan 23, 2017

Copy link to clipboard

Copied

I am surprised that the script will run even if the files never been saved.

So your saying if you type in alert('StrongBeaver'); in ST2 and then ctrl b you will see 'StrongBeaver' on the screen with no error message, weird

On ST3 the behavior is as I described:

File not saved file not run.

File saved, file run including unsaved changes.

So just cough it up and upgrade to ST3.

Do it today, it's a click or 2 away

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
Advocate ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

Running Tools > Build produces this error;

Error Trying to parse build system. Expected value in Illustrator.sublime-build:2:2

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
Guru ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

I see there's a setting under tools, "Save on Build" make sure that's ticked.

Please mark #5 as correct.

Thanks

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
Guru ,
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

Try it out on ST3!!!

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
Advocate ,
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

I use ST3.  Wasn't the package built for older versions of Sublime; why can't it be made to work with older versions of ST ?

You did attempt at doing this, which is very grateful but I'm still perplexed as to why there are so much problems getting it working on older versions.

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
Guru ,
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

LATEST

There's 2 packages mentions on this thread, the one you brought up in your opening question. And the one I wrote myself and posted at #5 above, which you should have marked correct some time back, so please do that now.

I have no idea of why the one I wrote doesn't work on ST2 and I don't care 2 hoots about it. It probably doesn't work on windows 98 or xp either. I could look into it and fix it up for you if you pay me a decent fee but I'm not interested in wasted my time on it for nothing.

Probably it doesn't work on ST1 either.

Regarding the other package I haven't looked into it, it was written for ST2, I have no interest in looking in to it.

I think my message is pretty clear and your problem of having a working package in ST3 for you to run Illustrator is answer.

If you have any further questions on the topic try Stack Overflow or open another thread on the forum here.

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