• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Picture not aways replaced
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Picture not aways replaced


  • Subject: Picture not aways replaced
  • From: Robert Poland <email@hidden>
  • Date: Sun, 05 Jan 2014 08:02:14 -0700

Hi,

Below is a piece of a script I use to change all desktop “Spaces” to the same picture.

The problem I’m running into is that if the current picture has the same name as the newer one (maybe it was modified), it is not replaced.

Any ideas?

— Script
tell application "System Events" to key code 18 using {control down} -- Desktop 1
delay 1
repeat (numSpaces) times
	tell application "System Events"
		tell current desktop
			set picture to ThePicture
			tell me to beep # Edited this way to get rid of non fatal error -1708
		end tell
		delay 1
		-- switch to the next desktop
		tell application "System Events" to key code 124 using {control down} -- ^→
		delay 1
	end tell -- application "System Events"
end repeat
beep 2
tell application "System Events" to key code 18 using {control down} -- Desktop 1
— end of Script

TIA,

Robert Poland - Fort Collins, CO




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


  • Follow-Ups:
    • Re: Picture not aways replaced
      • From: "koenig.yvan" <email@hidden>
    • Re: Picture not aways replaced
      • From: Robert Poland <email@hidden>
    • Re: Picture not aways replaced
      • From: Neil Laubenthal <email@hidden>
  • Prev by Date: MorningStartUp script
  • Next by Date: Re: tell Word to open an old file
  • Previous by thread: Re: MorningStartUp script
  • Next by thread: Re: Picture not aways replaced
  • Index(es):
    • Date
    • Thread