Article View: adobe.scripting.indesign
Article #15153Re: JS: app.paste() leaves new frame unselected
From: Dave_Saunders
Date: Fri, 02 Jan 2004 18:59
Date: Fri, 02 Jan 2004 18:59
23 lines
4030 bytes
4030 bytes
Point 1 is something I was giving some thought to this very morning, but I didn't come up with much. On the other hand, it's never been something that has worried me much. But that was in wealthier times. Most of my scripting has been incidental to the main project and it was for the project that I was being paid. I was usually the prime user. Where I have written scripts for other people, I have found that protection has been hardly an issue. Most non-scripters simply cannnot get their minds to think that way. They just aren't interested in stealing my script: they don't know what to do with it (beyond using it), and if I can persuade them to spend some money with me, then they at least have an interest in protecting that investment by not giving away my script. For non-commissioned scripts, I was thinking of something fairly simple along the lines of a gentle reminder every 100 or so uses of the script that they might think about rewarding me for my efforts given the amount they're using the script. This would be easy to implement (and easy for another scripter to circumvent). I am still toying with the idea of setting up a PayPal account so that people could easily reward me, and I'm thinking that anyone who did would be entitled to free support. So far, the script I've written that's needed the most support was the AppleScript for populating a table in 2.0.2 without disturbing the existing formatting. I received an e-mail on that this very morning -- there's a problem in that early versions of the script dealt with an OS bug that has been fixed, thereby breaking my script.It was that e-mail that set me writing a JavaScript version this morning to work with CS, and it's the packaging and making available of that script that caused me to start thinking about these issues again. Point 2 is an issue in less than 1% of all my scripts. When it is an issue, I'll use AppleScript, but most of the time it's a non-issue. That JavaScript can read and write text files is usually enough for me. I don't think I understand quite what you mean by point 3. It's not something that I've even thought about. There are some things that I regard as being missing from InDesign's scripting that might fall into this area, such as progress reporting and the ability to stop a script either cooperatively (the script detects some kind of user initiated state change and stops) or a hard terminate (the user issues a Stop Script command). But these, it seems to me are missing from all the languages (except in debugging mode). Point 4 has been something of an issue. And JavaScript does have some annoying foibles that have taken some time to learn. This morning, I at one point forgot to add the parentheses after app.paste and so my script wouldn't work but it didn't tell me anything was wrong, either. But, the object model is the real biggie as far as learning is concerned. Point 5 is something of an issue, but I've found it reasonable to work with. Still, I can always fire up Script Debugger and use AppleScript when I'm in a hurry to work something out. For me, the cross-platform audience is the biggie. It means I can more confidently work with any InDesign user without having to worry about them being a Mac or Windows user. I didn't realize (or I had forgotten) that Peter is a Windows user until he said so this morning. Dave
Technical Details
Message-ID:
<2ccf29c3.8@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccf29c3.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,b9561af257c0b40d X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2004-01-02 11:07:49 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: JS: app.paste() leaves new frame unselected Message-ID: <2ccf29c3.8@webx.la2eafNXanI> Date: Fri, 2 Jan 2004 10:59:52 -0800 References: <2ccf29c3.-1@webx.la2eafNXanI> Lines: 62 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit