Jump to content

How to create a Safari Develop menu workflow


Recommended Posts

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

Link to comment

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 by vitor
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...