List of Variables

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

List of Variables

Post by armsys » Fri Oct 30, 2015 11:40 am

I write a simple and ultra fast script to enumerate variables for debugging.
I impose my rule on variable naming: only A-z, 0-9 and _ (underscore) are allowed.
Please feel free to use it.
How to use:
Insert your script in the label area named Script.

Code: Select all

LabelToVar>Script,Script
Let>Rex=(?im)(?<=Let>)([A-Za-z0-9_]+)(?==)
Regex>Rex,Script,0,Match,num,0
Let>VarList=
If>num>0
  Let>i=1
  Repeat>i
    Concat>VarList,Match_%i%
    Concat>VarList,%CRLF%
    Add>i,1
  Until>i>num
Endif
MDL>Number of found variables=%num%%CRLF%%VarList%

/*
Script:
Let>WIN_REGEX=1
Let>WW_TIMEOUT=10
Let>WW_RESULT=TRUE
Let>Rex=^Macro Scheduler$
Let>WIN_SLEEP=1
WaitWindowOpen>%Rex%
Let>WIN_SLEEP=0
WaitReady>0
If>WW_RESULT=TRUE
SetFocus>%Pgm%
Endif
*/

User avatar
Meryl
Staff
Posts: 124
Joined: Wed Sep 19, 2012 1:53 pm
Location: Texas
Contact:

Re: List of Variables

Post by Meryl » Mon Nov 02, 2015 4:18 pm

Thanks for sharing it, armsys!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts