Page 1 of 1

Set Finder Background Image ...

Posted: Sun Jul 01, 2012 9:59 am
by jamirokwai
Hi there,

you may set the background image of Finder to any jpg or png as you like using AppleScript.
I used the great CocoaScript from here: http://www.purebasic.fr/english/viewtop ... 19&t=40684

Code: Select all

Procedure SetBackgroundImage(image.s)
  a.s+"set p to " + Chr(34) + image + Chr(34) + #CRLF$
  a.s+"set a to POSIX file p" + #CRLF$
  a.s+"tell application "+Chr(34)+"Finder"+Chr(34)+#CRLF$
  a.s+"set desktop picture to a as alias"+#CRLF$
  a.s+"end tell"+#CRLF$
  COCOA_AppleScript(a.s)
EndProcedure

datei$ = OpenFileRequester(".",".",".jpg",0) 
SetBackgroundImage(datei$)

Re: Set Finder Background Image ...

Posted: Sun Jul 01, 2012 3:46 pm
by jesperbrannmark
Yey! Great. Nice to see someone else is using applescript (and working on my a.s string as the nomenclature.. )

Re: Set Finder Background Image ...

Posted: Sun Jul 01, 2012 5:00 pm
by jamirokwai
jesperbrannmark wrote:Yey! Great. Nice to see someone else is using applescript (and working on my a.s string as the nomenclature.. )
Hey Jesper,

thanks for the CocoaScript-Portion. I use it in many of my Apps :-)