Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
0

Running AI Action in script works differently than running it with keyboard shortcut.

LEGEND ,
Mar 14, 2019 Mar 14, 2019

I have a simple action the runs the "Unite" Pathfinder (tooltips calls it "Unite" while the Action calls it "add"). Running this action with an assigned Shortcut leaves the selection selected. But when I run the same action from a script the selection is lost. Why is that?

Dropbox - Unite Action.aia

app.doScript ("Unite", "AI Actions_KM" );

TOPICS
Scripting
668
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

LEGEND , Mar 15, 2019 Mar 15, 2019

Thanks for checking, Carlos.

Your comment made me think to test more thoroughly. I typically run scripts via Keyboard Maestro Macros. Sure enough, running the script directly works fine… running it through Keyboard Maestro loses the selection.

EDIT:

Turns out an Applescript will work properly from Keyboard Maestro:

tell application "Adobe Illustrator"

  activate

  tell current document

  do script "Unite" from "AI Actions_KM"

  end tell

end tell

Translate
Adobe
Community Expert ,
Mar 15, 2019 Mar 15, 2019

my selected items remained selected here Ray. I'm on Windows 10, CC2019.

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
LEGEND ,
Mar 15, 2019 Mar 15, 2019
LATEST

Thanks for checking, Carlos.

Your comment made me think to test more thoroughly. I typically run scripts via Keyboard Maestro Macros. Sure enough, running the script directly works fine… running it through Keyboard Maestro loses the selection.

EDIT:

Turns out an Applescript will work properly from Keyboard Maestro:

tell application "Adobe Illustrator"

  activate

  tell current document

  do script "Unite" from "AI Actions_KM"

  end tell

end tell

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