Timer and Stopwatch Launcher
You will be asked for text input in the following syntax ('#' is set by default to be deleted as needed):
Input digits and anything else as separators:
# <minute> [second]
([second] is optional)
<hour> [minute]
([minute] is optional)
Input any length of text excluding digits:
# <text length = minute>
<text length = hour>
Leave it blank for stopwatch. ('#' is optional)
Examples:
#hello 5-minute timer
got it 6-hour timer
#3 3-minute timer
2 15 2-hour-15-minute timer
# 6 + 7 = 13 6-minute-7-second timer
# starts the stopwatch
Nyheder
Version 1.4
Changed the prompt.
Hvad den gør
31 handlinger-
Text
-
Set VariableNullText
-
Text
-
Ask for Input…
-
Match Text
-
Get Group from Matched Text
-
If
-
Text
-
If
-
Text
-
Set VariableMinHourFactor
-
Get Group from Matched Text
-
Set VariableOnes
-
If
-
Get Group from Matched Text
-
Count
-
If
-
Calculate
-
Start Timer
-
Open Tabcom.apple.mobiletimer
-
If
-
Start Stopwatchcom.apple.mobiletimer
-
Open Tabcom.apple.mobiletimer
-
If
-
Get Group from Matched Text
-
If
-
Text
-
Set VariableSixtieths
-
Calculate Expression
-
Start Timer
-
Open Tabcom.apple.mobiletimer
Vis som kode
Alle genvejens handlinger skrevet ud i Cherri, et programmeringssprog til genveje. Perfekt til at lære, hvordan den virker.
#include 'actions/text'
#define color teal
#define glyph timer
@NullText = "nil"
prompt(, "Text", false)
const Matches = containsText(, "^(#?)([^0-9]*)([0-9]*)[^0-9]*([0-9]*)")
const Text = getMatchGroup(Matches, 1)
if Text == "#" {
} else {
}
@MinHourFactor = "60"
getMatchGroup(Matches, 3)
@Ones
if @Ones == @NullText || !@Ones {
const Text1 = getMatchGroup(Matches, 2)
const Count = count(Text1, "Characters")
if Count > 0 {
startTimer()
rawAction("com.apple.mobiletimer.OpenTab", {
"AppIntentDescriptor": "",
"tab": "timer"
})
} else {
rawAction("com.apple.mobiletimer.StartStopwatchIntent", {
"AppIntentDescriptor": ""
})
rawAction("com.apple.mobiletimer.OpenTab", {
"AppIntentDescriptor": "",
"tab": "stopwatch"
})
}
} else {
const Text2 = getMatchGroup(Matches, 4)
if Text2 == @NullText {
}
@Sixtieths = "0"
startTimer()
rawAction("com.apple.mobiletimer.OpenTab", {
"AppIntentDescriptor": "",
"tab": "timer"
})
}
Åbn i Cherri Playground
Dekompileret med cherri 2.3.0 (GPL-2.0). Kan kræve små rettelser, før den kan kompileres.
Bedømmelser og anmeldelser
Skriv en anmeldelse–
ud af 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Ingen anmeldelser endnu. Vær den første!
Annonce
Du vil måske også kunne lide
Annonce