Let Unassigned Variable Text Evaluate in Complex Expressions

Ideas for new features & functions

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
JRL
Automation Wizard
Posts: 3318
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Let Unassigned Variable Text Evaluate in Complex Expressions

Post by JRL » Fri May 20, 2016 4:12 pm

This may not even be possible. If not, just knowing will suffice. But if its simple to add it would be nice.

Suppose you have a potential variable "TimeOut" that does not yet have a value. the line:

Code: Select all

If>{%TimeOut%="TimeOut"}
will fail. It fails because unassigned text that just happens to be placed between two percent signs doesn't evaluate.

You could simply pre-set "TimeOut" (Let>TimeOut=) and the situation would be resolved. So the solution is very simple. But one of the great things about Macro Scheduler is that there is no requirement to predefine variables.

The code I was actually trying to use is:

Code: Select all

If>{(%TimeOut%="TimeOut")or(%TimeOut%=0)}
  Let>TimeOut=99999999999999
EndIf
The Code will become:

Code: Select all

Let>TimeOut=
//
//
//Lots of other code
//
//

If>{(%TimeOut%="")or(%TimeOut%=0)}
  Let>TimeOut=99999999999999
EndIf
Thanks for listening,
Dick

User avatar
Marcus Tettmar
Site Admin
Posts: 7118
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Let Unassigned Variable Text Evaluate in Complex Express

Post by Marcus Tettmar » Tue May 24, 2016 7:37 am

I've put it on the list and will figure something out.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron