Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Desktop Pictures don't rotate while screensaver is running

Ok... so I've been waiting, watching, and searching for a transparent screensaver that could work in Leopard for nearly 3 years. Well, I finally found one! The screensaver is called MBS Transparent Screensaver. Finally I'd get to see my wonderful desktop pictures and watch my email while the screen is locked!

Well, after finally getting this functionality, I've been disappointed by the realization that the desktop pictures do not rotate automatically while a screensaver is running.

Is there any way to force the desktop pictures to rotate as they do when the screensaver is not running? Possibly an undocumented setting somewhere? Or, is there any UNIX command that can cause the desktop to refresh to the next image in the rotation?

Any ideas or help would be appreciated.

24" iMac 2.8 C2E / 1TB / 4GB, Mac OS X (10.5.8)

Posted on Aug 11, 2009 9:31 PM

Reply
21 replies

Aug 12, 2009 7:06 PM in response to G J Piper

sorry, I'm confused. do you want to use the same picture for both desktops at all times? my script does not assume that and in fact you can have different folders for different desktops. that's what I usually do when I work with two monitors. but you can alter the script to use the same pic for all monitors at all times too. I'm just not sure if that's what you want.

P.S. I use a special formatter that someone gave me for posting. you can simply enclose your code in brackets like this

your code


the posted result will look like this


your code

Aug 12, 2009 7:25 PM in response to V.K.

Ah... brackets... ok. 🙂

No, my code and your code uses whatever folders are selected in the System Preferences. I have two folders of images — a "left" folder and a "right" folder... each have the same exact number of images in them, and are named alphabetically so that the left and right images on my monitors are always the correct "left" and "right" image. The code just needs to get the number of the image in sequence it will use, then use that number in each folder.

So, your code checks the number of pictures in the first folder, then adds "1" to that number and picks the next image in that folder, then displays it. Then your code does the same thing for the second monitor. Each number is based on whatever picture was a desktop at the time the script was run, so if your code gets 'out of sync' it stays that way and the left and right images aren't correct.

My code checks the first folder and gets the picture number, then used that number to pick the image from both folders, instead of recalculating the image number twice -- once for every desktop. That way, since I have an equal number of images in each folder, it will always pick the matching "right" image that goes with the calculated "left" image.

My images are custom cropped for my left monitor and my right monitor, and the "lefts" are the left half of the "rights" images... making rotating and spanning desktops.

Here is your first code, which I modified, which works and keeps the right and left images synced. (even if one image gets set wrong by accident -- via "set as desktop" commands in iPhoto or such) If you can improve this while keeping the self-correcting syncing, by all means... 🙂

{code}
tell application "System Events"

tell desktop 1
set curpicA to picture
end tell

tell desktop 2
set curpicB to picture
end tell

tell application "Finder"
select window of desktop
set i to index of file curpicA
set curfolderA to container of file curpicA
set curfolderB to container of file curpicB
if i < (number of files in curfolderA) then
set i to i + 1
else
set i to 1
end if
set newpicA to item i of curfolderA as alias
set newpicB to item i of curfolderB as alias
end tell

tell desktop 1
set pictures folder to curfolderA as alias
set picture rotation to 0
set picture to newpicA
end tell

tell desktop 2
set pictures folder to curfolderB as alias
set picture rotation to 0
set picture to newpicB
end tell

quit
end tell
{/code}

Aug 12, 2009 8:07 PM in response to G J Piper

ah, got you. that was a very specific way to change pictures and I didn't understand what you wanted at first. for formatting don't use the forwards slash in the second code bracket. to see what it should look like unformatted click on the reply button next to this post and then the quote button to see the unformatted text

tell application "System Events"
tell desktop 1
set curpicA to picture
end tell
tell desktop 2
set curpicB to picture
end tell
tell application "Finder"
set i to index of file curpicA
set curfolderA to container of file curpicA
set curfolderB to container of file curpicB
if i < (number of files in curfolderA) then
set i to i + 1
else
set i to 1
end if
set newpicA to item i of curfolderA as alias
set newpicB to item i of curfolderB as alias
end tell
tell desktop 1
set pictures folder to curfolderA as alias
set picture rotation to 0
set picture to newpicA
end tell
tell desktop 2
set pictures folder to curfolderB as alias
set picture rotation to 0
set picture to newpicB
end tell
quit
end tell


i removed one line about selecting desktop. it's not needed.

Message was edited by: V.K.

Message was edited by: V.K.

Desktop Pictures don't rotate while screensaver is running

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.