Advertisement
Guest User

Conditionals in battery Percentage Q&A

a guest
Oct 1st, 2014
744
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1.  
  2. Conditionals Pastebin, Q&A
  3.  
  4. -----------------------
  5.  
  6. [Conditionals In battery Percentage]
  7.  
  8. Q: by upsafe
  9. Hey all - as someone who has low computer programming, math etc. skills, I need some help trying to put a conditional in battery percentage.
  10. I'm trying to make the battery appear when it's 20% or less. I know this may be an easy question...sorry!
  11.  
  12. A: by wes__
  13. $#BLN#<=20?100:0$ should do the trick.
  14.  
  15. A: by riot9000
  16. I did the same thing! using the same formula below but I have it show up at 50% then turn bold/red when it hits 20%. I had to use 2 text fields and set the first one to move off the screen when i hit 20%. (set X Offset to " $#BLN#<=20?0:50$ " and Y Offset to " $#BLN#<=20?0:164$ ")
  17. by wes__
  18. So, the above equation description would move the image from where you place it to somewhere off the screen (for a moto 360) depending on the battery level number. X and Y offsets are what make your image show up where they do on the screen. X is your horizontal pixel measurement and Y is your vertical pixel measurement.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement