Enchanting rename-prompt with Quick Look

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Enchanting rename-prompt with Quick Look 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.
krisuv
 
Posts: 1
Joined: Wed May 18, 2016 11:40 am

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.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support