Call menu function

Is there any function to call menu through script directly?
I need to call the menu “Show Next Glyph” and the menu “Paste” in my script code.
We need to copy contents from illustrator APP, that’s why we need to call menu “Paste” through script.
thanks a lot.

Please.

I would directly set the layer you like to paste into:

currTab.layers = [layer]

And it might be better to import an image directly. I can check what API would be best.

The code [layer] is not the content of clipboard from illustrator.
How can I get the value of system clipboard?

How does the data gets into the clipboard. Wouldn’t it be easier to write the data to a file and import that? You can batch import too many glyphs if the file names match the glyph names.

My code example shows how to activate a specific layer in the editview, not import the outlines.

We solved it through an AppleScript, thanks:)