Shortcuts Scripting
I feel I’m such a cave dweller.
(Just started off using BOTH Siri and Apple’s Shortcuts two days ago (10/21/2022–10/22/2022)).
Below are the scripts originally designed by me.
And please don’t mind if the script below is in Chinese because I’m from Hong Kong and I also use those scripts for myself.
Initialization
Before we can use the scripts in the section below, we need to create the .json script to store the device’s status.
初始設定: Dependent script for initialization which will run all the functions below.
創建腳本文件(.json): Creates a script file named status.json.
設定屏幕(副): Gets monitor (OFF: 0, ON: 1) status from user input.
設定電燈(副): Gets light status (OFF: 0, ON: 1) from user input.
Reset the Device Status for the Monitor
Since the SwitchBot is in Press Mode, you might either press the monitor power button manually and messed up the sequence or entered the wrong value during initialization.
重設屏幕數值(開): Reset the device status for the monitor to ON.
重設屏幕數值(閂): Reset the device status for the monitor to OFF.
Monitor Switch (Press Mode)
開屏幕: Turn ON the monitor.
閂屏幕: Turn OFF the monitor.
Light Switch (ON/OFF Mode)
開燈: Turn ON the light.
閂燈: Turn OFF the light.
Other Words:
I also wrote some other scripts that depend on the scripts above, but their functions are only to run them all at once and to cover multiple ways of word phasing.
I will write about how the scripts work line-by-line soon.
Feel free to use my scripts and modify your OWN COPY. Do not redistribute IF IT IS WITHOUT CREDIT.
Inspirations: https://www.reddit.com/r/shortcuts/comments/jy3gkd/toggle_between_two_shortcuts/
Be First to Comment