Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > scripting question

scripting question
Thread Tools
Fresh-Faced Recruit
Join Date: Apr 2002
Status: Offline
Reply With Quote
Apr 4, 2002, 03:37 PM
 
I know this is probalby a very simple question, but how do you automate the desktop image using applescript in OSX ....

In OS 9, i have a script that tells the appearance to set the image of a monitor to whatever file I want automatically. In osX, however, I can't use appearance, and I can't find any support to tell me how to do it, not to mention that Apple Tech support doesn't know the first thing about applescript.

Any help would be appreciated.

Kris.
     
Junior Member
Join Date: Apr 2001
Location: Petersfield, UK
Status: Offline
Reply With Quote
Apr 6, 2002, 02:32 AM
 
Using information in the Finder scripting dictionary, this seems to work:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
tell application <font color = red>"Finder"</font>
set desktop picture to <font color = red>"Cube HD:Users:jb8748 esktop:<font color = blue>8.</font>jpg"</font>
end tell
</font>[/code]

Is that what you wanted?

James
     
K-mac  (op)
Fresh-Faced Recruit
Join Date: Apr 2002
Status: Offline
Reply With Quote
Apr 9, 2002, 08:45 AM
 
yes, I believe that that's exactly what I need. I'l try it out right away. It sounds like it should display a little faster as well, since it's bypassing the "appearance" app and going directly through the finder.

Thanks.
Kris.
     
K-mac  (op)
Fresh-Faced Recruit
Join Date: Apr 2002
Status: Offline
Reply With Quote
Apr 10, 2002, 10:01 AM
 
That did work, except now I'm having one more problem.... I can't figure out how to tell the finder to set the desktop picture of the second monitor. I thought that, like os9, I could say

Set the desktop picture of monitor 2 to "picture.psd"

unfortunately, when I tried that, it says that I can't put a number after 'monitor'

anyway, It's actually very important that I figure this out, so I hope that someone is able to help me. I couldn't find anything in the finder dictionary. Maybe someone could at least point me in the right direction.

Thank you,
Kris
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Apr 10, 2002, 11:20 PM
 
setting desktop pictures for multiple monitors currently isn't scriptable.

I think it might be possible to write settings to the com.apple.desktop defaults domain and then post a certain CFNotification to get the Finder to re-configure itself from the new settings. But you certainly can't do that from applescript.
Rick Roe
icons.cx | weblog
     
K-mac  (op)
Fresh-Faced Recruit
Join Date: Apr 2002
Status: Offline
Reply With Quote
Apr 11, 2002, 08:53 AM
 
Thank you. I kind of figured that that might be the case.... hmmm....
Perhaps I can script Quicktime Player to display images full screen on the auxillary monitor. It would probably run a little slower than going straight through the finder but it should work, no?

I really don't have time to learn a programming language, and I don't want to pay for someone to write this for me, although I may end up having to anyway.

Alternatively, is there an easy way to get rid of the menu bar on the top of OSX, and to set the display dialog window to appear on another monitor?

-kris
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:33 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2