I want to do something like the following
Code:
IF condition=true THEN display '$'
But since the $ sign is used as a boundary for a conditional statement in Zooper, how do I trigger an escape so that Zooper sees my $ as a literal character? I tried '\' but it doesn't seem to be the escape character. (It does display the dollar sign, but as an error i.e. bad IF statement.)
Any ideas?
Backslash works for me. Post your code so we could have a look. [emoji4]
CopKiller76 said:
Backslash works for me. Post your code so we could have a look. [emoji4]
Click to expand...
Click to collapse
I won't use my actual code because it would be a long story explaining, but here is an example:
Code:
$#WCCODE#=16?Yay \$\$\$:Boo \$$
I expect the output to be
Yay $$$
or
Boo $
depending on the weather condition.
Instead I get
$
This is not a literal $; this is Zooper telling you that your conditional statement is faulty.
And if I have another IF statement following the above,
Code:
$#WCCODE#=16?Yay \$\$\$:Boo \$$ $WCTEMPN>=30?[c=#ffaa00]WCTEMPN°[/c]:WCTEMPN°$
I still get a solitary
$
because the entire line was already messed up from the first \$.
If you use Tasker, you could try setting up a task that sets 2 zopper variables to what you want
#TYay# = $$$ and #TBoo# = $
then use those variables in your code
$ #WCCODE#=16 ? Yay #TYay# : Boo #TBoo# $
Haven't tried this myself so I'm not absolutely sure this will work but I don't see any reason why it wouldn't. Other than this I don't see any other way to do what you want.
DIsplaying Escape / Literal Characters in Zooper using Tasker
I came upon an answer to a quandary that's been dogging me lately, and that is how to visibly show some reserved special characters in Zooper that are used in Zooper's logic equations, and then I realized how simple it is.
So for those somewhat unfamiliar with Zooper, it's a widget app that can display just about anything using dynamic variables and conditions (Time, Weather, Images), it's really versatile, and what makes it more versatile is that any condition(s) Zooper doesn't have built in variables for, Tasker can push new vars into it, to create amazing dynamic widgets.
Anyhow, Zooper uses some rather arcane logic statement setups and variable designation schemes that makes it hard to display special reserved chars such as $ , : , ? especially while operating INSIDE of a Zooper logic statement,
So a typical Zooper logic statement looks like:
$#VAR1#=1?#WEATHER#:#TIME$
Which translated to:
IF <VAR1> EQUALS 1 THEN - DISPLAY <WEATHER> ELSE DISPLAY <TIME?
So if you want to actually DISPLAY a reserved char like $, :, ? - I have yet to find the syntax to escape chars in Zooper. The typical backslash doesn't work, nor does encapsulating the char in quotes, etc. The only way I've found is to close the logic statement then open a new one and it makes a big mess.
SO SOLUTION:
In Tasker, I just used the Zooper Widget plugin to push these chars into Zooper as external variables, i.e. in a Tasker Task use the Zooper Action to:
Set var #TC#=:
Set var #TQ#=?
Set var #TD#=$
Then I just throw them in anywhere I need them in Zooper. Works like a charm and beyond that an added benefit is that Zooper seems to retain any variables set in this manner indefinitely, even after reboot, etc.
So once that Task is run in Tasker, Zooper holds on to those variables. Hopefully this is helpful, and if anyone actually knows the standard syntax (if there is one) to escape chars within Zooper without using Tasker I'd be interested.
Related
Firstly, I *love* ZWP and have been using it religiously.
With my new Nexus 5, however, I decided to make a new widget to match the current phone instead of my previous setup. I like having my next 3-4 calendar appointments shown in a list with dates and times and the heading, in the #C0SEEE dd - HH:mm# #C0TITLE# format. Some appointments though have longer titles and interfere with other items I have entered into the widget.
I tried using the new Rich Text feature and setting margins to various lengths and setting lines to 1, but a long appointment title still bleeds over into the next portion of my layout.
What am I missing?
Zanthany said:
Firstly, I *love* ZWP and have been using it religiously.
With my new Nexus 5, however, I decided to make a new widget to match the current phone instead of my previous setup. I like having my next 3-4 calendar appointments shown in a list with dates and times and the heading, in the #C0SEEE dd - HH:mm# #C0TITLE# format. Some appointments though have longer titles and interfere with other items I have entered into the widget.
I tried using the new Rich Text feature and setting margins to various lengths and setting lines to 1, but a long appointment title still bleeds over into the next portion of my layout.
What am I missing?
Click to expand...
Click to collapse
You should consider using the [tr]-tags to limit your field to a certain amount of characters. Usage example in your case would be
Code:
#C0SEEE dd - HH:mm# [tr=30]#C0TITLE#[/tr]
This would limit the output of the title to 30 characters and put three dots at the end to indicate the string is longer than what is displayed. You'll have to play around a bit to find the right limit for your particular setup though.
For future references, you can find all the available tags for Rich Text Modules here.
Hope this helps you out
When I create a Tasker value that can be used in Zooper (#T...#), I can not use this value under Advanced Parameters in an argument.
When I type #T...# it gives me the value. When I use $#T...#=Value?, it doesnt work and it leaves the $T..# blank. Any ideas on how to solve this? I want to use this to change the color of an object when for instance GPS is on
RebelwithoutaClue said:
When I create a Tasker value that can be used in Zooper (#T...#), I can not use this value under Advanced Parameters in an argument.
When I type #T...# it gives me the value. When I use $#T...#=Value?, it doesnt work and it leaves the $T..# blank. Any ideas on how to solve this? I want to use this to change the color of an object when for instance GPS is on
Click to expand...
Click to collapse
Is " $#T...#=Value?" the whole string you entered or are you just partially quoting it? I ask because Zoopers parser engine doesn't respond well to incomplete conditionals and that might throw off the substation of variable tags.
Apart from that I adhoc don't have any other idea. Did multiple widgets with Tasker variables and have not yet encountered this problem. If you upload your profile/task and your widget I could take a look at it for you.
Send from my secret moonbase via space carrier pigeons
kwerdenker said:
Is " $#T...#=Value?" the whole string you entered or are you just partially quoting it? I ask because Zoopers parser engine doesn't respond well to incomplete conditionals and that might throw off the substation of variable tags.
Apart from that I adhoc don't have any other idea. Did multiple widgets with Tasker variables and have not yet encountered this problem. If you upload your profile/task and your widget I could take a look at it for you.
Send from my secret moonbase via space carrier pigeons
Click to expand...
Click to collapse
The entire string is as follows:
[c]$#TGPS#=on?#4a2d8303$[/c]
In Tasker there is a task triggered by profile Variable set %GPS, that reads:
Zooper Widget Pro Variable
ZW variable = GPS
ZW Text = %GPS
RebelwithoutaClue said:
The entire string is as follows:
[c]$#TGPS#=on?#4a2d8303$[/c]
In Tasker there is a task triggered by profile Variable set %GPS, that reads:
Zooper Widget Pro Variable
ZW variable = GPS
ZW Text = %GPS
Click to expand...
Click to collapse
Did you try to setup a task that just sets the variable to 0 or 1 depending on GPS status? String comparison in Zooper sometimes is a bit wonky so I usually try to do it with numbered values instead
kwerdenker said:
Did you try to setup a task that just sets the variable to 0 or 1 depending on GPS status? String comparison in Zooper sometimes is a bit wonky so I usually try to do it with numbered values instead
Click to expand...
Click to collapse
Now it got a bit weird, changed the task to make #TGPS# 1 if gps is on and 0 when off. But when I put the variable in Zooper, it still showed On and Off. So I changed the name of the value to #TSAT# and now the argument works. I think since %GPS is a standard task value, it will make TGPS a standard value as well. Now the argument works with the new value name. Thanks for helping me out
Never mind... forgot I used #TGPS# in another task...fixed that
hello, i am relatively new to zooper, but I'm pretty good with tasker.
I'm creating a basic notification widget, and i have it sending and updating the notification numbers just fine, but I am lazy and i don't wan't to have to copypasta the color codes/font sizes 12 times whenever i change my mind (frequently).
I have a tasker widget called" Zooper Widget Vars" pushing these commands (via the Zooper Widget Pro Variable plugin) (brackets are obviously not in the code)
configuration #TZFLG# = 50 (large size for icons)
configuration #TZFSM# = 10 (small size for numbers)
configuration #TZFLGC# = #ffffffff (color for icons)
configuration #TZFSMC# = #ff66d5da (color for numbers)
And i just press play whenever i want to send the variables to Zooper.
in zooper, in a rich text module, I have:
[s=#TZFSM#][c=#TZFSMC#]#TWHATSAPPCT#[/c][/s]
and in another Rich text module I have:
[s=#TZFLG#][c=#TZFLGC#]f[/c][/s]
#TZFSM#,#TZFLG#,#TZLGC# and #TZFSMC#
#TWHATSAPPCT# updates just fine. Problem is, #TZFSM# and #TZFSMC# do not update the widget until #TWHATSAPPCT# changes. #TZFLG# and #TZLGC# do not change at all unless I manually change the letter icon and change it back, which is, quite frankly, a pain in the ass.
I have tried just sticking #TZFSM#,#TZFLG#,#TZLGC# and #TZFSMC# in an RT module without the BBcode around them, and their values do print out, so I know that Zooper is actually receiving them, but its just ignoring them when they are enclosed in BBtags.
In layman's terms, the widget will not redraw with the new color and size parameters unless the content that the bbcode is modifying changes. Ive spent about 2 hours youtubing and googleing and wiki-ing, and I've decided I'm a noob and should just ask for help.
thank you so much in advance for any assistance.
(Nexus 5 with the lollipop dev preview installed)
P.S. though I think that ZW Utilities is a lovely little tool, it does not solve the lack of size updates, so please do not direct me there.
digitalgraffiti said:
hello, i am relatively new to zooper, but I'm pretty good with tasker.
I'm creating a basic notification widget, and i have it sending and updating the notification numbers just fine, but I am lazy and i don't wan't to have to copypasta the color codes/font sizes 12 times whenever i change my mind (frequently).
I have a tasker widget called" Zooper Widget Vars" pushing these commands (via the Zooper Widget Pro Variable plugin) (brackets are obviously not in the code)
configuration #TZFLG# = 50 (large size for icons)
configuration #TZFSM# = 10 (small size for numbers)
configuration #TZFLGC# = #ffffffff (color for icons)
configuration #TZFSMC# = #ff66d5da (color for numbers)
And i just press play whenever i want to send the variables to Zooper.
in zooper, in a rich text module, I have:
[s=#TZFSM#][c=#TZFSMC#]#TWHATSAPPCT#[/c][/s]
and in another Rich text module I have:
[s=#TZFLG#][c=#TZFLGC#]f[/c][/s]
#TZFSM#,#TZFLG#,#TZLGC# and #TZFSMC#
#TWHATSAPPCT# updates just fine. Problem is, #TZFSM# and #TZFSMC# do not update the widget until #TWHATSAPPCT# changes. #TZFLG# and #TZLGC# do not change at all unless I manually change the letter icon and change it back, which is, quite frankly, a pain in the ass.
I have tried just sticking #TZFSM#,#TZFLG#,#TZLGC# and #TZFSMC# in an RT module without the BBcode around them, and their values do print out, so I know that Zooper is actually receiving them, but its just ignoring them when they are enclosed in BBtags.
In layman's terms, the widget will not redraw with the new color and size parameters unless the content that the bbcode is modifying changes. Ive spent about 2 hours youtubing and googleing and wiki-ing, and I've decided I'm a noob and should just ask for help.
thank you so much in advance for any assistance.
(Nexus 5 with the lollipop dev preview installed)
P.S. though I think that ZW Utilities is a lovely little tool, it does not solve the lack of size updates, so please do not direct me there.
Click to expand...
Click to collapse
Instead of entering the bbcode in the text field with the text did you try separating it out and entering it in the advanced parameters field.
jr67 said:
Instead of entering the bbcode in the text field with the text did you try separating it out and entering it in the advanced parameters field.
Click to expand...
Click to collapse
in the end i figured it out with putting all of the styling in the advanced params space and the content in the text area
thanks for your help!
Hey, all. First of all, love Zooper and think it's amazing. I'm just starting off with advanced fields and conditionals and have had mixed results. I've searched around for some answers and experimented on my own, but have not been able to produce a successful result with one of my rich text fields.
Essentially what I'm doing is a if then statement for colors for SMS and e-mails (as demonstrated in many great tutorials) and have had success with one, but not another.
My successful conditional reads: $#SUSMS#<1? : #SUSMS#$ I.E. if the unread SMS count is less then 1, display an emoji, if greater, display the unread SMS count.
However, when I extend this to my Gmail formula I run into a problem. Because my I want my unread Gmail to read an accurate count across my default inbox (primary, promotions, updates) I use the math conditional $(#SUG0Primary#+#SUG0Updates#+#SUG0Promotions#)$ which works wonderfully by itself, for example (3+5+1) = 9 and the output reads 9.
But when I try to throw that into a similar statement as above, like $ $(#SUG0Primary#+#SUG0Updates#+#SUG0Promotions#)$<1? : (#SUG0Primary#+#SUG0Updates#+#SUG0Promotions#)$ $ the output displays the math formula twice (3+5+1) (3+5+1), rather than the the desired result of 9 or an emoji.
Basically, I'm trying to find how accomplish the desired effect of my SMS conditional, but the addition of this math conditional is giving me problems and I cannot find the correct solution. Any tips or advice?
You don't need the extra $s around the math expressions because it's already surrounded by $s since its embedded in a conditional statement:
This should work:
$(#SUG0Primary#+#SUG0Updates#+#SUG0Promotions#)<1? emoji : (#SUG0Primary#+#SUG0Updates#+#SUG0Promotions#)$
Is it possoble to get me to press a bitmap and male ot shrink while making a different one grow?
Yes this can be achieved. With any type of toggle input you will need to create a Tasker task which will toggle a variable on or off. You can then output this variable to Zooper and use a conditional to act upon the variable state (in this case you would want to use the bitmap scaling function on each of the bitmaps) then set the module on tap element of both bitmaps to the task shortcut in order to activate it.
The speed at which this works would be dependant on your phone/tablet so it might not work particularly fast.
Is there a video for this? Im kinda confused but im understanding it a little more.
Sorry for not getting back to you sooner.
This isn't a video but should help you to create the toggle in Tasker: http://www.pocketables.com/2013/03/how-to-create-a-toggleable-task-in-tasker.html
After you have got that working you just need to add another action so press + in your task then select plugin, and then Zooper Widget Pro.
In configuration enter the Tasker variable in ZW Text (remember the %) and enter a name in ZW Variable which you want to use in zooper, this can be anything you want. The convention is to use all capitals for Zooper variables buy it is not necessary.
Once you have saved this you will see that Tasker has added #T to the start of your variable and another # at the end, this is what you will be using in zooper.
Exit from the task with the < icon in the top left corner until you are back at the task page. This is important as it saves your task and also you will not be able to access the task shortcut from Zooper (or any other app for that matter) as Tasker will still be in edit mode.
Right, in your zooper widget call up one of your Bitmaps and go to advanced parameters. Enter this code , changing the variable name to what you have chosen
PHP:
$#TTASK#=1?[s]50[/s]:[s]100[/s]$
This tells Zooper to display bitmap at 50% if #TTASK# is set to 1 or 100% otherwise
Go to module on tap, select the Task Shortcut from the shortcuts menu, then select your task from the list - It will probably prompt you to select an icon. Do that and you have finished that bitmap. Now repeat the parameters in the other bitmap but change =1 to =0 so it is reversed then you are done.
Hopefully I haven't missed anything but let me know if you encounter any problems.
I almost got it, when i tap the picture it just switches between hello and world its probly my tasker but ill show u a screenshot
Lstarz said:
I almost got it, when i tap the picture it just switches between hello and world its probly my tasker but ill show u a screenshot
Click to expand...
Click to collapse
You've misunderstood me a little there, probably my fault.
In Zooper configuration enter %Toggle as the ZWText. It need to be the variable you have already defined in tasker, otherwise you are telling tasker to output a variable that you are not setting.
Also, you can just put one zooper plugin activity after the End If instead of having two separate statements as Tasker will read this last and update then.
Dude the man it works now
When I'm done with the widget I'll tell you so u can see what I shud improve, ATM I have 2 five nights at Freddy's widgets posted if u wanna check them out
Yo, the doors work for the toggle, but I'm trying to make chika and bonnie pop up on screen after a certain time that they show up at the doors
So basically, can I make a timer that that is triggered by one bitmap showing up and when it goes to zero a different bitmap pops up?