View Single Post
Old 01-09-2023, 09:05 AM   #7
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,217
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Quote:
Originally Posted by kovidgoyal View Post
iactions['action name].add_to_skoob.trigger()
That's exactly what I was expecting!
I've tried some combinations of this but nothing worked.

For example, I can use this:
Code:
gui.iactions.['Skoob Sync'].rebuild_menus()
'Skoob Sync' referes to the IntefacePlugin.

But when I try to call other actions, it gives me a KeyError:

Code:
gui.iactions['SkoobSync_Add'].add_to_skoob.trigger()

KeyError: 'SkoobSync_Add'
'SkoobSync_Add' is the unique name for the action.

________________________________
Edit


Never mind, I got it. I was trying to use the actions unique name, when I should use the plugin's combined with the actions.

This works perfectly:
Code:
gui.iactions['Skoob Sync'].add_to_skoob.trigger()
Thank you for the help!

Last edited by thiago.eec; 01-09-2023 at 09:14 AM.
thiago.eec is offline   Reply With Quote