Arjan Bos wrote:
tell application "Preview" repeat with i from 1 to number of windows set current_window to item i of windows set current_name to name of the document of the current_window if current_name is "AdemVanEeuwigheid.pdf" then close window i exit repeat end if end repeat end tell
This is very un-idiomatic applescript. The following is functionally identical, but cuts out much of the complexity.
tell app "Preview" repeat with doc in (documents whose name is "foo.pdf") close doc exit repeat end repeat end tell _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user