[futurebasic] FB/AS application launch

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2005 : Group Archive : Group : All Groups

From: Bernie <fblist@...>
Date: Thu, 8 Sep 2005 20:31:56 +0100
I'm using an old laptop to play music through my stereo system and  
I've adapted RP's "MovingEyes" demo to display the current iTunes  
track in large text across the screen. Trouble is, if I quit iTunes  
while my app is running, iTunes is immediately launched again.

Here's the AS bit of my FB code which is called from a timer function:

'----------
route _toAppleScript
print "tell application ""System Events""
print "if exists process ""iTunes"" then"
print "tell application ""iTunes"""
print "set t to current track"
print "set message to t's name & ""\t"" & t's artist & ""\t"" & t's  
album"
print "end tell"
print "end if"
print "end tell"
route _toScreen
'----------

Any suggestions how I can prevent my app launching iTunes if it's not  
already running?

Bernie