Solved

screensaver to execute another program

Posted on 2004-08-08
8
347 Views
Last Modified: 2013-12-26
I am working with Mac OS X, I am new to macs and programing in general.  But i wanted to know if there was a way to have the standard mac screensaver call out to another program and execute it.  

Any help given would be great.

i have already written the apple script that will open iTunes and play a random track.
that is the program that i hope the screensaver can execute when it starts.

my ultimate goal is to have music playing during the mac standard screensaver.

thanks for any help

hawky86
0
Comment
Question by:hawky86
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 168 total points
ID: 11747407
0
 
LVL 4

Assisted Solution

by:Alex Curylo
Alex Curylo earned 166 total points
ID: 11757897
The best way to do this kind of thing is probably to write a little daemon (aka "background app") that does nothing but check the foreground process every minute or so with GetFrontProcess() and CopyProcessName(), documented here:

http://developer.apple.com/documentation/Carbon/Reference/Process_Manager/prmref_main/function_group_1.html

If the foreground process is "ScreenSaverEngine", then a screen saver is running. Then you could send AppleEvents directly to iTunes, or if you want more flexibility in what to do you could execute an AppleScript:

http://developer.apple.com/documentation/Carbon/Reference/Open_Scripti_Architecture/index.html

Put this app into your Startup Items, and you'll be golden.
0
 

Author Comment

by:hawky86
ID: 11759595
what language would that be in?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:hawky86
ID: 11759709
and is it possible to write it in perl... thats what i am most familiar with

hawky86
0
 
LVL 4

Expert Comment

by:Alex Curylo
ID: 11759727
Straight C would be the simplest, the APIs I suggest there are Carbon. I don't believe it's possible to call arbitrary Carbon calls from Perl.
0
 
LVL 84

Assisted Solution

by:ozo
ozo earned 166 total points
ID: 11760329
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question