Skeeve •---->


Anmeldedatum: 20.04.2006 Beiträge: 1067
|
Verfasst am: 02.01.2008 - 11:40 Titel: Zeitstempel eines QuickTime Films protokollieren |
|
|
Die Originalanfrage kam in der AppleScript Users Mailing Liste. Anforderung war, auf Tastendruck den momentanen Timeframe eines QuickTime Films zu protokollieren und am Ende des Films das Alter des Zuschauers zu erfragen.
Gelöst habe ich das mit der Pause Funktion und einem Skript das permanent abfragt, ob der Film angehalten wurde.
Die Protokollfunktion ist hier nur ein "log", muß also gegebenenfalls durch ein write in eine Datei erstezt werden.
Zitat: | tell application "QuickTime Player"
activate
tell document of window 1
repeat
if not playing then
set timeframe to current time
log timeframe
if duration <= timeframe then
exit repeat
end if
play
end if
end repeat
end tell
end tell
tell me to activate
display dialog "Tell me your age please" default answer "Not your business"
log the result
(*
1) Start the film
2) Pause the film
3) Start the script
4) Stop the film with spacebar
5) Observe the event protocoll or replace the log statements with a write to a file
*) |
_________________ "All problems are solved in slightly less than half an hour" (Chumbawamba, "Hey Hey We're The Junkies") |
|