From a command-line in a terminal, is there any way to bring up the preview file contents screen that can be seen in Finder.app when pressing the spacebar -- without bringing Finder.app to the foreground with focus (i.e., keep Finder.app back-grounded). If so, can anyone please share with me the contents of an applescript
(e.g., osascript
) that will accomplish that goal.
Asked
Active
Viewed 264 times
3

lawlist
- 13,099
- 3
- 49
- 158
-
FYI: To anyone who votes to close this question -- please be advised that if this question can be made into a reality (i.e., answered), then the contents of the osascript is a programming question. If it is not possible to accomplish this objective, then state it is not possible. But do not vote to close the question merely because you do not know the answer. I suspect that this is possible, however, it may take a true programming expert (familiar with Finder.app) to know the answer. – lawlist Nov 16 '13 at 05:35
-
1I've added additional tags (`osascript` and `applescript`) to help put this question before an audience familiar with that programming language. It is apparent that the general `osx` tag audience is unfamiliar with that aspect. I removed the `osx` tag to avoid confusion to that audience. – lawlist Nov 16 '13 at 17:54
1 Answers
2
From AppleScript:
set myFile to "/Users/lawlist/Desktop/test.jpg"
do shell script "qlmanage -p " & quoted form of myFile & ">& /dev/null"

adayzdone
- 11,120
- 2
- 20
- 37
-
"qlmanage -- Quick Look Server debug and management tool". When I run your code Finder shows the preview (very cool), only thing is that the title of the window has a [DEBUG] before the filename. – Nov 16 '13 at 19:27
-
Based upon a few threads that I was able to locate on Google regarding the quicklook header containing the word "[DEBUG]" filename, it appears that removing "[DEBUG]" is not an option that is available with `qlmanage`. The threads date back to the introduction of the `qlmanage` feature. – lawlist Nov 16 '13 at 21:14