Applescript / Javascript > Adobe Illustrator scripting

GUI scripting...

(1/3) > >>

AutoFetishist:
Can anyone see where I'm goofing up?

I think its something here:
click menu item "Extrude & Bevel..." of menu item "3D" of menu bar item "Effect" of menu bar 1

from this script:

tell application "System Events" to tell process "Adobe Illustrator"
   set frontmost to true -- activates Illustrator
        click menu item "Extrude & Bevel..." of menu item "3D" of menu bar item "Effect" of menu bar 1
   delay 0.2
end tell


I'm getting the old "NSReceiverEvaluationScriptError: 4" error message.

Jean-Marie Schwartz:
When getting that message I try to simply ask System Events to list every UI element or entire contents (get entire contents of application process "Adobe Illustrator" of application "System Events", and you can see in the results all the possibilities you have; just Apple-F "extrude & bevel" and you're done, you copy-paste the relevant part back in the code and run.
Hope this helps!

PS: Prior to this, try correcting the line as above as for the last part of it (... of menu bar 1 of application process "Adobe Illustrator" of application "System Events").

AutoFetishist:
No dice.
tried adding the extra code, and still get the same error.


I did try running the System Events list routine, but that seems to be running ad infinitum.

How long should it take to compile the results?

Jean-Marie Schwartz:

--- Quote from: AutoFetishist on June 24, 2008, 12:25:47 PM ---I did try running the System Events list routine, but that seems to be running ad infinitum.

How long should it take to compile the results?

--- End quote ---
Well... ad infinitum, so it's hard to say from now on how long it should take  ;D
More seriously, you should probably narrow the search (sorry I haven't think of that yesterday), like <get entire contents of menu bar item "Effect" of menu bar 1 of application process "Adobe Illustrator" of application "System Events">.
Hope this helps.

EDIT: Modified the process name, I wrote Finder!  :(

AutoFetishist:
No, what I'm saying is that I must not have the code exact for the System Events list routine. It never finishes getting the list.

Can you post it, so I know I'm doing it exactly?

Navigation

[0] Message Index

[#] Next page

Go to full version