🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #15014

Re: Can JavaScript read the clipboard into a variable?

#15014
From: Dave_Saunders
Date: Fri, 02 Jan 2004 23:14
11 lines
1844 bytes
I solved this problem by pasting into a text frame. That allowed me to perform validity checks on the result and once I'd determined that that that I had pasted was indeed text, I simply loaded the contents of the text frame into a variable. [Long time since I've constructed a sentence with three consecutive 'that's.]

However, I'm back here because a search on doScript threw up this topic.

The language parameters for doScript in the JavaScript and Visual Basic look odd: the choice is among: JavaScript, Visual Basic and Unknown. Am I right in thinking that only a Windows machine can run Visual Basic and only a Mac AppleScript (I presume so). Is "Unknown" a mistake here? Or is setting it the same as not including the parameter at all?

Does InDesign ignore the file extension when executing this command? What if I give it a filename like fred.js and say it is an AppleScript (assuming I can find out how to do that)? Does the AppleScript parameter trump the .js extension?

I was under the impression that the doScript command could be used to run scripts that were in a variable, but that does not appear to be the case based on the description in the Scripting Guide.

Dave
Technical Details
Message-ID: <2cced595.1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2cced595.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,9d52993e58d63565
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2004-01-02 15:37:45 PST
From: Dave_Saunders@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: Can JavaScript read the clipboard into a variable?
Message-ID: <2cced595.1@webx.la2eafNXanI>
Date: Fri, 2 Jan 2004 15:14:03 -0800
References: <2cced595.-1@webx.la2eafNXanI>
Lines: 25
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit