Get length of variable

1,489 views
Skip to first unread message

Michael Frey

unread,
Feb 25, 2012, 10:41:29 AM2/25/12
to Tasker
I have created a "hack" to get the character length of a variable, but
was wondering if there is not a better method since this is very bugy
when using it on the text changed property of a text edit element.

Here are the steps:
Store your text into %VarText. After calling this task the length is
stored in %VarLength.


1. Set variable %VarLength to 0
2. Add 1 to variable %VarLength
3. Set %temp to section of %VarText from 1 to %VarLength
4. If %temp is not equal to %VarText
5. Goto step 2

Michael Frey

unread,
Feb 25, 2012, 10:46:19 AM2/25/12
to Tasker
Step 3 is actually 2 steps.
First set %temp to %VarText
Then set %temp to section from 1 to %VarLength

TW

unread,
Feb 25, 2012, 10:57:06 AM2/25/12
to tas...@googlegroups.com
Misc - Test - Type: Variable Length should do the trick 

Michael Frey

unread,
Feb 25, 2012, 11:03:43 AM2/25/12
to Tasker
Thank you. That works perfectly.
Reply all
Reply to author
Forward
0 new messages