ShareShortcuts

Charge Time

Gusses How Much Time UNTILL 100%

whyyouneed
Fork “Charge Time”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so whyyouneed gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
32K
Saved
0
Actions
45
Category
Utilities
Version
1.0
Language
EN

Gusses How Much Time UNTILL 100%

What's New

Version 1.0

First release

Version History
1.0 Jun 12, 2023

First release

What it does

45 actions
  1. Choose from Menu
    Charge time
  2. Choose from Menu
    Start
  3. Get Battery Level
  4. Calculate
  5. Set Variable
    Số pin cần
  6. Calculate
  7. Calculate
  8. Round Number
  9. Set Variable
    Thời gian còn lại
  10. If
  11. Calculate
  12. Set Variable
    Phút
  13. Text
  14. Choose from Menu
    Do you want to translate?
  15. Choose from Menu
    Yes
  16. Translate Text
  17. Show Alert
  18. Choose from Menu
    No
  19. Translate Text
  20. Show Alert
  21. If
  22. If
  23. Calculate
  24. Set Variable
    Phút
  25. Text
  26. Choose from Menu
    Do you want to translate?
  27. Choose from Menu
    Yes
  28. Translate Text
  29. Show Alert
  30. Choose from Menu
    No
  31. Translate Text
  32. Speak Text
  33. Show Alert
  34. If
  35. Text
  36. Choose from Menu
    Do you want to translate?
  37. Choose from Menu
    Yes
  38. Translate Text
  39. Show Alert
  40. Choose from Menu
    No
  41. Translate Text
  42. Show Alert
  43. Choose from Menu
    (will be patched because i am very lazy to do that)
  44. Choose from Menu
    Back/Return/Exit
  45. Stop This Shortcut

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#include 'actions/translation'
#include 'actions/math'
#include 'actions/device'
#define color teal
#define glyph battery


menu "Charge time" {
item "Start":
	const McPin = getBatteryLevel()
	@SPinCn = 100 - McPin
	const RsultatDuCalcul = @SPinCn * 110
	const RsultatDuCalcul1 = RsultatDuCalcul / 60
	round(RsultatDuCalcul1)
	@ThiGianCnLi
	if @ThiGianCnLi > 120 {
		@Pht = @ThiGianCnLi - 120
		menu "Do you want to translate?" {
		item "Yes":
			translate(, Ask, "vi_VN")
			confirm()
		item "No":
			translate(, "", "vi_VN")
			confirm()
		}
	}
	if @ThiGianCnLi > 60 {
		if @ThiGianCnLi <= 120 {
			@Pht = @ThiGianCnLi - 60
			menu "Do you want to translate?" {
			item "Yes":
				translate(, Ask, "vi_VN")
				confirm()
			item "No":
				translate(, "", "vi_VN")
				speak()
				confirm()
			}
		}
	} else {
		menu "Do you want to translate?" {
		item "Yes":
			translate(, Ask, "vi_VN")
			confirm()
		item "No":
			translate(, "", "vi_VN")
			confirm()
		}
	}
item " (will be patched because i am very lazy to do that)":
item "Back/Return/Exit":
	stop()
}
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by whyyouneed

See All

You Might Also Like

See All
Advertisement