RodgerWW Posted December 17, 2014 Share Posted December 17, 2014 I agree ... but need to figure out: 1: How to get the path of the rotation image; to 'reveal' the image in Finder 2: Show the full name of the image WITH extension; to make it worth sending to Google Images as a search. Link to comment
jdfwarrior Posted December 18, 2014 Share Posted December 18, 2014 Wow.. this seems to have gotten way down a rabbit hole since last night haha Link to comment
dfay Posted December 18, 2014 Share Posted December 18, 2014 Seriously....I was going to chime in and suggest using System Events but I would never have known about the sqlite database. Link to comment
RodgerWW Posted December 19, 2014 Share Posted December 19, 2014 OK, I've made some headway! Make a new Workflow from Templates - Essentials - Keyword to script Fill in the details however you want and click Create Double click on the Keyword box Use whatever keyword you want In the dropdown, select No Argument For now put "Reveal Desktop Wallpaper" in the Title Field Click Save Double click on the Run Script box In the Language dropdown, select "/usr/bin/osascript" In the Script area paste the following: tell application "System Events" set posix_path to (pictures folder of current desktop) set picPath to (POSIX file posix_path) as string end tell tell application "System Events" tell current desktop if picture rotation = 0 then tell application "System Events" set posix_path to (picture of current desktop) set thePicture to (POSIX file posix_path) as string end tell tell application "Finder" reveal thePicture activate end tell else set thePictures to (do shell script "sqlite3 ~/Library/Application\\ Support/Dock/desktoppicture.db \"SELECT * FROM data\" | sed -n '$p'") set fullPath to picPath as string set rotationImage to fullPath & thePictures tell application "Finder" reveal rotationImage activate end tell end if end tell end tell Click Save Now, when you type your keyword and hit ENTER a Finder window should pop up with the currently displayed wallpaper selected Link to comment
sr_navarre Posted December 19, 2014 Author Share Posted December 19, 2014 It works! Thanks for all the help! 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