Mit dem iPhone scannen, um zu installieren
Battery cycle
Neue Funktionen
Version 1.0
First release
Was er macht
13 Aktionen-
If
-
Show Result
-
Stop This Shortcut
-
If
-
If
-
Show Result
-
Stop This Shortcut
-
Set Name
-
Get Text from Input
-
Match Text
-
Match Text
-
Get Device Details
-
Show Result
Als Code ansehen
Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.
#include 'actions/text'
#define color green
#define glyph battery
if !ShortcutInput {
show("No \"log-aggregated\" file found. Go to Settings > Privacy > Analytics & Improvements > Analytics Data. ")
stop()
} else {
if ShortcutInput !contains "log-aggregated" {
show("No \"log-aggregated\" file found. Go to Settings > Privacy > Analytics & Improvements > Analytics Data. ")
stop()
}
}
const RenamedItem = setName(ShortcutInput, "{ShortcutInput['Name']}.txt")
getText(RenamedItem)
containsText(, "(?<=BatteryCycleCount<\/key>).*\n.*.\d+")
containsText(, "\d+")
getDeviceDetail("Device Model")
show("Your {} battery cycle count is: {} cycles.")
In Cherri Playground öffnen
Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.
Bewertungen und Rezensionen
Rezension schreiben–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Werbung
Mehr von outlander-2007
Das gefällt dir vielleicht auch
Werbung