Solved

screensaver to execute another program

Posted on 2004-08-08
8
343 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 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