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

set Illustrator window size applescript (or javascript)

Explorer ,
Dec 08, 2015 Dec 08, 2015

Hello

I have an appleScript for setting the bounds of an InDesign window and tried to adapt it for Illustrator, but it won't work. Can anyone help with this? I have two scripts which work in InDesign:

Script 1:

tell application "Adobe InDesign CS6"

  activate

  tell active window

  set bounds to {100, 1280, 1412, 2548}

  end tell

end tell



Script 2:

tell application "Adobe InDesign CS6"

  activate

  tell window 1

  set bounds of window 1 to {105, 8, 1417, 2548}

  end tell

end tell


Thx for any help



TOPICS
Scripting
5.6K
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

correct answers 1 Correct answer

Mentor , Dec 08, 2015 Dec 08, 2015

@ Qwertyfly, what an obscure document method, nice find.

// --------------

@ James, as i mentioned above, positioning the window is not an issue (at least when using System Events), however setting size, bounds etc., seem to have no effect on AI documents and error.

Quick test, position works, size does not:

tell application "System Events" to tell process "Adobe Illustrator"

  set position of front window to {500, 120}

  set size of front window to {500, 500}

end tell


However, getting the size wo

...
Translate
Adobe
Guide ,
Dec 09, 2015 Dec 09, 2015

I've had 4 posts in the last 12 hours get the Currently being Moderated.
the last post of mine in this thread being one of them... can't see what caused that.
but I wrote [inappropriate language removed by moderator] in a different thread. no issue.
it is very frustrating, but I guess it beats the spam.

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
Guide ,
Dec 09, 2015 Dec 09, 2015

Now I'm getting rejected posts.
I guess the adobe folk don't like us complaining about being moderated.

Maybe the rejector might enlighten me as to why it was refused?
seeing as everything I post is now going through moderation.

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 ,
Dec 09, 2015 Dec 09, 2015

ALL messages go through a Jive anti-spam filter... since the filter belongs to Jive, not Adobe, nobody that I know of knows why the filter kicks some messages into Moderation and not others... except all messages from NEW forum members go to Moderation until the person is no longer considered new (and no, I don't know what determines new)

As to why a Moderator might reject a message, I again don't know why your individual message might be rejected

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
Guide ,
Dec 09, 2015 Dec 09, 2015

I do not consider myself a new forum member.
I do consider myself a fairly active member.

I get moderation is needed.
It still frustrates me.

this tells me that although it may have been kicked to moderation by software, it was rejected by a human.

rej.JPG

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 ,
Dec 09, 2015 Dec 09, 2015

I spoke too soon about the scripts working: they have run afoul of the Assistive Devices. I now get a message for the scripts:

System Events got an error: [spt name} is not allowed assistive access. (-1719)

and when I try to use the scripts via Script Debugger gets this message:

System Events got an error: Script Debugger 4.5 is not allowed assistive access.

This behaviour changed from earlier. Big Brother lurking in my OS must have activated itself.

All of the scripts (which I have saved as apps), Script Debugger and Illustrator are listed and ticked in the Accessibility list.

I had the scripts in my Scripts library, then moved them to the Illustrator scripting folder in Applications but they do not work in either location.

Any ideas on how to overcome 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
Mentor ,
Dec 09, 2015 Dec 09, 2015

Sorry to hear you're having issues. I can not replicate those issues, likewise my setup does not match either, so I am not sure what to suggest? Perhaps go back to your thoughts in post 10?

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 ,
Jan 09, 2016 Jan 09, 2016

So, forgive the newb but where do I set this?

app.activeDocument.windowCapture(new File(null), [500, 500]);

I'm new to Illustrator Scripting. I was trying to resize and position the Illustrator window with AppleScripting and getting NOWHERE... stumbled across here and am unfamiliar with Illustrator Scripting... Especially using plain javascript.

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
Mentor ,
Jan 11, 2016 Jan 11, 2016
LATEST

to my knowledge, the size and position of the application window is readable, but not settable. I hope someone else could provide some insight, but i'm not sure it can be done.. =(

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