Einfaches Post-Song Script für Icy Juice <> iTunes ?

A

Augustiner

Aktives Mitglied
Thread Starter
Dabei seit
25.10.2004
Beiträge
143
Reaktionspunkte
0
Hallo Leute,
hat jemand vielleicht eine Ahnung, wie ich ein einfaches Script schreiben kann, dass auf Knopfdruck Artist, Titel, Dauer und Rate ins aktive Nachrichtenfenster posted und dann abschickt ?

Hab sowas schon für mein IRC-Clienten, aber möchte es auch für mein Icy Juice nützen:

Code:
-- this script will announce the currently playing song
property autoannounce : 0
property counter : 0
property refreshrate : 5
property theartist : ""
property theartist2 : ""
property thetitle : ""
property thetitle2 : ""

on run {}
	tell application "iTunes"
		set thetitle to (name of current track)
		set theartist to (artist of current track)
		set thebitrate to (bit rate of current track)
		set thetime to (time of current track)
	end tell
	tell application "Snak"
		if theartist is not equal to "" then
			type "[iTunes] " & theartist & " - " & thetitle & " [" & thetime & " @ " & thebitrate & "kbs" & "]"
		else
			type "[iTunes] " & thetitle & " // " & thetime & " @ " & thebitrate & "kbs" & ""
		end if
	end tell
end run

Gruß
 
...

Hallo Augustiner,

so wie ich das sehe ist Icy Juice nicht skriptfähig. Bleibt als nur der Umweg über das UI-Scripting. Statt "Snak" "System Events" und statt "type" "keystroke". Zum automatischen Absenden noch ein keystroke return nach den Zeilen für die Eingabe. Eventuell musst Du in Systemeinstellungen->Bedienungshilfen->Zugriff auf Hilfsgeräte aktivieren anhaken.

Gruß Andi
 
ok, ich habe kein einziges Wort verstanden :confused:
 
...

Hallo Augustiner,

Code:
-- this script will announce the currently playing song
property autoannounce : 0
property counter : 0
property refreshrate : 5
property theartist : ""
property theartist2 : ""
property thetitle : ""
property thetitle2 : ""
on run {}
tell application "iTunes"
set thetitle to (name of current track)
set theartist to (artist of current track)
set thebitrate to (bit rate of current track)
set thetime to (time of current track)
end tell
tell application "System Events"
if theartist is not equal to "" then
keystroke "[iTunes] " & theartist & " - " & thetitle & " [" & thetime & " @ " & thebitrate & "kbs" & "]" & return
else
keystroke "[iTunes] " & thetitle & " // " & thetime & " @ " & thebitrate & "kbs" & "" & return
end if
end tell
end run

Versuch es mal so. Das mit dem Haken in Systemeinstellungen->Bedienungshilfen hast Du verstanden?

Gruß Andi
 
Zurück
Oben Unten