🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.photoshop.scripting
Article #1784

Re: [AS] New to scripting: Looking for method to list "path" of layer

#1784
From: Bernhard_VonZastrow
Date: Wed, 28 Jul 2004 23:32
33 lines
1750 bytes
Hi, it's me again having a conversation with myself :)

I have managed to get this far but I get an error on the line marked "ERROR" that says

"requested property not available for this object"

but that same object DOES have the property in the main tell branch.... what gives?

----------------------------------
tell application "Adobe Photoshop CS"

	activate

	if ((count documents) < 1) then 		display dialog "You must have at least one document open before running this script" 		return 	end if

	set DocumentRef to current document
	set layerRef to current layer of current document

	set temp to name of container of layerRef
	display dialog temp as string

	set LayerPathText to my GetLayerPath(layerRef, DocumentRef)
	display dialog LayerPathText as string



end tell

on GetLayerPath(theLayer, theDocument)

	set ParentLayer to name of container of theLayer <----- ERROR 	if name of ParentLayer is not equal to name of theDocument then 		return name of layerRef 		--return (name of ParentLayer) & GetLayerPath(ParentLayer) 	end if 	return ""

end GetLayerPath
Technical Details
Message-ID: <3bb53eb0.1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <3bb53eb0.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f5839,fd0e78320f83793c
X-Google-Attributes: gidf5839,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bernhard_VonZastrow@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.photoshop.scripting
Subject: Re: [AS] New to scripting: Looking for method to list "path" of layer
Message-ID: <3bb53eb0.1@webx.la2eafNXanI>
Date: Wed, 28 Jul 2004 16:32:45 -0700
References: <3bb53eb0.-1@webx.la2eafNXanI>
Lines: 43
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit