I am intercepting a menu. I want to call a python script when the menu item is clicked.
The intercepted menu is for a Calc Cell.
I want to pass the cell to the script function.
It seems intercepted menus do not have an event that can be subscribed to.
This means I an only take action after the script is called.
Is it possible to pass an arg to the script that is being called?
Menu Command something like:
vnd.sun.star.script:myscript.py$do_someting?language=Python&location=user&cell=A1
and in script get the value
def do_someting(*args):
# would be nice to get access to cell here...
print(args)
Except there are no args are present.
See Also Intercepting a Context Menu