View Single Post
Old 03-18-2025, 09:36 AM   #1444
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,203
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by Terisa de morgan View Post
How do I pass the list to the module? I've found how to define vars local/global to the chain but I don't know how the module would be able to read them
To retrieve the variable using a python module:
Code:
chain.chain_vars.get('variable_name', '')
Quote:
Originally Posted by Terisa de morgan View Post
How do you check that one and only one is selected? So you raise an error if no book is selected or more than one book is selected.
If you are doing this using python:
Code:
if len(gui.current_view().selectionModel().selectedRows()) !=1:
   do_something
If you are doing it with a regular action, you can set a condition as illustrated in this post.
capink is offline   Reply With Quote