From michael@stoichiometry.net Tue Mar 29 14:49:18 2005 From: Michael To: textmate@lists.macromates.com Subject: [TxMt] & drag commands Date: Tue, 29 Mar 2005 15:49:14 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0182470413341801025==" --===============0182470413341801025== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit I was wondering if anyone had got the built-in HTML drag commands for and to work in Textmate 1b5? Currently if I drag a html or PDF file from the project window into a HTML file I'm working on it will create a link, but if I drag an image file or css file onto the HTML file, Textmate will insert the raw source of the dragged file. Any ideas where I am going wrong? I am using the following drag commands (built-in): File Types: png, PNG, jpeg, JPEG, jpg, JPG, gif, GIF Commands: img=$TM_DROPPED_FILE alt=`echo $img | perl -pe 's/^(.*\/)?(.*?)(\..*)?$/$2/g' | tr '_-' ' '` sips -g pixelWidth -g pixelHeight $img | awk '/pixelWidth/ { w=$2 } /pixelHeight/ { h=$2 } END { printf("\"${0:'"$alt"'}\"", w, h) }' File Types: css echo "" Apologies if this has already been covered. Mike --===============0182470413341801025==--