[futurebasic] Re: [FB] AppleScript remote control

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2006 : Group Archive : Group : All Groups

From: Bernie <fb.list@...>
Date: Tue, 16 May 2006 07:51:07 +0100
Alain wrote:

> Bernie a écrit :
>>
>> '----------
>> local mode
>> local fn NextBtn
>> '~'1
>> dim as str255  message
>> dim as handle  resultH
>> dim as OSErr   err
>> route _toAppleScript
>> print "tell application ""iTunes"" of machine ""eppc://Bernies- 
>> Mac-2.local"""
>> print "next track"
>> print "end tell"
>> route _toScreen
>> err = usr AppleScriptRun( message )
>> resultH = usr AppleScriptGetResult
>> if ( resultH ) then DisposeHandle( resultH )
>> end fn
>> '----------
>
> Bernie,
>
> the line:
>
> print "next track"
>
> should probably be:
>
> print "play (next track)"
>


Thanks for pointing that out Alain. I changed it from "play (next  
track)" to "next track" to make it work as the iTunes button (>>).  
Both versions work when controlling a local Mac. Things stop working  
when I add

of machine ""eppc://Bernies-Mac-2.local"""

to the tell application line in FB.

All variations run fine from ScriptEditor.


Bernie