EyeTv ausschalten trotz Warnung

zwischenzeit

zwischenzeit

Mitglied
Thread Starter
Dabei seit
08.02.2005
Beiträge
92
Reaktionspunkte
0
Guten Tag,

ein passendes Script zum Ausschalten des Rechners habe ich hier schon gefunden.

Ich habe es für meine Bedürfnisse angepasst:

on RecordingDone(recordingID)
tell application "EyeTV"
enter full screen
end tell
activate
set antwort to display dialog "ausschalten?" buttons {"nein", "ja"} default button "ja" giving up after 30
if button returned of antwort = "ja" or button returned of antwort = "" then
tell application "EyeTV"
set volume output volume 40
end tell


tell application "Finder"
shut down
end tell
end if

end RecordingDone


Das Problem ist, dass mich der Rechner morgens mit Frühstücksfernsehen und einer Meldung "Kein Airport gefunden" begrüßt.

Da hat er auch recht, denn ich schalte Nachts das WLAN ab.

Meine Frage: gibt es eine Möglichkeit das "shut down" so zu gestalten, dass sich der Rechner trotz Fehlermeldung / Warnhinweis ausschaltet ?
 
..
Das Problem ist, dass mich der Rechner morgens mit Frühstücksfernsehen...

Gegen das Frühstücksfernsehen hilft evtl. auch bei EyeTV>Einstellungen>Allgemein das Häckchen bei 'Fernsehfenster bei Programmstart immer öffnen' zu entfernen.
 
Das Häckchen soll aktiviert bleiben, damit es sofort TV gibt wenn man den Mini startet.
Wichtig ist mir, dass die Kiste sich nach einer Aufzeichnung in der Nacht ausschaltet und nicht darauf wartet, dass ich ihr erkläre, dass es kein WLAN braucht.
 
Code:
    ignoring application responses
        shut down
    end ignoring
 
Vielen Dank oneOeight !

Dass Script sieht jetzt so aus:

on RecordingDone(recordingID)
tell application "EyeTV.app"
«event EyTVEnfs»
end tell
activate
set antwort to display dialog "ausschalten?" buttons {"nein", "ja"} default button "ja" giving up after 30
if button returned of antwort = "ja" or button returned of antwort = "" then
tell application "EyeTV.app"
set volume output volume 40
end tell


tell application "Finder"
ignoring application responses
shut down
end ignoring
end tell
end if

end RecordingDone


Ich habe es ausprobiert. Ein Neues Dokument im TextEdit eröffnet und nicht gesichert. Dann eine Aufnahme gestartet und gleich wieder beendet. Es erscheint der Dialog aus dem Script und danach meldet sich dann TextEdit und unterbricht das Ausschalten.
Habe ich das ignoring falsch eingebaut ?
 
du kannst mal versuchen den kompletten tell finder block darein zu packen.
 
Habe ich versucht. TextEdit meckert immer noch.

on RecordingDone(recordingID)
tell application "EyeTV.app"
«event EyTVEnfs»
end tell
activate
set antwort to display dialog "ausschalten?" buttons {"nein", "ja"} default button "ja" giving up after 30
if button returned of antwort = "ja" or button returned of antwort = "" then
tell application "EyeTV.app"
set volume output volume 40
end tell

ignoring application responses
tell application "Finder"

shut down

end tell
end ignoring
end if

end RecordingDone
 
Hallo!
Ja. TextEdit meckert zurecht!
ignoring application responses hat eine andere Funktion als die hier erhoffte.
Es gibt mehr oder weniger harte Möglichkeiten, deinen "Rechner" auszuschalten.
Hart:
Code:
do shell script "shutdown -h now" password "DEIN PASSWORT" with administrator privileges
Wobei -h auch eine Zeitangabe in Sekunden ermöglicht. Z.B. statt now ein +60

Ein klein wenig aufwändiger wäre ein Skript, welches erst alle offenen bzw. ungesicherten Programme ordnungsgemäß schließt und dann den Mac sanft runterfährt....
 
Jetzt ist das Problem gelöst. Vielen Dank an Alle !

on RecordingDone(recordingID)
tell application "EyeTV.app"
«event EyTVEnfs»
end tell
activate
set antwort to display dialog "ausschalten?" buttons {"nein", "ja"} default button "ja" giving up after 30
if button returned of antwort = "ja" or button returned of antwort = "" then
tell application "EyeTV.app"
set volume output volume 40
end tell

tell application "System Events" to set theProcesses to every process whose visible is true and name is not "Finder" and name is not (name of me)

repeat with i from 1 to (count theProcesses)
set thisProcess to item i of theProcesses
try
tell application (name of thisProcess) to quit without saving
end try
end repeat

tell application "Finder" to shut down

end if

end RecordingDone
 
Zurück
Oben Unten