[Q] Percent and colors - Zooper Widget General

I have two questions (hope you guys can help me):
1 - Is there a way to hide some numbers? Here's what i want:
$((#usedSD#/#totalSD#)*100)$ = this will give me a percentage of used space in SD card, but i don't want the decimal numbers (23,33 - want to remove the numbers after the comma).
2 - How to apply different colors to a text?
#Battery# < 20 red color
#Battery# < 60 green color
#Battery# > 60 blue color
Sorry for my english and thank you in advance.

yudroid said:
I have two questions (hope you guys can help me):
1 - Is there a way to hide some numbers? Here's what i want:
$((#usedSD#/#totalSD#)*100)$ = this will give me a percentage of used space in SD card, but i don't want the decimal numbers (23,33 - want to remove the numbers after the comma).
2 - How to apply different colors to a text?
#Battery# < 20 red color
#Battery# < 60 green color
#Battery# > 60 blue color
Sorry for my english and thank you in advance.
Click to expand...
Click to collapse
1. You can use floor() to round numbers to their nearest lower integer or ceil() for the upper variant. Your code should look like this $(floor((#usedSD#/#totalSD#)*100))$
You can find all the available math functions for Zooper here: http://zooper.themerapp.com/support/solutions/articles/157988-math-expressions
2. Advanced Parameters are your friend here. The following code put into the Advanced Parameters of a text module will change the color according to your specifications:
Code:
$#BLEVN#<20?[c]ffff0000[/c]$$#BLEVN#>=20 && #BLEVN#<60?[c]ff00ff00[/c]$$#BLEVN#>=60?[c]ff0000ff[/c]$

kwerdenker said:
2. Advanced Parameters are your friend here. The following code put into the Advanced Parameters of a text module will change the color according to your specifications:
Code:
$#BLEVN#<20?[c]ffff0000[/c]$$#BLEVN#>=20 && #BLEVN#<60?[c]ff00ff00[/c]$$#BLEVN#>=60?[c]ff0000ff[/c]$
Click to expand...
Click to collapse
After put this code I have only this text "ff0000ff" - I do not have battery level....what is wrong ?

geeket said:
After put this code I have only this text "ff0000ff" - I do not have battery level....what is wrong ?
Click to expand...
Click to collapse
You probably put the code into the text field instead in the Advanced Parameters field. Scroll down to the end of the module options when editing your text module, there you'll find it.
Send from my secret moonbase via space carrier pigeons

kwerdenker said:
You probably put the code into the text field instead in the Advanced Parameters field. Scroll down to the end of the module options when editing your text module, there you'll find it.
Send from my secret moonbase via space carrier pigeons
Click to expand...
Click to collapse
OK - I have this but...all should look like this:
+add "text" -> in "edit text" write #BLEV# -> in advaced Parameters write Your code

geeket said:
OK - I have this but...all should look like this:
+add "text" -> in "edit text" write #BLEV# -> in advaced Parameters write Your code
Click to expand...
Click to collapse
Yes, that should work ?
Send from my secret moonbase via space carrier pigeons

Related

Web Form Help

Is there a way to default a field in a web-form to numbers?
I'm working on a Dash-Friendly web page and have a form field that is for numbers only.
It'd be nice if I could code it so that a user didn't have to hit the alt key for every number they wanted to enter in this field.
SirKeats said:
Is there a way to default a field in a web-form to numbers?
I'm working on a Dash-Friendly web page and have a form field that is for numbers only.
It'd be nice if I could code it so that a user didn't have to hit the alt key for every number they wanted to enter in this field.
Click to expand...
Click to collapse
Are you making this on a website or a form to fill out on your phone?
He did say "web-form".... heheheh
*runs away*
OrganicM said:
He did say "web-form".... heheheh
*runs away*
Click to expand...
Click to collapse
* If you're in a form, right-click the field label and select Edit this field's properties.
* If you're in a report, left-click the column heading and select Edit this field's properties
* In the table bar on any application page, click the table containing the field you want to change. Within the menu that appears, select Customize --tablename-- table > Fields.
* In the menu bar on any application page, select Customize > Tables. Within the list on the left side of the page, click the table that contains the field you want to change and click the Fields tab.
# Change the attributes of the field.
Within the Numeric Options sections, go to the Treat As option and select the desired numeric format.
# Click Save.
thanks mikey.
i'm actually working in raw code, so not sure what you mean by right click and such.
i'm just working up a specialized calculator using basic html (and javascript).
the calculator is working and such... i'm just not sure how to make it so that when you enter the figures for calculation into the different table (form) fields it enters as numbers instead of letters.
that was meant for QuickBase....sorry
SirKeats said:
thanks mikey.
i'm actually working in raw code, so not sure what you mean by right click and such.
i'm just working up a specialized calculator using basic html (and javascript).
the calculator is working and such... i'm just not sure how to make it so that when you enter the figures for calculation into the different table (form) fields it enters as numbers instead of letters.
Click to expand...
Click to collapse
Well here's a suggestion for ya... Find a website that already does that... Open it up in Notepad and have a look at the code they're using
great idea. anyone know of a good example site? (looking for one now but suggestions accepted. lol)
SirKeats said:
great idea. anyone know of a good example site? (looking for one now but suggestions accepted. lol)
Click to expand...
Click to collapse
Mortgage company calculator?? Chase bank.
I don't know

[Q] on tap internal action

Hi,
Is there a way to make some actions (like change the color of a shape or move a shape, hide a bitmap etc.) by taping on an object (bitmap, shape, etc.)
Thanks a lot
karlichon said:
Hi,
Is there a way to make some actions (like change the color of a shape or move a shape, hide a bitmap etc.) by taping on an object (bitmap, shape, etc.)
Thanks a lot
Click to expand...
Click to collapse
By internal means no, with the additional help of Tasker yes. If that is an option for you and you want some more details on the how just ask
kwerdenker said:
By internal means no, with the additional help of Tasker yes. If that is an option for you and you want some more details on the how just ask
Click to expand...
Click to collapse
Yes thanks a lot I Found a very powerfull way with Tasker !
1) Create a Task in Tasker :
- In Tasker, tab Task click "+"
- Gives a name
- Select lugin -> Zooper widget
- Click on the pen in Config bar
- In text field Variable ZW : Give a name to the Variable (ex: MyZooperVar)
- In text field Text ZW : Enter a value (ex: 2)
- Click the save icon
- Your variable must appears under Config section (ex: #TMyZooperVar# = 2
- Go back and select an icon (internal, blank icon for exemple)
- Go back, your task must appears in the list
2) Add an on tap action in zooper widget :
- Create a shape or a bitmap
- Click on "module on tap"
- select Shortcuts -> tasker -> "select your tak"
3) When you click on your bitmap, the tasker task runs and the variable #TMyZooperVar# should be equal to the value "2"
4) For exemple, in order to slide a cursor :
- Create a shape as a cursor
In this exemple, init_pos is the initial position of the shape and offset is the number of pixels to slide for each tab
- In Advanced section of the shape, enter : "[ox]$init_pos+(offset * #TMyZooperVar#)$[/ox]

Change text color on notification

Is there an advanced parameter for changing the color of Rich Text when you get a new SMS or missed call?
If I have a widget that reads "You have 4(#SUSMS#) unread messages", is there a way to change the color of it from white, when 0, to green or transparent when >0?
I am trying to have it transparent when zero. I already know how to hide bitmaps just not text.
Thanks.
Put this in adv parameters and the text goes transparent when sms = 0
$#SUSMS#=0?[c]#00000000[/c]$
An other option would be to place the text off screen with [ox]
jimlahey said:
Put this in adv parameters and the text goes transparent when sms = 0
$#SUSMS#=0?[c]#00000000[/c]$
An other option would be to place the text off screen with [ox]
Click to expand...
Click to collapse
That gave the opposite effect
But with that I figured it out
Setting the color of the text to "00FFFFFF" - transparent
Then in adv parameters add $#SUSMS#!=0?[c]#FFFFFF[/c]$
Thank you so much man!
Actually any six numbers with #00 in front of them are transparent, (as long as there's no text shadow if I remember correct)
I'm glad I could help!
Why the ! in the equation? should it not be =? but this did not work for me.
mistere372002 said:
Why the ! in the equation? should it not be =? but this did not work for me.
Click to expand...
Click to collapse
No. $#SUSMS#=?...$ will never be true because #SUSMS# will never be blank since it will always be a number equal to or greater than 0.
Does anyone know the formula for changing the colour on a rectangle when a notification appears and then disappears once read

[Q] Hide/Show Zooper notification widget

How do I make it so my Zooper Widget hides when I have zero missed calls and shows only when it has one or more missed calls?
Did a bit of browsing and found I would need Tasker for this, and that's where I stopped since its a lot to take in.
--------
Edit - After more browsing it seems I didn't actually need tasker. So instead Ill ask for help on how to hide an entire widget only when I have 1+ missed calls and hide when I have none. Didn't know about the advanced parameter section.
----------
Edit - At the moment I'm using a " $#SUSMS#<1?[oy]999[/oy]$ " to "hide" at the moment. Is there a better way to hide widgets than this? I need to still.be able to widget click them when hidden.
Shintroy said:
How do I make it so my Zooper Widget hides when I have zero missed calls and shows only when it has one or more missed calls?
Did a bit of browsing and found I would need Tasker for this, and that's where I stopped since its a lot to take in.
--------
Edit - After more browsing it seems I didn't actually need tasker. So instead Ill ask for help on how to hide an entire widget only when I have 1+ missed calls and hide when I have none. Didn't know about the advanced parameter section.
----------
Edit - At the moment I'm using a " $#SUSMS#<1?[oy]999[/oy]$ " to "hide" at the moment. Is there a better way to hide widgets than this? I need to still.be able to widget click them when hidden.
Click to expand...
Click to collapse
Is the module you are using to display the notification a Text/Rich text module or a bitmap module?
kwerdenker said:
Is the module you are using to display the notification a Text/Rich text module or a bitmap module?
Click to expand...
Click to collapse
Text. I have one for calls.and sms notifications. Here's an attachment to show what I have so far. The call widget is adjacent to the sms one and hidden correctly. I'm asking if there's a better way to hide the widgets. Maybe change the opacity instead of the x, y positions?
Shintroy said:
Text. I have one for calls.and sms notifications. Here's an attachment to show what I have so far. The call widget is adjacent to the sms one and hidden correctly. I'm asking if there's a better way to hide the widgets. Maybe change the opacity instead of the x, y positions?
Click to expand...
Click to collapse
Yes, use Advanced Parameters for color with Text, and write 00ffffff for example ( 00 is alpha level ).
Inviato dal mio GT-N7000 con Tapatalk 2
Shintroy said:
Text. I have one for calls.and sms notifications. Here's an attachment to show what I have so far. The call widget is adjacent to the sms one and hidden correctly. I'm asking if there's a better way to hide the widgets. Maybe change the opacity instead of the x, y positions?
Click to expand...
Click to collapse
Yes, controlling the opacity is the other possibility. For (Rich) Text and Rect modules you can control the color via the [c][/c] tags in advanced parameters. The color is defined via a 8 character string where the first two control the opacity of the color. So the modified version of the conditional you posted could look like this:
$#SUSMS#<1?[c]00ffffff[/c]$
Hmmm, It didn't work. Is there a issue with this? I have put it in advanced parameters and in the text area.
$#SUSMS#<1?[c]00ffffff[/c]$ <-- This shows this ---> [c]00ffffff[/c] in the preview window below. And the with nothing in the widget.
mistere372002 said:
Hmmm, It didn't work. Is there a issue with this? I have put it in advanced parameters and in the text area.
$#SUSMS#<1?[c]00ffffff[/c]$ <-- This shows this ---> [c]00ffffff[/c] in the preview window below. And the with nothing in the widget.
Click to expand...
Click to collapse
This conditional only controls the color of the module and should be put in the Advanced Parameter option. You then have to put the actual content of the module (i.e. #SUSMS#) into the Text option so there is anything on which the opacity can be controlled.

Am I using the advanced parameters correctly? My results yield nothing

Hi,
This is what I have in my advanced params section:
110[c]$#Da#=PM?#980002:#FFFFFF$[/c]#Dh#55[c]#FFFFFF[/c]:#Dmm#
I want the hour to be font size 110 and dark red if its in the PM, the colon and minutes font size 55 and the text color white.
That looks right to me but its not. Point out the errors of my ways, please.
Regards,
Dave
Sent from my Nexus 5 using Tapatalk
MrBiggzz said:
Hi,
This is what I have in my advanced params section:
110[c]$#Da#=PM?#980002:#FFFFFF$[/c]#Dh#55[c]#FFFFFF[/c]:#Dmm#
I want the hour to be font size 110 and dark red if its in the PM, the colon and minutes font size 55 and the text color white.
That looks right to me but its not. Point out the errors of my ways, please.
Regards,
Dave
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
I'll just describe how you can achieve the setup you want. See if you can identify the differences to your version and if you don't understand things just ask. I think this will help you the most in the long run
First you should identify your baseline configuration. In your case this is white as the color and a font size of 55. These you should set via the normal module settings. Now to the conditionals: since you want these to only be applied to certain portions of your (Rich) Text module, you have to put them into the content part of the module (as opposed to the Advanced Parameter section). If you have set the baseline option, the following content for your module should achieve the desired effect:
[s=110]$#Da#=PM?[c=980002]#DHH#[/c]:#DHH#$[/s]:#Dmm#
I hope this helps you understand the correct usage of conditionals in Zooper.
Happy theming!
Ok, cool!
I was confused cause I saw the statement "Warning: advanced Parameters are in use" under the fonts color. I took that as a warning that what ever I do there would be overrode by the advanced parameters. So setting the fonts size, color are a baseline then.
Now you say to put the rest of the conditional into the content part of the module. Is there a rule of thumb when to do this? And would this differ if I was using just regular text as opposed to rich text?
Edit: I did this works rather nicely! How would I be able to move the colon and minutes portion to the be inline with the top of the hours? I know there's [oy] and I tried using that:
[s=110]$#Da#=PM?[c=980002]#DHH#[/c]:#DHH#$[/s][oy=-10]:#Dmm#[/oy]
And the colon and minutes did not move up. I even tried a positive value, still the same.
Thanks!

Categories

Resources