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

App drop-down properties causes crash!

Explorer ,
Aug 27, 2018 Aug 27, 2018

A keen VBA amateur scripter I've just started with Extend Script Toolkit for Illustrator CS6 64-bit (16.064). I'm getting a connection with the DLL and basic scripts work however even with small documents (under 1MB) I'm not able to list the document properties under the app object in the data browser (pictured as pending). It takes over a minute and hangs - this is a high-end gaming laptop with 34GB RAM so it's not a hardware issue. I never get to see what's available; obviously I can't code like this.

Does anyone have a fix?

a.jpg

TOPICS
Scripting
1.5K
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
Adobe
Community Expert ,
Aug 27, 2018 Aug 27, 2018

so what's going on in the background when you notice this issue? is the script in the middle of executing? is the script paused at a breakpoint? was there a runtime error?

What is your script going to do when you're finished? In other words, what kind of processing is happening to the file when you notice this issue?

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
Explorer ,
Aug 27, 2018 Aug 27, 2018

Thanks William,

I'm not running a script, atm, it just usually will not provide me with info on the app i.e. selecting the drop down on app illustrator. Sometimes it will work but the majority of time it will not. I just got it to work on a file that was suprisingly big, yet on a clean minimal new file it didn't provide info.

Again to clarify this is nothing to do with the script, this is just merely seeing what properties are available in the current Illustrator app/ document.

It takes about a minute, as pictured it states pending in the data browser and just doesn't provide any further info. It doesn't actually crash, it just doesn't provide the info.

There's a blue spinning wheel in the ExtendScript App.

Illustrator itself pauses and becomes unresponsive. Sometimes if I wait it will become responsive again, other times it will not.

Regards

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 ,
Aug 27, 2018 Aug 27, 2018

hmm. my advice is to use ESTK as little as possible. You can find the documentation in searchable PDF form online. then you can also use the OMV from ESTK under the help menu.

I use estk exclusively for executing quick test scripts and for stepping through trouble spots with breakpoints. Adobe stopped supporting this app for some reason, so it's gotten pretty crummy.

What information are you looking for in the data browser?

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
Advocate ,
Aug 27, 2018 Aug 27, 2018

Salut !

Application est l'application Illustrator.

Je ne pense pas que le document ouvert soit en cause ?

Le message d'attente dure une fraction de seconde. (ici Document 4photos_3.ai)

app.PNG

Je n'utilise pratiquement pas extendScript.

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
Explorer ,
Aug 27, 2018 Aug 27, 2018

Thanks William, yes it doesn't seem great at all.

The info I was seeking was all document properties etc... to learn the language I wanted to quickly see all what was currently available in the current document.

Like VBA setting a variable to be the current worksheet & then using the locals window to see what is available is what helped me learn VBA.

Regards

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 ,
Aug 27, 2018 Aug 27, 2018

So my next piece of advice is to invest your time learning javascript instead.. lol

I don't know VBA so i can't say anything about it, but you'll get a lot more help with javascript questions, aaaand there's the added bonus of cross platform compatibility... just saying. 😃

Otherwise, here's a link where you can find the aforementioned PDF documents that will show you the DOM and its properties.

Illustrator Scripting | Adobe Developer Connection

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
Explorer ,
Aug 27, 2018 Aug 27, 2018

