View Single Post
Old 05-11-2023, 10:55 AM   #1103
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,860
Karma: 7036057
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Is there a way to pass the clipboard contents to a SFE? I was thinking maybe a chain variable. Or maybe I can just add the template itself to the variable.
The template produces a string. You can do whatever you want with it.

EDIT: or are you asking if you can get the actual clipboard contents? Yes. This line in the template does that.
Code:
text = str(QApplication.clipboard().text()).strip()
You could store this template to use in other templates:
Code:
python:
def evaluate(book, context):
	from qt.core import QApplication
	return str(QApplication.clipboard().text()).strip()

Last edited by chaley; 05-11-2023 at 11:02 AM.
chaley is offline   Reply With Quote