1
2
3
4
5
6
7
8
9
10
11
12
13
14
tell application "System Events"
	set d to last item in desktops
	
	-- Standard Swatch Paths
	set whitepath to "/Library/Desktop Pictures/Solid Colors/Solid White.png"
	set blackpath to "/Library/Desktop Pictures/Solid Colors/Solid Black.png"
	
	-- Toggle
	if ((picture of d as string) = ("Esopus Spitzenburg:Library:Desktop Pictures:Solid Colors:Solid White.png" as string)) then
		set picture of d to POSIX file blackpath
	else
		set picture of d to POSIX file whitepath
	end if
end tell