Use AppleScript to Login

Sep 25, 2019



I clean history of browsers very often. This makes my self-hosted services tiresome to login every time. Another reason to do this is because I want to open these services based on my Wi-Fi SSID. For example, Jellyfin will use for home Wi-Fi, for outside Wi-Fi. If you don't have the need to login using different url, use Keychain or 1Password to autofill the login information as other websites.


Get Wi-Fi SSID#

Set url to open#


Gitea and Nextcloud puts the cursor in username textbox by default. This makes things easier than Jellyfin.

For Jellyfin, we have to locate the UI element and click it, then it will give us the login page.

For complete key code list, check here.


After combining those code snippets above, I create a keyword triggered workflow in Alfred. All you have to do is input the keyword "jellyfin", then everything runs automatically. Here is what it looks like.

Last Edited on Sep 25, 2019