mac98aop Posted April 17, 2017 Posted April 17, 2017 Hi everyone I'm a longtime Alfred PPack user, but never really taken the time I should have done to make the most of Workflows. I use the 'Open in Chrome...' workflow when I stumble across a page with Flash in Safari, but now realise I could reload the page for iOS from the Safari> Develop menu. Is it possible I can write a Workflow to do this? Thanks so much Adam
vitor Posted April 17, 2017 Posted April 17, 2017 (edited) It is possible, though it requires some GUI scripting. There you go. Code used: tell application "Safari" to activate tell application "System Events" to tell process "Safari" to click menu item "Safari — iOS 10 — iPad" of menu "User Agent" of menu item "User Agent" of menu "Develop" of menu bar item "Develop" of menu bar 1 tell application "Safari" to activate tell application "System Events" to tell process "Safari" to click menu item "Default (Automatically Chosen)" of menu "User Agent" of menu item "User Agent" of menu "Develop" of menu bar item "Develop" of menu bar 1 This a simple workflow but might be useful to other people. I might publish it officially at a later time, with support for more User Agents. Edited April 18, 2017 by vitor
mac98aop Posted April 18, 2017 Author Posted April 18, 2017 Thank you SO much. Will give it a whirl! AP
mac98aop Posted April 18, 2017 Author Posted April 18, 2017 It works superbly... and even given me a sneaky insight into some basic scripting of such things! Thanks so much. vitor 1
vitor Posted April 19, 2017 Posted April 19, 2017 I’ve ended up making this a full-fledged Workflow, with support for all user agents.
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