When I Connect to Wi-Fi
**************************
Works with Autocuts to automatically run a custom shortcut or display a notification when you connect to or disconnect from a particular network.
Adam Tow • tow.com
@atow • /u/adamtow
https://adamtow.github.io/wifi-triggers
Do not modify anything below this line.
Localization
Test defaults
Device Name
Inspect Shortcut Input and select the current function.
Display custom input
Being called in background via Autocuts.
✳️✳️✳️✳️◻️✳️✳️✳️
✳️◻️◻️✳️◻️✳️◻️✳️
✳️✳️✳️✳️◻️✳️✳️✳️
✳️◻️✳️◻️◻️✳️◻️◻️
✳️◻️◻️✳️◻️✳️◻️◻️
// Begin functions
⬛️⬛️⬛️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️⬛️◻️⬛️
⬛️⬛️⬛️◻️⬛️◻️⬛️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
Initialize.assets
****************
Creates the Assets variable.
// Initialize.assets
⬛️⬛️⬛️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️⬛️◻️⬛️
⬛️⬛️⬛️◻️⬛️◻️⬛️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
Application.main
*****************
Main menu.
Handle other menu types.
// Application.main
⬛️⬛️⬛️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️⬛️◻️⬛️
⬛️⬛️⬛️◻️⬛️◻️⬛️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
Autocuts.open
***************
Opens the Autocuts Admin shortcut.
// Autocuts.open
⬛️⬛️⬛️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️⬛️◻️⬛️
⬛️⬛️⬛️◻️⬛️◻️⬛️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
Help
*****
Displays the help page.
// Help
⬛️⬛️⬛️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️⬛️◻️⬛️
⬛️⬛️⬛️◻️⬛️◻️⬛️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
Quit
*****
Exits the shortcut.
// Quit
⬛️⬛️⬛️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️⬛️◻️⬛️
⬛️⬛️⬛️◻️⬛️◻️⬛️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
About
******
Displays the about page with version and build information.
// About
⬛️⬛️⬛️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️⬛️◻️⬛️
⬛️⬛️⬛️◻️⬛️◻️⬛️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
New
*****
Create a new Wi-Fi Trigger and send it to Autocuts Admin.
// New
⬛️⬛️⬛️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️⬛️◻️⬛️
⬛️⬛️⬛️◻️⬛️◻️⬛️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
Network.update
*****************
Updates the current network name to the log if it's different from the previous one. We keep track of individual logs per Wi-Fi Trigger, so we can manage multiple triggers at the same time.
Currently still connected.
// Network.update
⬛️⬛️⬛️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️⬛️◻️⬛️
⬛️⬛️⬛️◻️⬛️◻️⬛️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
Autocuts.test
**************
Let the user manually test the functionality of Wi-Fi Triggers.
// Autocuts.test
⬛️⬛️⬛️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️⬛️◻️⬛️
⬛️⬛️⬛️◻️⬛️◻️⬛️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
Autocuts.run
*************
Called when run by Autocuts.
Don't do anything if the dictionary doesn't exist.
Still on the same network, so do nothing.
Connects to a named network.
Fail: We are not connected to one of our known networks.
Pass: We are connected to one of our named networks.
Not connected to network test.
Pass because we are testing for not being connected tk a particular network.
Fail because we are testing for not being connected to a particular network which we are now on.
Don't do anything.
Perform the action.
Running a shortcut
// Autocuts.run
⬛️⬛️⬛️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️⬛️◻️⬛️
⬛️⬛️⬛️◻️⬛️◻️⬛️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
Autocuts.customInput
***********************
When called during an Autocut creation, create an input object that will control what happens when the user reconnects to a Wi-Fi network.
Type:
- When you connect to a Wi-Fi network
- When you leave a Wi-Fi network
Network Name
Action
Shortcut
Background - sets the activate parameter in the Autocut.
Notify
Beep or not?
Autocut name
Return back to Autocuts Admin with the text from the dictionary.
// Autocuts.customInput
⬛️⬛️⬛️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️⬛️◻️⬛️
⬛️⬛️⬛️◻️⬛️◻️⬛️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
⬛️◻️◻️◻️⬛️◻️◻️⬛️
Update
********
Checks for update via RoutineHub.co.
// Update
// End functions
The action below has been left intentionally blank.