try
set ifile to "path:to:Desktop:Picture.png"
set qifile to quoted form of (POSIX path of ifile)
set cmd to "qlmanage -p " & qifile
do shell script cmd
end try
the script does not exit itself unless i close the preview window. Please help me do it.
Secondly, is there a better way to close the preview window with the keyboard other than using “killall qlmanage”?
just found this:
http://www.macosxhints.com/article.php?story=20071104012738617
When using the script, you can close the Quick Look window with the mouse (the conventional way), or close it in Terminal by getting the pid from the ps command and using kill pid#.
can anyone enlighten me more on how to use pid