Page 1 of 1

Enchanting rename-prompt with Quick Look

PostPosted: Wed May 18, 2016 11:53 am
by krisuv
Hi,

I'm a huge fan of the rename-prompt posted on the site, but would really like to accompany the prompt with a quicklook, to make renaming easier, as well as closing the quicklook afterwards. I have achieved opening on PDF and images, but most formats should also work?

The problem seems to occur at both scripts below, where I have used the shell script from this page. The kill-script is from a macworld-forum and really quite random. Open-shell is the first script and kill-script comes right after the renaming-one.

/bin/bash
Code: Select all
qlmanage -p "$1" >& /dev/null &

Applescript:
Code: Select all
set getPID to (do shell script "ps -A | grep qlmanage") as string
set {TID, text item delimiters} to {text item delimiters, space}
set thePID to text item 1 of getPID
set text item delimiters to {""}
do shell script "kill -9 " & thePID


Ideally I just want to avoid the hassle of having multiple quicklooks appear on multiple renames, but it seems like the process needs to be killed?

Thanks a lot, cheers.

Re: Enchanting rename-prompt with Quick Look

PostPosted: Thu May 19, 2016 9:29 am
by Mr_Noodle
You might want to look into an AppleScript way of doing it. Killing the process does seem heavy handed but I don't have any experience with trying to manipulate quicklook from AS. Might want to search around the net as there might be something out there for it.