Accepts
App Store Apps, Articles, Contacts, Dates, Email Addresses, WFFolderContentItem, Files, Images, iTunes Products, Locations, Map Links, Media, PDFs, Phone Numbers, Rich Text, Safari Web Pages, Text and URLs
COMMENT
PowerUtil has been built with ❤️ by iTech Everything.
You can support the creator on the following platforms:
youtube.com/TheiTE
twitter.com/TheOriginaliTE
For more information and other shortcuts like this, visit itecheverything.com/shortcuts
DICTIONARY

Dictionary
SCRIPTING
Get the
System Version

Device Name
MATHS
Round
System Version
to
Ones Place

Rounded Number
SCRIPTING
Get the
Device Model

Device Name
SCRIPTING
If
Device Model
contains
Vision
NUMBER
1

Number
VARIABLES
Set variable
isVision
to
True
SCRIPTING
Otherwise
DICTIONARY

Dictionary
SCRIPTING
Get
Value
for
Rounded Number
in
Dictionary

Dictionary Value
SCRIPTING
End If

If Result
SCRIPTING
If
Shortcut Input
has any value
SCRIPTING
If
Shortcut Input
contains
log-aggregated
TEXT
log-aggregated

Text
SCRIPTING
Otherwise
SCRIPTING
If
Shortcut Input
contains
Analytics
TEXT
Analytics

Text
SCRIPTING
Otherwise
MISSING
output Under Construction
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
VARIABLES
Set variable
fileName
to
If Result
SCRIPTING
Otherwise
SCRIPTING
If
Device Model
is
Mac
MISSING
output Under Construction
SCRIPTING
End If

If Result
SCRIPTING
If
isVision
is
<value>
SAFARI
Open
prefs:root=Privacy&path=PROBLEM_REPORTING
TEXT
Please click "Analytics Data" on your screen. -> Click or search for any one the
Required File
file(s). -> Click Share on the top right -> Click PowerUtil
If you have "Share
VAR
Analytics" disabled or have the
Required File
file missing, you will need to enable them and wait for at least 24 hours.

Text
SCRIPTING
Otherwise
SCRIPTING
If
Rounded Number
is greater than or equal to
15
SAFARI
Open
prefs:root=Privacy&path=PROBLEM_REPORTING
TEXT
Please click "Analytics Data" on your screen. -> Click or search for any one the
Required File
file(s). -> Click Share on the top right -> Click PowerUtil
If you have "Share
VAR
Analytics" disabled or have the
Required File
file missing, you will need to enable them and wait for at least 24 hours.

Text
SCRIPTING
Otherwise
SCRIPTING
Open
com.apple.Preferences
TEXT
Please go to Privacy -> Analytics & Improvements and click "Analytics Data" on your screen. -> Click or search for any one the
Required File
file(s). -> Click Share on the top right -> Click PowerUtil
If you have "Share
VAR
Analytics" disabled or have the
Required File
file missing, you will need to enable them and wait for at least 24 hours.

Text
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
Choose from Menu

Menu Result
SCRIPTING
Watch Tutorial

Menu Result
SAFARI
Show web page at
https://youtu.be/uQ_0l5pi7ro
SCRIPTING
Dismiss

Menu Result
SCRIPTING
End Menu

Menu Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

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

Renamed Item
DOCUMENTS
Get text from
Renamed Item

Text
TEXT
Match
"last_value_AlgoChemID":[^\n]*\n
in
Log-Aggregated

Matches
SCRIPTING
If
Analytics
has any value
TEXT
Split
Analytics
by
New Lines

Split Text
SCRIPTING
Get
Last Item
from
Split Text

Item from List
TEXT
Split
Item from List
by
Custom
}

Split Text
SCRIPTING
Get
First Item
from
Split Text

Item from List
TEXT
{
Item from List
}

Text
SCRIPTING
Otherwise
DOCUMENTS
Get text from
Renamed Item

Text
SCRIPTING
End If

If Result
VARIABLES
Set variable
AnalyticsFile
to
If Result
DICTIONARY

Dictionary
SCRIPTING
If
Dictionary
contains
Rounded Number
SCRIPTING
Get
Value
for
Rounded Number
in
Dictionary

Dictionary Value
SCRIPTING
Otherwise
TEXT
NominalChargeCapacity

Text
SCRIPTING
End If

If Result
DICTIONARY

Dictionary
VARIABLES
Set variable
Analytics
to
Dictionary
DICTIONARY

Dictionary
SCRIPTING
Get
Value
for
fileName
in
Dictionary

Dictionary Value
SCRIPTING
Get dictionary from
Corresponding Dictionary

Dictionary
SCRIPTING
Get
All Keys
in
Dictionary

Dictionary Value
SCRIPTING
Repeat with each item in
Dictionary Value

Repeat Results
SCRIPTING
Get
Value
for
Repeat Item
in
Corresponding Dictionary

Dictionary Value
SCRIPTING
If
fileName
is
Analytics
SCRIPTING
Get
Value
for
Required Key
in
AnalyticsFile

Dictionary Value
SCRIPTING
Get numbers from
Dictionary Value

Numbers
SCRIPTING
Get
First Item
from
Numbers

Item from List
SCRIPTING
Otherwise
TEXT
Match
(?<=
Required Key
<\/key>).*\n.*.\d+
in
AnalyticsFile

Matches
TEXT

Matches
SCRIPTING
End If

If Result
SCRIPTING
Get
First Item
from
If Result

Item from List
SCRIPTING
If
Item from List
has any value
SCRIPTING
Set
Repeat Item
to
Item from List
in
Dictionary

Dictionary
VARIABLES
Set variable
Analytics
to
Dictionary
SCRIPTING
End If

If Result
SCRIPTING
End Repeat

Repeat Results
VARIABLES
Set variable
maximumCapacity
to
Analytics
VARIABLES
Set variable
averageTemperature
to
Analytics
VARIABLES
Set variable
cycleCount
to
Analytics
VARIABLES
Set variable
AvailableMax
to
Analytics
VARIABLES
Set variable
OriginalMax
to
Analytics
SCRIPTING
If
OriginalMax
is not
0
MISSING
calculateexpression Under Construction
MATHS
Format
Calculation Result
to
2 decimal places

Formatted Number
SCRIPTING
If
Formatted Number
is greater than
100
NUMBER
100

Number
SCRIPTING
End If

If Result
VARIABLES
Set variable
PowerUtilCalculatedBatteryHealth
to
If Result
TEXT
<spacer type="block" width="50" />
<h4>PowerUtil Calculated Battery Health</h4>
<p2>
PowerUtilCalculatedBatteryHealth
%<p2>
<p>This is a measure of your current battery capacity compared to the battery capacity (in mAh) that Apple lists on their website.</p>

Text