General Macro Scheduler discussion
Moderators: JRL, Dorian (MJT support)
-
evangelmike
- Pro Scripter
- Posts: 56
- Joined: Sun May 11, 2008 9:39 pm
Post
by evangelmike » Sun May 11, 2008 9:55 pm
Greetings! I have been researching whether there are native Boolean variables in Macro Scheduler. To do this, I executed the following code:
Code: Select all
Let>MyString=Stryng
Let>Cat={%MyString%="Stryng"}
// Thus the variable Cat should be a Boolean True
If>{%Cat%="true"}
MessageModal>Cat3 is %Cat%
Endif
If>{%Cat%="True"}
MessageModal>Cat1 is %Cat%
Endif
If>{%Cat%="TRUE"}
MessageModal>Cat2 is %Cat%
Endif
It is instructive to note that the only message displayed when the above code is executed is:
Cat2 is TRUE
This tells me that the Macro Scheduler Boolean True is the string TRUE, not the string True or the string true. Likewise, the Macro Scheduler Boolean False is the string FALSE, not the string False or false. Any comments will be gladly welcomed.
Sincerely,
Michael D Fitzpatrick
Reg. US Patent Agent
May you have a blessed day!
Michael D Fitzpatrick
Reg. US Patent Agent
-
evangelmike
- Pro Scripter
- Posts: 56
- Joined: Sun May 11, 2008 9:39 pm
Post
by evangelmike » Mon May 12, 2008 1:56 am
Greetings! I have further researched native Boolean variables in Macro Scheduler. Consider the following code:
Code: Select all
Let>MyString=Stryng
Let>Cat={%MyString%="Stryng"}
// Thus the variable Cat should be a Boolean True
If>{%Cat%=1}
MessageModal>Cat3 is %Cat%
Endif
If>{%Cat%="TRUE"}
MessageModal>Cat2 is %Cat%
Endif
It is instructive to note that the only message displayed when the above code is executed is:
Cat2 is TRUE
This tells me that the Macro Scheduler Boolean True is the string TRUE, not even the value 1. Likewise, the Macro Scheduler Boolean False is the string FALSE, not even the value 0. Any comments will be gladly welcomed.
Sincerely,
Michael D Fitzpatrick
May you have a blessed day!
Michael D Fitzpatrick
Reg. US Patent Agent
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Mon May 12, 2008 3:38 pm
No, Macro Scheduler knows only of strings and numbers. There is no real boolean type in regular Macro Scheduler code. Only inside complex expressions and VBScript. As you have found, if passed out of complex expressions they will be seen as strings ("TRUE" or "FALSE").
-
Me_again
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Post
by Me_again » Mon May 12, 2008 4:18 pm
I hope nobody has patented TRUE and FALSE
