Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Version with rotating desktops' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Version with rotating desktops
Authored by: Scarab on Oct 02, '03 11:08:37PM
The plist file gets updated even if the Finder doesn't so you can get the name of the image, but not the path.
The script could be as below which gets the path from the finder and the name from the plist.

#!/bin/sh

FILEPATH=`osascript -e 'tell application "Finder" to return POSIX path of (container of (desktop picture as alias) as alias)'`
FILEPATH=$FILEPATH`defaults read com.apple.Desktop | grep LastName | tail -1 | cut -f 2 -d "=" | cut -f 2 -d '"'`

/sw/bin/Esetroot -scale -center "$FILEPATH"
I added "s around $FILEPATH as the path and name arn't escaped, also the command assumes that the image name doesn't contain a "

[ Reply to This | # ]
Version with rotating desktops
Authored by: GaelicWizard on Oct 03, '03 03:37:30PM

Woohoo! I've been trying to figure out how to do this since I purchased the Digital Blasphemy CD! Thanx a whole bunch!

JP

---
Pell



[ Reply to This | # ]
Version with rotating desktops
Authored by: Apollo18Pnut on Oct 07, '03 01:11:31PM

Nope, that doesn't work. com.apple.Desktop does not keep track of what the currently-rotated-in background image is.



[ Reply to This | # ]