I’ve written the script:
[b]tell application “Terminal”
do script “/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background &”
tell application “System Events”
set visible of first process whose name is “terminal” to false
to set my screensaver as the wallpaper. My problem is that if i close the terminal window the process terminates and i lose the screensaver as my wallpaper. I don’t like the terminal icon sitting in the dock. Is there a way to either run terminal without it showing up in the dock or a way to run the process without the terminal actually being open?
No need to script the Terminal. Applescript has the ‘do shell script’ command…
do shell script "/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background &"
You need to make one change to the script.
As written, AppleScript will wait for the process to terminate before exiting the script. Depending on how you launch this, it could mean you have to keep the script editor or your script applet open.
To fix it:
do shell script "/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background > /dev/null 2>&1 &"
The addition of ’ > /dev/null 2>&1’ suppresses command output, so AppleScript doesn’t hang around waiting for the process to finish.
great. i was about to post asking if there was a way to possibly do that, but you already answered the question