Copy link to clipboard
Copied
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".
/parameter-1 {
/key 1769238125
/showInPalette -1
/type (ustring)
/value [ 5
666974696e
]
}
See the original and the converted action files.
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.
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.
Copy link to clipboard
Copied
It's just here:
But, that list is gotten from the .kys keyboard shortcut file of Adobe Illustrator.
Copy link to clipboard
Copied
How about
/value [ 6
666974616c6c
]
Copy link to clipboard
Copied
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".
Copy link to clipboard
Copied
akinuri schrieb:
Did you get it by recording "Fit All in Window" in an action? …
Yes.
akinuri schrieb:
…If so, how? …
How? Simply recorded.
(Tested with CS5, CC2014 and CC2015 Win)
edit:
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.
Copy link to clipboard
Copied
I'm using CS6 64-bit on Windows 8.1 Pro and this isn't working for me.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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 🙂
Copy link to clipboard
Copied
Mmhh …
I think there is no chance. CS6 is „to old“. IMHO no bugfixing more for this version.