Blank Variable

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Robbyn
Junior Coder
Posts: 43
Joined: Tue Feb 15, 2005 9:55 pm

Blank Variable

Post by Robbyn » Mon Mar 20, 2006 11:25 am

I have a variable that may contain spaces or text. The spaces are of an unknown length as is the text. I want to test if a variable has no text. How do I code for such a test an I see no trim or asci function?

Robin
Robin

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

Post by Marcus Tettmar » Mon Mar 20, 2006 11:37 am

Hi,


VBSTART
VBEND

//e.g.:
Let>val= some text and spaces
//Let>val=

VBEval>Trim("%val%"),val
If>{%val%=""}
//empty
Else
//has text
Endif


Try setting val to just spaces.
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
Sign up to our newsletter for free automation tips, tricks & discounts