Quicktime - pause dialog

Hi there I have a script that is playing through a list of files using quicktime.
Is there any way to have a variable that ‘listens’ for the space bar to be pressed whilst the script is running, so that when I press the space bar it pauses the playback of Quicktime. When I press it again it un-pauses (recommences playing) the file.

Cheers

H.

Hi,

Space is the keystroke for pausing/playing. In my other post, I said you can use the ‘playing’ property of a movie. Here, you want to use the ‘done’ property, because if you pause, then ‘playing’ is false and the movie closes. Here’s an example:

set folder_path to (choose folder) as string
set file_names to (list folder folder_path without invisibles)
– might want to remove dot items
tell application “Macintosh HD:Applications:QuickTime Player.app:”
launch
activate
set show movie info window to true
repeat with this_name in file_names
set file_ref to (folder_path & this_name) as alias
open file_ref
tell front movie
stop
rewind
set movie_name to name
end tell
display dialog "Movie name is " & movie_name
tell front movie
play
repeat until done
end repeat
close
end tell
end repeat
end tell

gl,