Scan with your iPhone to install
Kiểm tra thời gian sạc đầy đến 100%
What's New
Version 1.0
First release
What it does
18 actions-
Get Battery Level
-
Calculate
-
Set Variablebattery needed
-
Calculate
-
Calculate
-
Round Number
-
Set Variabletime left
-
If
-
Calculate
-
Set Variableminutes
-
Show Result
-
If
-
If
-
Calculate
-
Set Variableminutes
-
Show Result
-
If
-
Show Result
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#include 'actions/math'
#include 'actions/device'
#define color green
#define glyph rectangleSplitThreeOutline
const McPin = getBatteryLevel()
@BatteryNeeded = 100 - McPin
const RsultatDuCalcul = @BatteryNeeded * 110
const RsultatDuCalcul1 = RsultatDuCalcul / 60
round(RsultatDuCalcul1)
@TimeLeft
if @TimeLeft > 120 {
@minutes = @TimeLeft - 120
show("Máy của bạn đang ở {McPin}%\nNó sẽ mất 2 tiếng và {@minutes} phút để sạc đến 100%")
}
if @TimeLeft > 60 {
if @TimeLeft <= 120 {
@minutes = @TimeLeft - 60
show("Máy của bạn đang ở{McPin}%\nNó sẽ mất 1 tiếng và {@minutes} phút để sạc đến 100%")
}
} else {
show("Máy của bạn đang ở {McPin}%\nNó sẽ mất {@TimeLeft} phút để sạc đến 100%")
}
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
You Might Also Like
Advertisement