January 15th, 2013, 02:34 AM
|
#3 (permalink)
|
|
Junior Member
Thread Author (OP)
Join Date: Jan 2013
Posts: 16
Device(s):
Carrier: Not Provided
Thanks: 0
Thanked 1 Time in 1 Post
|
Quote:
Originally Posted by electricpete
Try changing your variable name from var1 to Var1 to change it from local to global variable.
Tasker for Android
Code:
Global vs Local Variables
All built-in variables are global, meaning they are visible anywhere in Tasker (e.g. %WIFI)
User variables which have one or more capital letters in their name are also global (e.g. %Car)
However, user variables which have all-lower-case names (e.g. %fruit) are local, meaning they are only visible in the task in which they are used (or the scene in which they are used, if the task was launched from by a scene event).
In general, it's best to use local variables wherever possible because:
you know they won't be interfered with by other tasks
they are more efficient in several ways
Note: multiple copies of the same task running at the same time each have their own separate copy of their local variables.
|
Thanks for the info. I'll keep that in mind for future reference, however...
In my original post/example I should have used what I actually had in Tasker which is:
1. if %powerAmpOn=False
2. Security Setting - Configuration Set Pin
3. endif
The above would not work however the following did
1. if %powerAmpOn ~ False
2. Security Setting - Configuration Set Pin
So... Did the last example work because I changed the = to ~ or because I removed the endif???
|
|
|
Last edited by cdikland; January 15th, 2013 at 02:37 AM.
|
|