lucasoldaini Posted November 2, 2013 Posted November 2, 2013 (edited) Hi everybody! Mavericks broke the previous workflow I was using to quickly change resolution on my retina MacBook Pro (15", doesn't work on 13"). I thought that you might enjoy the new one I wrote! Usage: 'res b' or ⌘⌥^B for 1440*900 (think 'b' as in 'best for retina')'res h' or ⌘⌥^H for 1680*1050 (think 'h' as in 'hi-res display', like the old 1680*1050 MBP Hi-Res display)'res f' or ⌘⌥^F for 1920*1200 (think 'f' as in 'full-hd') Download link: https://dl.dropboxusercontent.com/u/34729/Change%20Resolution.alfredworkflow Happy weekend Edited November 6, 2013 by Luca Soldaini
dschargel Posted November 3, 2013 Posted November 3, 2013 I am sorry to say that this is not working for me on a new MacBook Pro 13" Late 2013 with OS X Mavericks. Console shows: 11/2/13 11:17:54.393 PM Alfred 2[19631]: [ERROR] AppleScript Error: { NSAppleScriptErrorAppName = "System Events"; NSAppleScriptErrorBriefMessage = "Can\U2019t get radio group 1 of group 1 of tab group 1 of window \"Built-in Retina Display\" of process \"System Preferences\". Invalid index."; NSAppleScriptErrorMessage = "System Events got an error: Can\U2019t get radio group 1 of group 1 of tab group 1 of window \"Built-in Retina Display\" of process \"System Preferences\". Invalid index."; NSAppleScriptErrorNumber = "-1719"; NSAppleScriptErrorRange = "NSRange: {593, 71}"; } - David
lucasoldaini Posted November 3, 2013 Author Posted November 3, 2013 I am sorry to say that this is not working for me on a new MacBook Pro 13" Late 2013 with OS X Mavericks. Console shows: 11/2/13 11:17:54.393 PM Alfred 2[19631]: [ERROR] AppleScript Error: { NSAppleScriptErrorAppName = "System Events"; NSAppleScriptErrorBriefMessage = "Can\U2019t get radio group 1 of group 1 of tab group 1 of window \"Built-in Retina Display\" of process \"System Preferences\". Invalid index."; NSAppleScriptErrorMessage = "System Events got an error: Can\U2019t get radio group 1 of group 1 of tab group 1 of window \"Built-in Retina Display\" of process \"System Preferences\". Invalid index."; NSAppleScriptErrorNumber = "-1719"; NSAppleScriptErrorRange = "NSRange: {593, 71}"; } - David David, can you share a screenshot of your display tab in system preferences? I fear it might be different that the one on the 15". Luca
theinterned Posted November 5, 2013 Posted November 5, 2013 (edited) David, can you share a screenshot of your display tab in system preferences? I fear it might be different that the one on the 15". Luca I've got a Retina MBP and I've got the same error with the script. I edited the script to change the radio buttons to 2, 3 and 4 for b, f and h. I also tried hacking around with the radio group number etc. But I guess i don't really know how to figure out what the correct group is. Here's what my Display Prefs look like: https://www.dropbox.com/s/u569odzu4dd3edz/Screenshot%202013-11-05%2011.07.05.png Edited November 5, 2013 by theinterned
lucasoldaini Posted November 6, 2013 Author Posted November 6, 2013 ops, it looks like that the preference panel for the 13" display is structured differently (less UI elements with a different hierarchy, I guess) not having a 13" myself, it's kinda hard for me to fix it. The best thing I can do is suggest you to download Accessibility Inspector (it comes with Xcode, see here https://developer.apple.com/library/mac/documentation/Accessibility/Conceptual/AccessibilityMacOSX/OSXAXTesting/OSXAXTestingApps.html for description on how to use it) to figure out the hierarchy of the UI.
politicus Posted November 20, 2013 Posted November 20, 2013 What do you recommend for non retina MBP 15" with Mountain Lion users (in other words tried to find your old workflow but didn't find it)? Thank you.
lucasoldaini Posted November 20, 2013 Author Posted November 20, 2013 What do you recommend for non retina MBP 15" with Mountain Lion users (in other words tried to find your old workflow but didn't find it)? Thank you. http://www.alfredforum.com/topic/1296-switch-retina-resolution/
Efty.Edge Posted November 23, 2013 Posted November 23, 2013 Hi Luca, it seems to be a nice workflow... But unfortunately i'm german, so it doesn't work on my MBPR with Mavericks in your Version. So i tried to do some litte fixes and translated some english menu names into german. on alfred_script(q) tell application "System Preferences" reveal anchor "displaysDisplayTab" of pane "com.apple.preference.displays" end tell tell application "System Events" to tell process "System Preferences" to tell window "Integriertes Retina-Display" click radio button "Monitor" of tab group 1 click radio button "Skaliert“ of radio group 1 of tab group 1 if (q is "f" or q is "F") then click radio button 5 of radio group 1 of group 1 of tab group 1 else if (q is "b" or q is "B") then click radio button 3 of radio group 1 of group 1 of tab group 1 else if (q is "h" or q is "H") then click radio button 4 of radio group 1 of group 1 of tab group 1 else return "No matching resolution!" end if end tell quit application "System Preferences" end alfred_script My MBPR doesn't switch either... Can you please give me an advice!? Thanx in advance Efty
dschargel Posted December 4, 2013 Posted December 4, 2013 Caio Luca, Sorry for the delay in getting Xcode installed to get you this image that you may be able to get the Workflow working. I cannot make sense of the UI elements and hierarchy and how it works in your code. Hopefully you can help! https://www.dropbox.com/s/soypabzj3yg16ep/ScaledResolutionsRMBP13Late2013.jpg Thanks, David
davosian Posted December 8, 2013 Posted December 8, 2013 (edited) I have modified the workflow for 13" MBP Laptops: http://www.alfredforum.com/topic/3584-resolution-switcher-rmbp-13/ Edited December 8, 2013 by davosian
lucasoldaini Posted December 8, 2013 Author Posted December 8, 2013 I have modified to workflow for 13" MBP Laptops: http://www.alfredforum.com/topic/3584-resolution-switcher-rmbp-13/ davosan, thank you very much. I haven't had time lately to work on it!
davosian Posted December 8, 2013 Posted December 8, 2013 davosan, thank you very much. I haven't had time lately to work on it! Teamwork
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