Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
Autor |
Nachricht |
Snow Administrator


Anmeldedatum: 21.11.2000 Beiträge: 1946 Wohnort: Deiningen
|
Verfasst am: 14.01.2005 - 04:41 Titel: iTunes - remote kontrollieren |
|
|
Dieses Skript ermöglicht es iTunes auf einem Netzwerk-Computer zu kontrollieren (Songauswahl "Vorheriger", "Zufall" oder "Nächster"). Die IP-Adresse des Zielcomputers, der Benutername und das Passwort müssen im Skript angepasst werden.
Code:
global u
set u to machine "eppc://USER:PASSWORT@192.0.1.2"
tell application "Finder" of u
using terms from application "Finder"
set tApps to name of every process whose visible is true
if tApps does not contain "iTunes" then
set Pfad to application file id "hook"
try
open Pfad
my PlayTunes()
on error errmsg
display dialog errmsg
end try
else
my PlayTunes()
end if
end using terms from
end tell
on PlayTunes()
set DLOG to (display dialog "Welcher Song soll als nächster abgespielt werden?" buttons {"Vorheriger", "Zufall", "Nächster"} default button 2 giving up after 45 with icon note)
if gave up of DLOG is true then
return
else if button returned of DLOG = "Vorheriger" then
tell application "iTunes" of u
using terms from application "iTunes"
previous track
end using terms from
end tell
else if button returned of DLOG = "Zufall" then
tell application "iTunes" of u
using terms from application "iTunes"
set theStatus to player state
if theStatus is playing then
try
set PL to current playlist
play some track of PL
on error
play some track of playlist 1
end try
else
play some track of playlist 1
end if
end using terms from
end tell
else
tell application "iTunes" of u
using terms from application "iTunes"
next track
end using terms from
end tell
end if
end PlayTunes
Anmerkung:
Unter OS 9 muss im Kontrollfeld "File Sharing" - Registerkarte "Start/Stop" der Punkt "Programmverbindungen ein" aktiviert sein. Auch sollte bei der kleinen Checkbox "Clients greifen auf Programmverbindungen per TCP/IP zu" ein Haken gesetzt sein.
Unter OS X:
Systemeinstellungen - Sharing - Entfernte AppleEvents
Und evtl. ein Haken bei "Events von OS 9 zulassen" _________________ Peter
-
Fischer-Bayern.de|Shadetreemicro.com |
|
Nach oben |
|
 |
|
|
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
Powered by phpBB © 2001, 2002 phpBB Group Deutsche Übersetzung von phpBB.de
|
|
|