Skip to main content
wckdtall
Inspiring
March 30, 2017
Question

Is there a way to embed a javascript alert in Illustrator to run on open?

  • March 30, 2017
  • 4 replies
  • 2941 views

As the question states, I'm just wondering if it's possible to embed a javascript alert in an individual Illustrator file. I could see why it would not be based on security but I'm just trying to trigger an alert on open, similar to alerts you're able to create on the web.

This topic has been closed for replies.

4 replies

Qwertyfly___
Brainiac
April 4, 2017

looks like your best bet would be to dive in to the SDK.

you need a custom callback.

good luck with it, I'd love to hear back if you find a solution...

wckdtall
wckdtallAuthor
Inspiring
April 4, 2017

Thanks! I can't imagine SDK will let me do what I want to do either, but I'll give it a shot!

Disposition_Dev
Community Expert
March 30, 2017

You can create a script/snippet and put it in the "Startup Scripts" folder and it will execute on open.

on a mac it's located here: /Applications/Adobe Illustrator CC[version]/Startup Scripts

The folder doesn't exist by default, so if you don't have one already you'll need to create one.

Silly-V
Brainiac
March 30, 2017

That's just for Illustrator itself, right?

Silly-V
Brainiac
March 30, 2017

Only if you have a script that you use to open any document instead of native open command, which can also read specially-hidden messages embedded somewhere in the file. Or, maybe the CEP extensions have this event as part of available events.

Loic.Aigon
Brainiac
March 30, 2017

I don't think you can embed javascript code inside a document so it executes itself on opening.