[MODERATOR NOTE]: this post was initially posted on the topic referencing an example shortcut to get a variable. I've split it into a separate topic because it goes beyond the scope of what that example plugin does, but is a perfectly valid question.
---------------------------------
Just tried your demo and decided to use the get a variable bit in a shortcut to open the front door using a loop to re-trigger the lock as it locks after 10 seconds and sometimes it would be helpful to extend the opening by a re-trigger, but stop once the front door contact sensor opens.
I get the variable but the shortcut ‘If’ statement only gives ‘does not have any value’ or ‘does have a value’ as options and sending nothing to blank the Indigo variable is seen as ‘false’ so it always triggers as ‘does have a value’.
Is their another way to get this working?
How do I use a variable value in an IF condition
How do I use a variable value in an IF condition
CliveS
Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
- jay (support)
- Site Admin
- Posts: 19202
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: Variable Copy Demonstration shortcut
You need to post a screenshot of your shortcut (or at least the section that gets the variable and attempts to do the IF) in order for use to help.
Re: How do I use a variable value in an IF condition
Screenshot as requested
The variable was blank at this time (- no value - )
The variable was blank at this time (- no value - )
CliveS
Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
- jay (support)
- Site Admin
- Posts: 19202
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: How do I use a variable value in an IF condition
Hi Clive, after rereading your post I gave it a try. And spent the next hour trying to figure out what the heck is up with the IF statement.
I've posted another example plugin that shows you how to use the variable value in an IF statement.
I've posted another example plugin that shows you how to use the variable value in an IF statement.
Re: How do I use a variable value in an IF condition
Thank you Jay, it makes me feel a bit better that it took you an hour to find a way around Apples roadblocks 
CliveS
Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer