KennFred Posted July 7, 2020 Share Posted July 7, 2020 I want to create a workflow to (i'm on a mac) open terminal, run a few commands, which I have, then turn wifi off and on, select my choice wifi network, open a new chrome browser window, wait for the login prompt to show up, click the "login" button. There may be some waiting inbetween steps. I'm pretty good with programming, but I'm hoping someone has something like this I can copy or work from to tweak to suit my needs. I've never done a workflow before, so before I start the learning curve, I hope someone has a workflow I can tweak. Anyone? Or perhaps some quick pointers before I go in? THankee!!! Link to comment
godbout Posted July 7, 2020 Share Posted July 7, 2020 sorry, just passing by. not sure if you're looking for the end result, or learning how to build workflows. if it's the end result, here you go: https://github.com/fnando/alfred-workflows the Spoof workflow might do what you're looking for. i use it personally to bypass time restrictions based on mac address. enjoy. Link to comment
deanishe Posted July 7, 2020 Share Posted July 7, 2020 2 hours ago, KennFred said: I want to create a workflow to (i'm on a mac) open terminal You probably don't want to open Terminal. It's a poor way to do any kind of automation because once you've sent the command to Terminal, you have no way of knowing what happened next. Your workflow won't wait for the command to complete; it will just continue as soon as it has handed the command to Terminal. Alfred's Run Terminal Command action is generally only useful for launching commands that have a UI. In most cases, you'll get better results using a normal Run Script action with Language = /bin/bash or /bin/zsh. 2 hours ago, KennFred said: turn wifi off and on, select my choice wifi network, open a new chrome browser window, wait for the login prompt to show up, click the "login" button. Do you want it to select a specific WiFi network, or show a list of available ones in Alfred? The Chrome scripting is possible, but a bit tricky. You'll have to use AppleScript/JXA to create the new window, and I believe there's also a command to tell it to wait until the page has loaded, but to click on the button, you'll probably have to inject some JavaScript into the page. There are other ways, but that's the most reliable. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now