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


Click here to return to the '10.4: Set desktop picture via Automator' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Set desktop picture via Automator
Authored by: dev_sleidy on Jul 26, '06 03:10:57AM

Or ...

Click on 'Automator' (under 'Library'), double click 'Run AppleScript' (under 'Action'), enter the following code ...

on run {input, parameters}
tell application "Finder" to if ((selection as string) is not "") then set desktop picture to file (selection as string)
return input
end run

... and save as 'Make Desktop Picture.workflow' in the '~/Library/Workflows/Applications/Finder/' folder. Create any needed folder(s).

Select a single graphic file, and via a right button click contextual menu - select the 'Automator, Make Desktop Picture' sub-menu item.

------

And / or, save ...

tell application "Finder" to if ((selection as string) is not "") then set desktop picture to file (selection as string)

... as 'Make Desktop Picture.scpt' and place into '~/Library/Scripts/' or '/Library/Scripts'.

Select a graphic file (in 'Finder') and via the 'Script Menu' or 'FastScripts' (or 'FastScripts Lite') select 'Make Desktop Picture'.

-----

And / or, save ...

on open tSelection
my handle_Selection((item 1 of tSelection))
end open

on run {}
tell application "Finder" to set tSelection to (choose file) as string
my handle_Selection(tSelection)
end run

on handle_Selection(local_Selection)
tell application "Finder" to if (((local_Selection) as string) is not "") then set desktop picture to file ((local_Selection) as string)
end handle_Selection

... as 'Make Desktop Picture.app' - an applet (save as an application).

Either drag a graphic file onto the applet (whether the applet is 'Finder' or 'Dock' based), or double click on the applet (if 'Finder' based) or once (if 'Dock' based) - and navigate to and select a graphic file.

-----

The codes listed above provide no error checking, etc; with room for improvement.



[ Reply to This | # ]