I know, I had to learn VBA because I use it a lot with spreadsheet automation so I had to learn that first. Which has given me the basic understanding of an object oriented language (I know VBAs not fully oo'd but more or less for my basic learning).

I've fumbled around with JS a little before but I know very little. Thanks I downloaded all guides prior to this post and have had a quick look, doesn't seem very detailed but then again I suppose that's just pointing the basics and there's plenty of other resources out there for JS.

I must say first looks for JS aren't great, not even able to display the data browser lol.

Thanks again.

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 ,
Aug 27, 2018 Aug 27, 2018

yea the documentation isn't great either, but at least you can see the relationships between objects and their properties.

I'd also stay away from the examples they put in there... they're often incomplete and can be confusing..

But any questions you have along the way, bring them back here and we'll get em answered for ya.

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
Enthusiast ,
Aug 27, 2018 Aug 27, 2018

This happens to me as well. ESTK is hardly usable for me with exception to the OMV (which itself is pretty obtuse and hard to navigate, and doesn't display useful information like what parameter values should be) because of this glitch -- I see this list in the Data Browser tab, but when I click to uncollapse anything the menu just refreshes. It sends me to the top and I scroll down but nothing is uncollapsed -- it really defeats the purpose of having a Data Browser tab or this in list form.

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
Explorer ,
Aug 27, 2018 Aug 27, 2018

Thanks Off Topic, glad to hear I'm not the only one experiencing this.

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 ,
Aug 27, 2018 Aug 27, 2018

Hi Dalski, I know what you mean. I also come from a vba background and my transition to javascript wasn't easy. We were just spoiled with the VBA IDE, it just works beautifully. My biggest wish was that the ESTK autocomplete worked, it is an invaluable tool for both beginners and experienced users. It works ok on windows, on mac it doesn't. I'm yet to try what others use, Brackets, Sublime, Atom, etc.

best bet is to use the OMV and the guides to find what's available.

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
Enthusiast ,
Aug 27, 2018 Aug 27, 2018

CarlosCanto​ I could make an AI-specific autocomplete extension for Atom if you'd be interested. I have a limited Illustrator-DOM autocomplete for one of my debugging panels already but I'd rather rebuild that one than have others use it as is -- it has a few Windows-specific options (for hotkeys within the editor) so it may not work on mac.

Dalski K​, when I first came to these forums and was complaining about ESTK and the JS Scripting Reference because I thought it was hard to get started, Silly-V said something along the lines of this forum and community being "the real documentation". I've found that remark is definitely accurate because I've learned far more with a google search leading to forum posts than I ever have trying to use ESTK's OMV or the Scripting Guide/Reference. I think a critical part of learning is turnover rate, though, and using Atom for scripting instead of ESTK made it far more comfortable for me personally to start. You don't actually need ESTK to write scripts at all, you can do it through Atom using an extension called Process Palette:

KeyInsecureEwe-size_restricted.gif

I found it through a CreativeCow answer. So I'd argue there's no real advantage to using ESTK over a modern text editor with exception to accessing the console and the OMV (and I'd imagine the Data Browser as well if it weren't broken for me), but seemingly a lot of disadvantages that come with ESTK over modern text editors because it lacks so many features that others have by default -- multi-cursor, third-party apps, robust syntax highlighting, continued support, dynamic keybindings, etc. You can create your own console / IDE as a panel inside AI, even one that runs scripts and code with a hotkey and retains all of ESTK's error warnings:

AcclaimedColossalGermanpinscher-size_restricted.gif

I mostly use it as a helper function to debug other panels and scripts while writing them within Atom, to bypass the lack of having access to ESTK's console:

ImpishMeatyChinesecrocodilelizard-size_restricted.gif

I've seen another more robust version of this created by Trevor here. You can also use PlayWrite the same way when writing a completely external script, but you'd need the required function to send a CSXSEvent within the script you're using:

// Rewrites the console line / title

JSXEvent('data here', 'com.playwrite.console')

// Rewrites the editor contents

JSXEvent('data here', 'com.playwrite.rewrite')

// Adds data as next line in editor

JSXEvent('data here', 'com.playwrite.write')

function JSXEvent(payload, eventType) {

  try {

    var xLib = new ExternalObject("lib:\PlugPlugExternalObject");

  } catch (e) {

    JSXEvent(e, 'console')

  }

  if (xLib) {

  var eventObj = new CSXSEvent();

  eventObj.type = eventType;

  eventObj.data = payload;

  eventObj.dispatch();

  }

  return;

}

// ...Or having this in your code allows you to write console.log() and display to this panel as if in normal JS

console.log(someVariable)

var console = {

  log : function(data) {JSXEvent(data, 'com.playwrite.console')}

};

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 ,
Aug 27, 2018 Aug 27, 2018

https://forums.adobe.com/people/Off+Topic  wrote

CarlosCanto  I could make an AI-specific autocomplete extension for Atom if you'd be interested.

Would you? that'll be awesome. I installed atom and played with it last Saturday. I noticed I was getting some hints (autocomplete) already, my guess is that Atom was getting them from the hundreds of scripts in my folder??

Off Topic

Silly-V said something along the lines of this forum and community being "the real documentation".

Damn right!!

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
Enthusiast ,
Aug 28, 2018 Aug 28, 2018

CarlosCanto  wrote

Would you? that'll be awesome. I installed atom and played with it last Saturday. I noticed I was getting some hints (autocomplete) already, my guess is that Atom was getting them from the hundreds of scripts in my folder??

I think Atom scrapes for autocomplete suggestions within any currently open panels (even if not in front) and from within your Project Folder tab assuming you're using the file/folder tree view. I really like Atom! My only gripe is that it can be pretty buggy while dragging files into new panel views or tabs, but otherwise I've dropped all the others I've tried (Sublime, ESTK, Notepad++, even VS) for it. What's crazy is that you can Ctrl+Shift+I and open up Chrome Devtools right there inside of Atom, on and for Atom. It's very sleek.

And yep! I want a dedicated AI (and beyond that, AE and PS) autocomplete so I'm not constantly being interrupted trying to write new scripts. I'll try doing this tonight and very likely not succeed, so I'll wait a few days until I'm no longer too frustrated by being inept at all the things I'm trying to cram into my head, probably make more progress that time but still fail overall, BUT THEN round about my third try I just might make something passable and functioning. Such is the programming life

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 ,
Aug 28, 2018 Aug 28, 2018

absolutely we all go through that. I personally don't mind finding things out the hard way. Obviously I don't like wasting time but succeeding after many failures is very rewarding and a greater learning experience.

don't rush about the Atom autocomplete, I'm not in big hurry to get into 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
Enthusiast ,
Aug 28, 2018 Aug 28, 2018

CarlosCanto  wrote

don't rush about the Atom autocomplete, I'm not in big hurry to get into it.

LikableOrdinaryAmurratsnake-size_restricted.gif

I'll make a new thread about it.

BgGSH4L.gif

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 ,
Aug 28, 2018 Aug 28, 2018

looking good, thanks for the update.

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
Explorer ,
Sep 02, 2018 Sep 02, 2018
LATEST

Hi Carlos, thanks guys. Yeah I've used sublime 2 & 3 and it's cool. I think these programmes are more for the experts, and not really helpful for the beginners. Autocomplete is cool, but you need to have an idea of what commands do what, where the object browser really is handy; it lets absolute noobs like me get an idea of what's what. I find Sublime lacks a decent way importing images, there's a plugin that completes the path name but I've found it a bit sketchy. If I'm doing a site with a lot of images I find Dreamweaver to be very helpful.

OffTopic, you're completely right, I've yet to find an app with a proper manual.

I really liked VBA and I'm in Excel a lot. I know Microsoft have moved towards Javascript too and I wonder how that will be in excel.

Thanks for your input guys, and your recommendation of Atom.

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