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


Click here to return to the 'Use an AppleScript to force a desktop picture change' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use an AppleScript to force a desktop picture change
Authored by: stauf on Jun 11, '08 05:03:37PM
To switch all your desktops, and doesn't require you to edit the script at all for interval, I used a repeat loop instead of just 'tell every desktop' in case the intervals are different per screen:
property theSwitch : 0

tell application "System Events"
	set desktopnames to get display name of every desktop
end tell

if theSwitch = 0 then
	tell application "System Events"
		repeat with currentdesktop in desktopnames
			tell (every desktop whose display name is currentdesktop)
				set initInterval to get change interval
				set change interval to initInterval + 1
			end tell
		end repeat
	end tell
	set theSwitch to 1
	
else
	tell application "System Events"
		repeat with currentdesktop in desktopnames
			tell (every desktop whose display name is currentdesktop)
				set initInterval to get change interval
				set change interval to initInterval - 1
			end tell
		end repeat
	end tell
	set theSwitch to 0
end if


[ Reply to This | # ]