Simple things could do more with less inputs

I was little surprised that this was not a feature so I made a script.
In many cases when a string is a reference to a file and in this case POSIX path
We could use that reference and run script that open it in Quicklook. Everything
happen inside Script Debugger itself :slight_smile: 4 line of code :slight_smile:

ex.
item 1 = /Users/Username/Desktop/mySecret.pdf

Script Menu Item for Script Debugger.

tell application "System Events" to keystroke "C" using {shift down, command down}
delay 0.1
set theURL to (the clipboard) as text
do shell script "qlmanage -p " & theURL

That last line should probably use β€˜quoted form of’ so that any paths containing spaces will be correctly handled by the shell:

do shell script "qlmanage -p " & quoted form of theURL

Stan C.

If you make a list in Script Debugger and select the item/value and use the
shortcut {command shift} + C it will copy the value with quotation mark
and thats why I do not need quoted form of…

You also do not need tell application process "Script Debugger".

Where did he do that? The only call I see is to System Events.

@jerryd I made the change after @CJK suggestion

Here is the same idea but instead reveal in Finder

tell application "System Events" to keystroke "C" using {shift down, command down}
delay 0.1
set theURL to (the clipboard) as text
do shell script "open --reveal " & theURL