• Apfeltalk ändert einen Teil seiner Allgemeinen Geschäftsbedingungen (AGB), das Löschen von Useraccounts betreffend.
    Näheres könnt Ihr hier nachlesen: AGB-Änderung
  • Die Bildungsoffensive hier im Forum geht weiter! Jetzt sollen Kreativität und technische Möglichkeiten einen neue Dimension erreichen. Das Thema in diesem Monat lautet - Verkehrte Welt - Hier geht es lang --> Klick

Wecker problem

  • Ersteller Ersteller Mitglied 26876
  • Erstellt am Erstellt am

Mitglied 26876

Gast
Ja also viele werden den Wecker ja nutzen also das Script:
Code:
on aufwachen(personal_playlist)
	tell application "iTunes"
		set sound volume to 0
		
		if personal_playlist is not 0 then
			play playlist personal_playlist
		else
			play
		end if
		
		set u to sound volume
		repeat while u < 100
			set u to u + 1
			delay 0.1
			set sound volume to u
		end repeat
	end tell
end aufwachen


on einschlafen()
	-- langsam leiser werden
	tell application "iTunes"
		set i to sound volume
		repeat while i ≥ 0
			set sound volume to i
			set i to i - 1
			delay 0.1
		end repeat
		stop
	end tell
end einschlafen


on sleepmode()
	display dialog "Nochmal hinlegen?" buttons {"Ja", "Nein, ich bin wach!"} default button 1
	if the button returned of the result is "Ja" then
		tell application "iTunes"
			my einschlafen()
		end tell
		
		delay 300
		tell application "iTunes"
			my aufwachen("Aufwachen")
		end tell
		my sleepmode()
	end if
end sleepmode



tell application "System Preferences"
	activate
	set current pane to pane "com.apple.preference.sound"
	set volume 5
	tell application "System Preferences" to quit
end tell


tell application "iTunes"
	
	set my playlist "Aufwachen" to play
	my aufwachen("Aufwachen")
	my sleepmode()
end tell


Tja probiert des mal aus bei mir startet der einfach nur die wiedergabe in iTunes… und das soll er ja nicht er soll ja eine bestimmte Playlist spielen und die lautstärke langsam erhöhen das alles macht er nicht mehr!

HELP!:-c
 
Ja also viele werden den Wecker ja nutzen also das Script:
Code:
on [B]aufwache[/B]n(personal_playlist)
	tell application "iTunes"
		set sound volume to 0
		
		if personal_playlist is not 0 then
			play playlist personal_playlist
		else
			play
		end if
		
		set u to sound volume
		repeat while u < 100
			set u to u + 1
			delay 0.1
			set sound volume to u
		end repeat
	end tell
end [B]aufwachen[/B]


on einschlafen()
	-- langsam leiser werden
	tell application "iTunes"
		set i to sound volume
		repeat while i ≥ 0
			set sound volume to i
			set i to i - 1
			delay 0.1
		end repeat
		stop
	end tell
end einschlafen


on sleepmode()
	display dialog "Nochmal hinlegen?" buttons {"Ja", "Nein, ich bin wach!"} default button 1
	if the button returned of the result is "Ja" then
		tell application "iTunes"
			my einschlafen()
		end tell
		
		delay 300
		tell application "iTunes"
			my aufwachen("Aufwachen")
		end tell
		my sleepmode()
	end if
end sleepmode



tell application "System Preferences"
	activate
	set current pane to pane "com.apple.preference.sound"
	set volume 5
	tell application "System Preferences" to quit
end tell


tell application "iTunes"
	
	set my playlist "Aufwachen" to play
	my aufwachen("Aufwachen")
	my sleepmode()
end tell

Hast du auch eine Playlist die "aufwachen" heisst?