View Single Post
Old 08-20-2025, 12:07 PM   #1522
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 chaley View Post
Is there an existing module or action that will open an input dialog to get a line of text? It is easy enough to do as a python action, getting the text and dropping it into a global, but why reinvent the wheel?.
Not exactly an input dialog, but the Chain Variables action has an interactive checkbox that will allow you to enter a text to be saved to global variable. If not suitable for you needs, we can always add a new action. Not sure whether to add to the resources thread or directly in the builtin actions.

Quote:
Originally Posted by chaley View Post
Another question: is there currently a way to use the current search as a temporary VL? This is done manually by clicking on VL and then "*current search". Again, this is straightforward to do with a python template, but ...
Not currently. I was planning on an action that does some of these things like VLs and restrictions, but haven't gotten around to it. I had an unpolished multi-sort action in the resources thread that I thought maybe I can add the VLs and restrictions to, instead of having a dedicated action for every single action. I usually put temporary actions in the resources thread until I get a clear idea of how the final version should look like.

Currently, the quick and dirty way is a "Run Python Action"
  • To use the current search as vl:
    Code:
    def run(gui, settings, chain):
        gui.apply_virtual_library('*')
  • If you want to use a named vl:
    Code:
    def run(gui, settings, chain):
        gui.apply_virtual_library('vl_name')
  • To set a named restriction
    Code:
    def run(gui, settings, chain):
        gui.apply_named_search_restriction('restriction_name')
  • To set a restriction from search
    Code:
    def run(gui, settings, chain):
        gui.apply_text_search_restriction('search_string')

A dedicated action would provide a config widget with combobox to choose from the available vls and restrictions.

Last edited by capink; 08-20-2025 at 12:21 PM.
capink is offline   Reply With Quote