<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Dropzone Forums — Finder Path]]></title>
	<link rel="self" href="https://forums.aptonic.com/feed/atom/topic/153" />
	<updated>2016-01-15T23:20:36Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.aptonic.com/topic/153/finder-path/</id>
		<entry>
			<title type="html"><![CDATA[Re: Finder Path]]></title>
			<link rel="alternate" href="https://forums.aptonic.com/post/689/#p689" />
			<content type="html"><![CDATA[<p>Yep, the below will do this using Python:</p><div class="codebox"><pre><code># Dropzone Action Info
# Name: Print Finder Path
# Description: Prints the selected Finder Path to the Dropzone debug console using Python.
# Handles: Files
# Creator: Aptonic
# URL: http://aptonic.com
# Events: Clicked
# SkipConfig: No
# RunsSandboxed: Yes
# Version: 1.0
# MinDropzoneVersion: 3.5

import subprocess

def clicked():

    script = &#039;&#039;&#039;
    tell application &quot;Finder&quot;
        try
            set theSelection to (target of window 1 as alias)
            set theSelection to theSelection as string
            set finder_path to POSIX path of (the selection as alias)
        on error
            set finder_path to null
        end try
    end tell
    if finder_path is not null then return finder_path
    &#039;&#039;&#039;

    proc = subprocess.Popen([&#039;osascript&#039;, &#039;-&#039;],
                            stdin=subprocess.PIPE,
                            stdout=subprocess.PIPE)
    stdout_output = proc.communicate(script)[0]
    selected_finder_path = stdout_output

    print (selected_finder_path)
    
    dz.finish(selected_finder_path)
    dz.url(False)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[John]]></name>
				<uri>https://forums.aptonic.com/user/2/</uri>
			</author>
			<updated>2016-01-15T23:20:36Z</updated>
			<id>https://forums.aptonic.com/post/689/#p689</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Finder Path]]></title>
			<link rel="alternate" href="https://forums.aptonic.com/post/688/#p688" />
			<content type="html"><![CDATA[<p>Is there an example that gets the current Finder selection and puts the path in a variable using Python? I don&#039;t know Ruby, and it isn&#039;t clear from the example. </p><p>Thanks!</p>]]></content>
			<author>
				<name><![CDATA[jakpot]]></name>
				<uri>https://forums.aptonic.com/user/490/</uri>
			</author>
			<updated>2016-01-14T22:50:57Z</updated>
			<id>https://forums.aptonic.com/post/688/#p688</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Finder Path]]></title>
			<link rel="alternate" href="https://forums.aptonic.com/post/493/#p493" />
			<content type="html"><![CDATA[<p>Got it, thanks. I downloaded the unsandboxed version and installed the action. I&#039;d swear I checked the download actions page before I posted.</p>]]></content>
			<author>
				<name><![CDATA[evanfuchs]]></name>
				<uri>https://forums.aptonic.com/user/387/</uri>
			</author>
			<updated>2014-07-16T05:35:51Z</updated>
			<id>https://forums.aptonic.com/post/493/#p493</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Finder Path]]></title>
			<link rel="alternate" href="https://forums.aptonic.com/post/483/#p483" />
			<content type="html"><![CDATA[<p>Yep - The &#039;Finder Path&#039; action does just this. You select a file in the Finder and then click the Finder Path action in your grid and it copies the selected file path to the clipboard.</p><p>You can install the Finder Path action here:</p><p><a href="https://aptonic.com/dropzone3/actions/install.php?bundle_name=Finder%20Path">https://aptonic.com/dropzone3/actions/i … der%20Path</a></p>]]></content>
			<author>
				<name><![CDATA[John]]></name>
				<uri>https://forums.aptonic.com/user/2/</uri>
			</author>
			<updated>2014-07-04T16:39:24Z</updated>
			<id>https://forums.aptonic.com/post/483/#p483</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Finder Path]]></title>
			<link rel="alternate" href="https://forums.aptonic.com/post/479/#p479" />
			<content type="html"><![CDATA[<p>Is it possible to have an action in Dropzone 3 to copy the path of a file?</p><p>thx</p>]]></content>
			<author>
				<name><![CDATA[evanfuchs]]></name>
				<uri>https://forums.aptonic.com/user/387/</uri>
			</author>
			<updated>2014-07-03T15:54:10Z</updated>
			<id>https://forums.aptonic.com/post/479/#p479</id>
		</entry>
</feed>
