Requires Scriptable My Scriptable File: https://drive.google.com/file/d/1ziv970vtNsvPluD8zguX1IY-3-V_WqgF/view?usp=drivesdk
What's New
Version 1.0
First release
What it does
21 actions-
Get Battery Level
-
If
-
Show AlertError
-
Stop This Shortcut
-
If
-
Getcurrentapp
-
Text
-
Text
-
If
-
Set Low Power Mode
-
File
-
Get Text from Input
-
Open App
-
If
-
If
-
File
-
Get Text from Input
-
Open App
-
If
-
Save File
-
Parameterized Run Scriptdk.simonbs.Scriptable
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#define mac false
#include 'actions/device'
#define color red
const BatteryState = getBatteryLevel()
if BatteryState != 1 {
alert("Device is not at 1%", "Error")
stop()
} else {
}
rawAction("is.workflow.actions.getcurrentapp", {
"WFVisibleAppScope": "Current"
})
const Text3 = "{}"
const Text = "{ShortcutInput}"
if Text == "1" {
setLowPowerMode(false)
const File = file()
const Text1 = getText(File)
openApp()
} else {
if Text == "2" {
const File1 = file()
const Text2 = getText(File1)
openApp()
} else {
saveFile("/1% Battery Remaining Alert/Current App Data.txt", Text3, true)
rawAction("dk.simonbs.Scriptable.ParameterizedRunScriptIntent", {
"ShowWhenRun": false,
"fileName": "1% Battery Remaining Alert",
"parameter": [],
"runInApp": true,
"texts": []
})
}
}
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 coltensus
You Might Also Like
Advertisement