View Battery Cycle
SCRIPTING
If
Shortcut Input
does not have any value
SCRIPTING
Show
No "log-aggregated" file found. Go to Settings > Privacy > Analytics & Improvements > Analytics Data.
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SCRIPTING
If
Shortcut Input
does not contain
log-aggregated
SCRIPTING
Show
No "log-aggregated" file found. Go to Settings > Privacy > Analytics & Improvements > Analytics Data.
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
Set name of
Shortcut Input
to
Shortcut Input
.txt

Renamed Item
DOCUMENTS
Get text from
Renamed Item

Text
TEXT
Match
(?<=BatteryCycleCount<\/key>).*\n.*.\d+
in
Text

Matches
TEXT

Matches
TEXT
Match
(?<=MaximumCapacityPercent<\/key>).*\n.*.\d+
in
Text

Matches
TEXT

Matches
SCRIPTING
Get the
Device Model

Device Name
SCRIPTING
Show
Your
Device Model
battery is at
Matches
cycles and the battery is at
Matches
%
Showcuts