The Music Player is a shortcut that can Play/Pause any running songs on “iPhone”, for the full effects of this shortcut assign it to “AssistiveTouch” by going into the “Settings” App and tapping “Accessibility”, then “Touch”, then “AssistiveTouch” and then scroll down to double touch and turn “AssistiveTouch” On.
Что нового
Версия 2.0
Just additional actions, also don’t forget to change the name of the focus in the “If name” statement
Что делает
Действий: 22-
Get Current Focus
-
Get Name
-
If
-
Play/Pause
-
If
-
If
-
Play/Pause
-
Go to Home Screen
-
Lock Screen
-
Set Volume
-
If
-
Play/Pause
-
If
-
Text
-
Set VariableMusicPlayer
-
Get Valuedk.simonbs.DataJar
-
Calculate
-
Set Valuedk.simonbs.DataJar
-
If
-
Text
-
Set Valuedk.simonbs.DataJar
-
Run ShortcutMinutes in a song
Посмотреть как код
Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.
#define mac false
#include 'actions/settings'
#define color red
#define glyph livePlay
const CurrentFocus = getFocusMode()
const Name = getName(CurrentFocus)
if Name == "Ultra Low Power Mode " {
play()
} else {
if Name == "Lockdown 🔒" {
play()
returnToHomescreen()
lockScreen()
setVolume(0)
} else {
togglePlayPause()
if Name == "Airpods" {
@MusicPlayer = "0"
rawAction("dk.simonbs.DataJar.GetValueIntent", {
"keyPath": "MusicPlayer"
})
const CalculationResult = Value + 1
rawAction("dk.simonbs.DataJar.SetValueIntent", {
"keyPath": "MusicPlayer",
"values": "CalculationResult"
})
if CalculationResult >= 5 {
const Text = "0"
rawAction("dk.simonbs.DataJar.SetValueIntent", {
"keyPath": "MusicPlayer",
"values": "Text"
})
run("Minutes in a song", Text)
}
}
}
}
Открыть в Cherri Playground
Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.
Оценки и отзывы
Написать отзыв–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Пока нет отзывов. Поделись мнением первым!
Реклама
Ещё от celebrity
Вам также может понравиться
Реклама