• 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
Re: desktop picture
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: desktop picture


  • Subject: Re: desktop picture
  • From: Willem Perquin <email@hidden>
  • Date: Thu, 12 Jan 2006 19:22:18 +0100

UI scripting is handy for a whole bunch of stuff, Willem - but in this case, there's a rather easier and better way to achieve the same result:

.... and...

The 'random' settings don't affect the static desktop image.  All it does is tell Dock.app to draw a new image layer on top the static desktop picture.  This is why, after setting a desktop image with applescript, you won't see the image until you uncheck the 'Chang picture' option in system preferences. It would be interesting to learn how exactly System Preferences 

But I dont want to uncheck the 'Change picture'. I do not want one picture but want to select the folder 'abstract' in one script and 'nature' in the other script, with the 'change picture' selected.

I have a script now and it works. And as you can see, not very elegant so if there is a other way to do this, I am all ears.

tell application "System Events"
if UI elements enabled then
click menu item "Bureaublad en schermbeveiliging" of menu "Weergave" of menu bar 1 of process "System Preferences"
keystroke tab using {shift down} -- forward tab key
keystroke (ASCII character 30) -- up arrow key
keystroke (ASCII character 30) -- up arrow key
keystroke (ASCII character 30) -- up arrow key
keystroke (ASCII character 30) -- up arrow key
keystroke (ASCII character 30) -- up arrow key
keystroke (ASCII character 30) -- up arrow key
keystroke (ASCII character 30) -- up arrow key
--De bovenste is nu geselecteerd, nu naar beneden in de lijst. Natuur staat op de tweede plaats, abstract op 5, dus dan 4 keer kopieren
keystroke (ASCII character 31) -- down arrow key
keystroke (ASCII character 31) -- down arrow key
keystroke (ASCII character 31) -- down arrow key
keystroke (ASCII character 31) -- down arrow key
else
tell application "System Preferences"
set current pane to pane "com.apple.preference.universalaccess"
display dialog "UI element scripting is niet aan. Vink \"Activeer toegang voor hulpapparaten\" aan"
end tell
end if
end tell

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: desktop picture
      • From: kai <email@hidden>
  • Prev by Date: Mail.app: remove sound from a rule, and set color to black/white?
  • Next by Date: Re: Various Qs about Intel and AppleScript
  • Previous by thread: Re: desktop picture
  • Next by thread: Re: desktop picture
  • Index(es):
    • Date
    • Thread