@leonardder and @feerrenrut :
def script_toggleScreenCurtain(self, gesture):
message = None
screenCurtainName = "screenCurtain"
if not vision.getProviderClass(screenCurtainName).canStart():
# Translators: Reported when the screen curtain is not available.
message = _("Screen curtain not available")
If return, I think that the message won't be reported if screen curtain is not available.
# Translators: Reported when the screen curtain could not be enabled.
message = _("Could not enable screen curtain")
Sorry if I'm missing something.
My tests are successful toggling screen curtain, so I can't check what happens when this can't be done.