We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
I recently needed a way to fit the artboards into view and learned that I can do it using
app.executeMenuCommand("fitall"). When I searched through the scripting PDFs, I've found no mention of this method.
Then I was made aware of this question [JS] CS6+ executeMenuCommand2. There are lists of commands and some links in the answers. I've visited the links and this AI CS6 `app.executeMenuCommand` was the most enlightening one as to where and how to get these commands. So I followed what the author did.
When I examine the "My Set.aia" file, I see there are 3 parameters. The first is the menu command. The second is the name of the command. I don't know what the third is. Parameter values are in hex format. Once I convert "666974696e" into ASCII, I get "fitin", the menu command string for "Fit Artboard in Window".
/value [ 5
I've tested this with few other commands and it seems to work. Although I couldn't make it work for "Fit All in Window". When inserting menu item in Actions, selecting View->Fit All in Window does nothing. Typing "Fit All in Window" and clicking on "Find" also doesn't work. Gives the warning "No menu item matching that name was found". Why is that?
Sigh. I wish there was an official documentation for app.executeMenuCommand() and these commands were easier to access.
/value [ 6
Did you get it by recording "Fit All in Window" in an action? If so, how? I'm using CS6 64-bit and it doesn't record "Fit All in Window".
Did you get it by recording "Fit All in Window" in an action? …
…If so, how? …
How? Simply recorded.
(Tested with CS5, CC2014 and CC2015 Win)
If you cannot record the menu command, try to type the first or the first two words of the menu command in the dialog insert menu command and after than press [search]. Perhaps this helps.
I'm using CS6 64-bit on Windows 8.1 Pro and this isn't working for me.
Perhaps I have time tomorrow. At work we have one older Win computer with CS6 64-bit. I'll give it a try if I can.
Ok. It seems to be that you are totally right.
It is not possible to record this menu command in CS6 (64-bit) and not in CS6 (32-bit). Perhaps a bug in this Illustrator version.
I was afraid you'd say you recorded it just fine, which would indicate there's something wrong with my installation. And yeah, it's probably a bug. What do you suggest I do? Report it? Where do I report it?
I haven't spend much time in here or in any adobe website. I'll need directions 🙂
I think there is no chance. CS6 is „to old“. IMHO no bugfixing more for this version.