2 Replies Latest reply on Jan 13, 2016 6:14 AM by nathaniely10778230

    Error while calling DoScript to run action-


      Dear Experts,


      I was getting performance issues while grouping items using vbscript in AI CS5. Please refer below thread for details;


      There are API in the latest version, but currently we cannot migrate to latest version.


      So I created custom actions AI to overcome it.

      Please refer below 3 actions:

      1) ActionGroupAll - selects all items & groups

      2) ActionSelectAll - selects all items

      3) ActionGroup - groups selected items

      AI Select-All and Group actions.png


      I tried folowing two approaches:


      Approach A)   -- select and group together (using action-1)


      appRef.DoScript "ActionGroupAll", "CustomActions1"


      While (appRef.ActionIsRunning)

          WScript.sleep 1000




      Approach B)   -- select and group with separately (using action-2, action-3)


      appRef.DoScript "ActionSelectAll", "CustomActions1"

      While (appRef.ActionIsRunning)

          WScript.sleep 1000



      appRef.DoScript "ActionGroup", "CustomActions1"

      While (appRef.ActionIsRunning)

          WScript.sleep 1000


      ------------------------------------------------------------------------------------------ ----------------------------------------


      For both the approaches, it fails with following errors:

      "Adobe Illustrator: an Illustrator error occurred: 558452048 ('!IMP')"


      And other times it pops up message:

      Approach B) works sometimes successfully but not consistent.


      Am I missing anything here?


      Any idea would be greatly appreciated!