KeeperCake
Member
Seeking most efficient way to switch just part of a sentence, most likely verbs.
A variable will either get passed in or set to match triggers with text. Examples are "turn off computer," "turn off tablet," or "turn off Nintendo Switch," etc. Alternatively, they'll be "open bedroom window," "open kitchen window," etc.
The action(s) I want to refine is to take one of those at a time and set a variable to the opposite. So take "turn off tablet" and make it into "turn on tablet" or, if not too much trouble, "turn tablet back on."
I already have actions set up like the following.
How exactly do I append/prepend the string so I don't have to create an action for each possibility?
A variable will either get passed in or set to match triggers with text. Examples are "turn off computer," "turn off tablet," or "turn off Nintendo Switch," etc. Alternatively, they'll be "open bedroom window," "open kitchen window," etc.
The action(s) I want to refine is to take one of those at a time and set a variable to the opposite. So take "turn off tablet" and make it into "turn on tablet" or, if not too much trouble, "turn tablet back on."
I already have actions set up like the following.
ACTION | Set variable named switch_to to "close window" |
ACTION CONSTRAINT | Variable named switch_from contains "open window" |
How exactly do I append/prepend the string so I don't have to create an action for each possibility?