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

How can I start Illustrator visible?

New Here ,
Sep 08, 2010 Sep 08, 2010

Copy link to clipboard

Copied

Hello,

I want to start Illustrator and load a file on Windows environment by executing a Java-Script with the windows Scripting Host. The content of the Java-Script file is like:

var illustrator = new ActiveXObject("Illustrator.Application");

illustrator.open("c:\\temp\\1.pdf");

Illustrator starts, I see the Splash-Screen but after that no window of Illustrator appears while Illustrator is shown running in the task manager.

Similar calls to InDesign and Photoshop work well. The programs are started and shown on the screen.

Is there a possibility to get it running, without a Shell-Exec?

Thank you in advance

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
Adobe
Community Expert ,
Sep 08, 2010 Sep 08, 2010

Copy link to clipboard

Copied

try

activedocument.activate

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
New Here ,
Sep 08, 2010 Sep 08, 2010

Copy link to clipboard

Copied

Thanks, but that doesn't help.

I already tried:

illustrator.activate;

illustrator.show;

which has also no effects.

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
Guide ,
Sep 09, 2010 Sep 09, 2010

Copy link to clipboard

Copied

As far as I know (on the mac side) you can't get the app to the front if calling from outside. All I get if I try from ESTK or Bridge is a bouncy dock icon once I have clicked it then the script continues… I have to cheat and have AppleScript Activate the app first…

#target illustrator var a = app.documents.add(DocumentColorSpace.RGB) a.activate();

Even this does NOT come to the front most process for me… I think running scripts from inside the app is expected. There maybe some bridgetalk way around this but I don't recall 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
New Here ,
Sep 09, 2010 Sep 09, 2010

Copy link to clipboard

Copied

Thank you for the answer, but it doesn't work.

Everything is fine, if I start Illustrator first by hand and launch my script, but if I start the script first (which launches Illustrator itself) the program is not visible.

I wonder about, because Photoshop and InDesign react different. If I launch these programs by scripting, they are per default visible.

On the MAC I do similar things with AppleScript. My Script launches Illustrator, and it is visible immediately.

Any ideas?

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
Guide ,
Sep 09, 2010 Sep 09, 2010

Copy link to clipboard

Copied

Indesign has the method activate(); Photoshop has the method bringToFront(); Illustrator has none at app level it only has this at document level which as you have noticed does NOT work… I know of NO direct way to do this using ExtendScript… Sorry…

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 ,
Sep 10, 2010 Sep 10, 2010

Copy link to clipboard

Copied

try WScript.CreateObject instead of new ActiveXObject, I tested it with an old computer (in this machine I keep getting "JScript Error Expected ";") that has no illustrator. I was able to open and show photoshop and office programs.

var illustrator;

illustrator = WScript.CreateObject("Illustrator.Application");

illustrator.open("c:\\temp\\1.pdf");

Carlos Canto

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
New Here ,
Sep 12, 2010 Sep 12, 2010

Copy link to clipboard

Copied

LATEST

Really nice, I did it already by this way. It'll work for other programs but not for Illustrator.

No idea why.

Thanks

Norbert

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