🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2635

Re: How to call applescript values?

#2635
From: Eric
Date: Fri, 12 Dec 2008 18:36
15 lines
1254 bytes
I know very little about JS, but these are fairly easy to accomplish in AS.

[1] get path to home folder

will return the equivalent of the "~" path.

Or in your specific example to get an image in the desktop folder you could also use something like:

set myPath to ("" & (path to desktop folder) & "New:1.jpg")

If you want it returned with slashes instead of colons in the path, add posix path of:

set myPath to posix path of ("" & (path to desktop folder) & "New:1.jpg")

[2] I think the last line of your AS should be something like "return myResult". Then whatever variable you assign the doScript to should get the results you return.
Technical Details
Message-ID: <59b740e9.0@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
References: <59b740e9.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,ab928e8669f41924
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Eric_@_MCA@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: How to call applescript values?
Message-ID: <59b740e9.0@webcrossing.la2eafNXanI>
Date: Fri, 12 Dec 2008 10:36:59 -0800
References: <59b740e9.-1@webcrossing.la2eafNXanI>
Lines: 21
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit