RMB_Menu triggered by Python

Is it possible to trigger the RMB Menu options of an OP with Python
derivative.ca/wiki088/index. … e=RMB_Menu

I would like to be able to make a Save Component… on a Table DAT so the Windows Directory Menu pops out

(ie. not the op(name).save() method)

If yes it would be super helpful to have this in this wiki page

thanks a lot !

Well you can only do ‘Save component’ on components. But on Table DAT you can save the contents.

put these two lines in a script and run it.

[code]path = ui.chooseFile(load=False,fileTypes=[‘txt’],title=‘Save table as:’)

you can read about it in the wiki on the UI class

I’ve made an example with a “Save As…” button
save-as-dialog-example.toe (4.67 KB)

Thanks a lot !
Exactly what I needed :slight_smile:

this should be added to the wiki page I think

Thanks for the example.
We’ve added it to the wiki examples.