1 2 Previous Next 46 Replies Latest reply on Dec 15, 2009 2:01 AM by Dirk Becker 

    what's the difference between a plug-in and a script?

    critter_monster Level 1

      Hi everyone, can anybody explain this to me quick? I'm not programming-savvy, but I'd like to know.

      thanks!!

        • 2. Re: what's the difference between a plug-in and a script?
          critter_monster Level 1

          Thanks for the link, Steven. But wow, that guy's podcast is totally over my head.

           

          Please forgive my ignorance. I don't usually involve myself with "behind the scenes" info--I'm only an artist!!-- but tomorrow morning I am teaching some people about "extra cool things InDesign can do" and I just *know* this question will come up.

           

          I guess I just wanted to know: from a user standpoint, what is the difference? why do we sometimes extend functionality with things called "scripts" and other times with "plug-ins"? what makes them different from one another--for example, why do I run a "script" to get cool corner effects and a "plug-in"  to do crop marks?

           

           

           

          thanks again

          • 3. Re: what's the difference between a plug-in and a script?
            Peter Kahrel Adobe Community Professional & MVP

            Scripts and plug-ins aim to do the same thing, namely, to provide something that Indesign can't do (yet). There the similarities stop. Everything you can script you can also do as a plug-in, but not the other way around: there are many complex plug-ins that do things which you wouldn't be able to script.

             

            For simple things, you'd write a script because they're easier to develop and test. But being able to script doesn't mean you can write plug-ins: I for one can write some scripts but I don't know how to write plug-ins.

             

            Another factor is that for various reasons many people don't like plug-ins, whereas they don't mind running scripts.

             

            These seem to me to be the main differences.

             

            Peter

            • 4. Re: what's the difference between a plug-in and a script?
              Loic.Aigon Adobe Community Professional

              Not to mention that most of scripts are open files that the user may want to adapt to its own parameters or maybe add functions, etc.

               

              A plugin is locked element that you can't improve as an user.

               

              Loic

              • 5. Re: what's the difference between a plug-in and a script?
                Harbs. Level 6

                Jiveware strikes again! (My reply from this morning disappeared...)

                 

                Plugins were generally written in C++ and scripts in one of the three supported scripting languages (AppleScript, JavaScript, and Visual Basic). As time goes on, this distinction is being blurred.

                 

                There's a lot you can do by either a script or a plugin. Both of your examples could be either a script or a plugin. There's advantages (and disadvantages) to both.

                 

                While there's a lot of points on both sides, here's the biggest advantages on both sides of the fence:

                 

                Scripts are (generally) easier and quicker to write.

                 

                Plugins have more access to the inner workings of the program.

                 

                To the user, it really doesn't matter whether a tool is a "script" or a "plugin" and in a lot of cases, the difference is not apparent to the user at all. The biggest difference as far as the user is concerned is usually how it's installed... (Plugins go in the Plugins folder, while scripts go in the Scripts (or Scripts Panel) folder.)

                 

                Harbs

                • 6. Re: what's the difference between a plug-in and a script?
                  AdobeScripts Level 3

                  Hi everyone, can anybody explain this to me quick? I'm not programming-savvy, but I'd like to know.

                   

                  Script can speed up your manual work - i.e. repetitive tasks.

                  Plugin can add new features/funcionality into InDesign - i.e. CellStyles in old versions of InDesign.

                   

                  After using script - there are no negative "footprints" and there is no way to check if document was edited/prepared using script(s).

                  When you use plugin in document - you could have problems when you try to open this document on computer without this plugin.

                   

                  And don't get confused by "plugins" created from scripts It's still script but packed into plugin-shell

                   

                  robin

                  www.adobescripts.co.uk

                  • 7. Re: what's the difference between a plug-in and a script?
                    Dirk Becker  Level 4

                    Robin, don't dare to touch the weak spot of Harbs! He insists on the label "plugin" for both ;-)

                     

                    I'll pick a few features of my plugins where scripts can not compete:

                     

                    Plugins can be seamlessly integrated in many more places of the UI. I've done fields and icons in the control strip to display warnings or actual values of the selection, a tool for arbitrary work in the layout, the tool is tied to the info palette to show its own information while active. I frequently reuse the native widgets in my palettes (e.g. the tree view) with full drag and drop support if required. Preferences dialog? You get the idea.

                     

                    Plugins can store their values in private places, in preferences, on every object and also in non-objects such as text, rather than abuse few existing features - the color of the unused paragraph rule above comes to mind. I'd instead create my own attributes and add another sub-dialog to the style options for completeness sake.

                     

                    When Robin mentions the negative "footprint", that's an issue of badly designed plugins. If the programmer does not take care, you will indeed be confronted with "missing plugin" dialogs. Be assured there are options to suppress the dialog and recover gracefully when the document was modified without the plugin.

                     

                    A major advantage of plugins is the ability to tap into an enormous range of internal notifications. Follow the selection the same way as the original widgets. You do not need to wait for the user to click a button, you just update your display while the mouse is still dragging the image, or you modify the behaviour of mouse-down on your added page item handles. You can step in between before things are changed that you need to change differently - snap to your own kind of grid.

                     

                    Another advantage: speed. C++ is just faster, and can itself work on smallest details where scripts have to work their way thru levels of abstraction from the runtime engine thru the scripting object model, further thru high and low level encapsulation to finally flip the single bit in the document's database. Only a small part of internal functionality is really exposed to scripts - we just talked the other day that unused swatches are available but how about styles?

                     

                    Many places within InDesign are designed to be replaced or extended. Run your own composer if you think you can do better than Adobe, or have to emulate Wor(d)se. Add your own drag and drop flavor. Want an own measurement unit? Implement hyphenation services for the Klingon language. Add support for unknown image formats. Very important are the assignment hooks for interchange with InCopy, as a developer of an editorial system you redirect their function towards your database.

                     

                    As Loic mentions, plugins can be closed against changes. Nothing but the required development effort prevents them to open their functionality to other plugins, or to scripts. A well known example for extensible plugins is actually Rorohiko's plugin used as the basis for many advanced scripts such as Harb's. I also have plugins that invoke scripts on events such as drag and drop from outside, or that expose their new text attributes as scripting properties.

                     

                    Dirk

                    • 8. Re: what's the difference between a plug-in and a script?
                      Harbs. Level 6

                      Dirk Becker  wrote:

                       

                      Robin, don't dare to touch the weak spot of Harbs! He insists on the label "plugin" for both ;-)

                       

                       

                      Well, I do refer to them a "Scripted Plugins", but you have to dig pretty hard to see that...

                       

                      (hint: check the read-me files)

                       

                      How 'bout "extensions"?

                       

                      The fact of the matter is that these distinctions are being blurred. What would you call PatchPanel extensions?

                       

                      An awful lot of "real" plugins have a whole bunch of ExtendScript under the hood as well. Are those plugins, or "Scripted Plugins"?

                       

                      The fact of the matter is that very few of these distinctions are important to the end user, but to the developer the distictions really are very siginificant.

                       

                      Harbs

                      • 9. Re: what's the difference between a plug-in and a script?
                        Peter Kahrel Adobe Community Professional & MVP

                        Oh, Dirk! I was looking forward to a couple of less chaotic weeks, but now that you make such an eloquent and irresistable case for plug-ins I feel I should finally do something about plug-ins.

                         

                        Harbs -- I agree with you that the distinction is relevant mainly for developers, not for users.

                         

                        Peter

                        • 10. Re: what's the difference between a plug-in and a script?
                          Harbs. Level 6

                          Peter,

                           

                          I think you'll need quite a few less chaotic months!

                           

                          Harbs

                          • 11. Re: what's the difference between a plug-in and a script?
                            Dirk Becker  Level 4

                            Peter, please be warned that a few weeks will only scratch the surface.

                             

                            Harbs, I don't want to pick on all your ideas, but "extension" lets me first think of Quark even if written differently. For my own use I simply call the combination packages of plugin with associated script "hybrids" if the plugin just supports the functionality implemented by the script. I suppose that sounds friendlier than "cross-breed".

                             

                            PatchPanel adds a language binding for ActionScript and therefor is roughly the same league as the other scripting environments. Besides it comes with the benefit of the whole Flash runtime for user interaction, the rich Flex library and the first components to match the look and feel of the Suite applications have also been mentioned somewhere. Definitely an interesting area, if only I had more time.

                             

                            Dirk

                            • 12. Re: what's the difference between a plug-in and a script?
                              liedzeit Level 2

                              Well, unfortunately it is not quite true that the difference between script and plug-in is only important for the developer. Since scripts are comparatively easy to write (and are slower) they have with some customers a bad reputation. Also, in my experience many end-users are scared of the java-bean in the scripts-panel whereas they happily use a plug-in function (out of a new menu). These days (since CS3) a script can also be called from a menu. Which is very nice.

                               

                              The reason I mention this is that I lost a customer because I was not able to convert a working script into a plug-in. The customer insisted on a plug-in.

                              In the end someone wrote him a script and was clever enough to call it "Plug-in". Both sides are happy. I was the fool.

                               

                              Ralf

                              • 13. Re: what's the difference between a plug-in and a script?
                                Harbs. Level 6

                                Definitely an interesting area, if only I had more time...

                                 

                                That's exactly how I feel about the SDK...

                                 

                                Harbs

                                • 14. Re: what's the difference between a plug-in and a script?
                                  Fred Goldman Level 3

                                  I will put in my 2c

                                   

                                  As a user and script writer I disagree with the idea that the difference between scripts and plug-ins is mainly for developers. I can definitely feel the speed difference between scripts and plug-ins that do the same thing. The little delay that scripts have can sometimes be very annoying. And integration does mean something to a user. (Progress bars are rarely necessary with plug-ins).

                                   

                                  Having said that, when it comes to getting the job done, if you don't need to go public with your scripts, scripting is by far much more efficient. Building a full fledged plugin rarely pays for small companies just trying to get the job done. Scripting gets the job done 99% of the time although it may not be as elegant.

                                  • 15. Re: what's the difference between a plug-in and a script?
                                    Steven.. Level 3

                                    As someone who has recently taught myself InDesign SDK programming, here's my 2 cents,

                                     

                                    1. Scripts can be written by hobbyists, Plug-ins must be written by Programmers with previous knowledge of Object Oriented C++

                                     

                                    2. Scripting basics are easily acquired

                                      • JavaScript, AppleScript, Visual Basic have plenty of free for dummies resources
                                      • This forum has many knowledgeable people happy to help out anyone without charge (I can't figure how they make a living)
                                      • Useful scripts can be just a matter of lines
                                      • Script are very readable, making each one a tutorial.
                                      • Olev Kavern's documentation and script comments is the best I've ever seen.(many years ago, when I started scripting it got me started)

                                     

                                    SDK basics are not easily acquired

                                      • Programming Guide and Solutions Guide not for dummies
                                      • SDK Forum only has a few really knowledgeable contributers (Dirk being the most prominent)
                                      • C++ code spans many files making it hard to get help, since there are many unknowns.
                                      • Visual Studio or XCode, SDK, Debug Version of InDesign about 3 GB of files is a commitment that takes some time just to get right.
                                      • Adobe Support is very expensive
                                      • It's hard for beginners to understand every line of the generated code, making it hard to modify.

                                     

                                    3. Many parts of the SDK are not documented at all, requiring a lot of sniffing to figure how to make it work. Dirk has some plug-in he created just to sniff some info out of InDesign.

                                     

                                    All in all, its hard, its time consuming, however its very rewarding.

                                     

                                    Steven

                                    • 16. Re: what's the difference between a plug-in and a script?
                                      critter_monster Level 1

                                      thanks to everyone who replied. It was very interesting and helpful to read your answers, and now I feel like I could give an answer to that question which I just KNOW I will be asked. The Forums come through again!!

                                      • 17. Re: what's the difference between a plug-in and a script?
                                        Harbs. Level 6

                                        Steven.. wrote:

                                         

                                        I can't figure how they make a living)

                                         

                                        Who says we do?

                                         

                                        Harbs

                                        • 18. Re: what's the difference between a plug-in and a script?
                                          Peter Kahrel Adobe Community Professional & MVP

                                          >(I can't figure how they make a living)

                                           

                                          Maybe they earn a living doing other things and hang out here to amuse themselves.

                                           

                                          Peter

                                          • 19. Re: what's the difference between a plug-in and a script?
                                            [Jongware] Most Valuable Participant

                                            Let's not forget a major plus point of scripts: they are, or can be made to be, version independent. Older scripts that don't wo

                                            rk

                                            anymore (--please ignore random hard returns, I'm not going to fix jive-ups!) can be made to come alive

                                            by putting them into a "Version xx Scripts" folder -- it works for all but the utmost 'dirty scripted hacks'.

                                             

                                            Plugins, on the other hand, are highly version-dependent. And as Adobe publishes a new SDK, with new system and environment demands, per each new version of InDesign, the programmer has to acquire that new programming environs, work through the documentation to find what changed where, and update the source code of his own plugin just to make it work for a newer InDesign. Woe unto them who write plugins for a living if they don't promptly update their plugins to work with the latest version (after all, hey, the client paid for his old one -- and it does not work anymore in the new version so why don't you fix it for free as it is clearly broken -- etc.).

                                            • 20. Re: what's the difference between a plug-in and a script?
                                              Dirk Becker  Level 4

                                              • Visual Studio or XCode, SDK, Debug Version of InDesign about 3 GB of files is a commitment that takes some time just to get right.

                                               

                                              Multiply that by versions - CS2 is still in frequent use out there especially in large deployments, and not everybody has the plain vanilla latest public update. Some people are right now deploying CS3 because their thorough evaluation takes them two years. Then there are also InCopy, and InDesign Server, and you would of course want to support both Mac and Windows. Panther (best for CS2) or Snow Leopard? XP or Windows 7? Consider the jungle of external software versions (browsers, databases) ...

                                              All in all, its hard, its time consuming, however its very rewarding.

                                               

                                              It depends. In a different thread in the SDK forum Steven also asked "where are all those plugins?"

                                               

                                              Turning plugins into a product for the general public is very different from exclusive development jobs. First you need a problem that is not too specific, but also not yet covered. Then you have to find and implement a balance of expected features and those you better leave out, so that the generic plugin covers a large range of options matching the broader audience. Then you're ideally expected to deliver understandable manuals, localizations, the required legalese, marketing material and the impressive presence at the trade show, for a price that pays roughly three hours of employed developers or a handshake from a good lawyer. And you better do not cause even one support call per sale.

                                               

                                              I have plenty plugins that could be useful but are unknown for these reasons. Some early ones are redundant now because similar features have been added to InDesign (an image resolution preflight, or an OMV substitute that I wrote later on during CS1 and CS2), some plugins targeted the wrong or too small audience. I also made the mistake that from initial feedback I had underestimated the willingness of scripters to use scripting related plugins and left that area to Rorohiko. Most other plugins solve little problems here and there (as single person developer I better not touch the bigger ones that require 20 person teams), but if I even mentioned them aloud Harbs would publish a script next week that technically covers 50%, beats me in other details but is too close to make a difference to most of the end users.

                                               

                                              You could say I should team up with marketing and so forth, and I probably should. I will spare you the details of my related experiences. In short, good developers are married with their enormous, well maintained code base (worth decades of polishing work) to give them a speed advantage, where a buzzword juggling MBA can easily say "oops" and open the next company.

                                               

                                               

                                              SDK Forum only has a few really knowledgeable contributers

                                               

                                               

                                              If it proves as a market, of course your approach has to stand out in comparison to those of the dear competition. Most big plugin developers do not pay their staff to nurture the competition in public forums. At best they just have a look into the archive if a solution to their own problem was delivered for free. I give my hints at the starting level but never post code.

                                               

                                              Adobe Support is very expensive

                                              This is relative, comparing to the hourly cost of a competent engineer who in that time can not work on the features of the next major version. It is prohibitive if you intend to use them as live SDK index - there is full text search for a reason. Actually to some people it is cheap, the cost is more in the effort to understandably present the problem so it can be routed correctly and handled in time, and in the waiting time due to capacity.

                                               

                                              Many parts of the SDK are not documented at all, requiring a lot of sniffing

                                               

                                              That is an understatement, but the situation has improved over the years. Most information now is obscured by sheer volume, in general you have the header sources for most of the interface classes and also plenty examples, increasingly even real working code rather than stuff that leaves the interesting points as exercise. That alone do not show you the dynamic behaviour of everything in context, but is a good starting point. For comparison, that "sniffing" plugin produces 300,000 lines of text from an empty document, but its major purpose is trace of interactions.

                                               

                                              To answer that quoted question: My major work is in specialized or exclusive jobs, where publishing is still an industry. This could be a big publishing house with a highly polished individual solution developed in-house, system integrators (consultants) that need a plugin for glue code to support their own scripting, system vendors with whole teams stuck in details of a crash, or just the output side of big multi-user workflow systems that need me-too InDesign integration but "only" have Java and database experts.

                                               

                                              Dirk

                                              • 21. Re: what's the difference between a plug-in and a script?
                                                Harbs. Level 6

                                                Hi Dirk,

                                                 

                                                I hope there's no hard feelings. I have never knowingly taken any of your ideas...

                                                 

                                                I think that most developers suffer from the problem of not being very good at marketing. Sales can sometimes be so slow that you wonder why you put in any effort developing!

                                                 

                                                My take on the C++ vs. scripting question is that it really depends on what functionality you are talking about.

                                                 

                                                The speed hit when dealing with Text objects in scripting is pretty steep, while other objects are much less noticeable if at all.

                                                 

                                                Take my Proper VJ (scripting based) product for example: When you use it on short stories, it works fine. The overhead for processing the paragraph spacing is hardly noticeable. If you try to use it on a hundred page story on the other hand, you could tear your hair out! I think Dirk has (or had?) a similar C++ based product. It would be very interesting to do performance comparisons, but I'm pretty sure that his product would wipe mine right out of the water. Quite frankly, the market demand that I've seen doesn't really justify the developing effort required for even the scripting based product, and most definitely not a C++ based one.

                                                 

                                                Now lets take AutoFlow Pro as another example (also scripting based): a small part of the functionality is the same as Typefi's Autofit plugin (which I believe is C++ based). I once did some performance comparisons between the two (in the areas where they overlap), and there was very little, if any perceptible difference in performance. I believe that to create a product with the level of functionality that AutoFlow Pro provides in C++ would have taken a whole team of developers, as opposed to my having created it by myself in spare (and not so spare) time. So, while there would be an improvement in performance if it was done in C++, there's not necessarily a benefit to the end user, because they might just never get the functionality!

                                                 

                                                All in all, I think there's a reason why most developers don't market their own products...

                                                 

                                                Harbs

                                                • 22. Re: what's the difference between a plug-in and a script?
                                                  Dirk Becker  Level 4

                                                  Harbs,

                                                   

                                                  actually ProperVJ was the one. To give a bit of history to the others here (hi Ralf!), I had just spent a month to scratch the surface of text justification, on the obscure example issue how to interactively balance an "Extract" - a sequence of paragraphs with disabled align-to-baselinegrid - within its enclosing a-t-b body text. Btw, a larger share of the development time went into UI, selection integration and "sniffing" investigations how things work under the hood, while the actual implementation was done "cheaply" with space-before overrides the same way as a script would do, because anything more sophisticated would have taken much more time.

                                                   

                                                  The first and most prominent response when showing that plugin around in a limited group was something like "nice, but I actually would need ... VJ". Aditional development time was a half day to extend the existing plugin with a menu item and a quick program that used space-before the same way as above. Time to investigate the built-in VJ and the decision to not interfere with it at least in the beginning was another two days, while it would've been estimated two weeks to complete the feature with a text attribute or frame property, matching UI, tie it into post-processing of the composer and so forth.

                                                   

                                                  At that time I had shown you the Extract plugin including my VJ, you remember it from there. Maybe a month later you came out with your shot at the very same target. Of course as I said adjusting the space-before is no rocket science, I was already aware of an earlier implementation for Quark. I also recently saw a rough script by Michael Fischer which of course misses a few minor points. I've also found more uncovered special cases with my own implementation. Given the minor scope this should not be a big issue between us, but it got me thinking how broad I even hand out prototypes and early releases, and it was the reason for my remark. Guess why you're asking yourself whether I have (or had?) a similar - product? It never got that far, and is just tucked away in my sources.

                                                   

                                                  Would it have become a product without that history? I doubt, with the reasons given in the earlier postings, and also the maintenance issue brought up by Jongware and considering the limited market as you mention it. Writing scripts or plugins can be fun, but the overall effort from a bare bones prototype into a polished product is already close to prohibitive. Not yet mentioned: Just add the cost to handle individual sales, it alone eats up (or doubles) any reasonable price. For example ask your bank for the fees on international transfers (both sides), or the fuss they make (at least here in Germany) before you can accept credit cards. The alternatives are PayPal or Kagi, but they also require manual handling or automation (again development time) or have other downsides. I think you and several other more or less professional scripters around here, as the other small scale plugin developers, have similar problems.

                                                   

                                                  What is in the future? There are many options. Either I "focus" - in other words bet the farm on a single product and create plugins that justify a larger price, or I learn to handle the downstream issues myself. Be assured that I'm already working to grow on both as my budget permits. I could also team up with someone specialized in that area, or we all get lucky and Adobe finally comes up with the infrastructure of an "App Store" knock off for their Flash technology where we could sneak in at the side door. Until then it is definitely the exclusive jobs, mentoring at larger teams or whatever other project comes along that will pay my rent and the grocery bill. Forum karma alone does not. Same as for you and the others around here that depend on the day-to-day job of producing books, journals and so forth, or their slice of the consulting cake.

                                                   

                                                  Dirk

                                                  • 23. Re: what's the difference between a plug-in and a script?
                                                    Harbs. Level 6

                                                    Who's Ralf?

                                                     

                                                    I actually had no idea that you were working on a VJ solution until after Proper VJ was released, and someone your mentioned your solution on the Lassosoft list.

                                                     

                                                    The impetus for me to create Proper VJ was actually pressure I got from Brad Walrod (and to a lesser extent Fred Goldman). The need was one I had felt myself but probably would not have put in the time in to create the less-than-ideal solution that I did.

                                                     

                                                    I don't recall ever seeing your Extract plugin (nor do I ever recall seeing that name). The only plugins of yours that I've ever seen was Script Extras and Layout Extras (in May of 08 -- after I had already created Proper VJ).

                                                     

                                                    Had I known you were working on a C++ solution, I definitely would not have created Proper VJ.

                                                     

                                                    Maybe it's best for us to continue this discussion off list...

                                                     

                                                    Harbs

                                                    • 24. Re: what's the difference between a plug-in and a script?
                                                      Dirk Becker  Level 4

                                                      For the record: my memories on Proper VJ were wrong!

                                                       

                                                      As you say, at that time I was bouncing around several of my plugins, while my whole attention was sucked up by a new big client project. We talked about implementation details when I found ProperVJ but the overlap appears to be coincidence, shortly after my development of that other plugin was covered on a list where we also hang around. As I tried to express previously, for me it was a minor issue anyway not worth the effort.

                                                       

                                                      Again: Harbs, please excuse me. I was wrong!

                                                      Dirk

                                                      • 25. Re: what's the difference between a plug-in and a script?
                                                        Harbs. Level 6

                                                        Hi Dirk,

                                                         

                                                        No sweat! We're all friends here after all!

                                                         

                                                        I would still be interested in doing some performance comparisons though...

                                                         

                                                        Harbs

                                                        • 26. Re: what's the difference between a plug-in and a script?
                                                          Steven.. Level 3

                                                          All in all, this thread confirms a thought I have had for a while. Consumers spend a lot of money to purchase InDesign, however they aren't willing to spend much on script, plug-ins to make their workflow smoother or faster. If they the plug-in or script gives a feature unavailable without it, and its a feature neccesary for their workflow, only then will a purchase be made.

                                                          I would guess that if a poll was taken, 70% or more of regular users would say that they don't have any third-party commercial (not-free) plug-ins. and from the other 30% maybe a third of them spent more then $50 on plug-ins.

                                                          I could be wrong, but just an educated guess from being around the block.

                                                          • 27. Re: what's the difference between a plug-in and a script?
                                                            Harbs. Level 6

                                                            I would say it's much higher than 70%. Probably well over 90%...

                                                             

                                                            Harbs

                                                            • 28. Re: what's the difference between a plug-in and a script?
                                                              Dirk Becker  Level 4

                                                              Harbs,

                                                              I am really relieved. You should already have a package off list / forum, and yes, it would be very interesting to know the relative performance values for that 100 pages document.

                                                               

                                                               

                                                              Harbs and Steve,

                                                              thanks for leading the discussion back to the general topic. 

                                                               

                                                              If you talk about consumers, your estimates might be right - the small Mom and Pop designer (whom I'd still consider professional) has heavily invested on two seats of the master suite plus all those upgrades and they are not really prepared to pay for even more to get it working, even though some of them value their saved time.

                                                               

                                                              On the other end of the range there is an enormous amount of seats where 100s or 1000s of people work together, isolated from the remainder of the world by layers of admins and typical large scale IT staff. These people have their specialized solutions (with 100s of dialogs and panels, database and so forth), and otherwise are shy of compatibility issues and, given the media crisis, also the additional costs at their large scale.

                                                               

                                                              There must also be those mid size agencies and in house documentation departments with similar needs, just at a smaller scale. Some of them even from other industries, who just found out that there is more than Word or XSL:FO. I think they do not frequent our typical places and will only find solutions by accident, strong advertising or if mentioned by their friendly consultant who also held the hand when the original software was installed. Sometimes I really think I should walk up all such shops in the neighborhood and grill them about their specific problems.

                                                               

                                                              Dirk

                                                              • 29. Re: what's the difference between a plug-in and a script?
                                                                Kasyan Servetsky Level 5

                                                                Hi all,

                                                                 

                                                                 

                                                                First of all, special thanks to Dirk and Steven for very interesting information about plug-ins development.

                                                                 

                                                                I dabbled a little in SDK too: completed WriteFishPrice tutorial and played with sample projects a little, but didn't make any progress since. By the way, this tutorial contains numerous typos which makes things much more complicated.

                                                                 

                                                                As far as I understand, if you want to start developing plug-ins you should invest considerable sum of money first — $450 and above — to join a partner support program so that to get debug version of InDesign. Or, alternatively go back to InDesign CS (Version 3). Right?

                                                                 

                                                                I know that a few guys, here on this forum, are experts both in scripting and plug-in development — so I want to put questions to them.

                                                                Is it difficult for a scripter, writing mainly in JS (but also acquainted with AS, VB and Xcode) to learn to make plug-ins? Does scripting experience help in this?

                                                                 

                                                                Is there some free tutorials, articles, manuals, etc., for scripters making their first baby steps into the scary world of SDK? I've found only this one, called "How to remake a script into plug-in": http://forum.rudtp.ru/showthread.php?t=5415 — but it was written in the days of CS.

                                                                 

                                                                I read about feature development with scripting and wonder: is it possible to create a native InDesign's panel with buttons, checkboxes, etc. and bind these UI elements to scripts — so that when a user clicks a button it triggers a script?

                                                                 

                                                                Could someone draw parallels between main concepts in scripting and plug-in development?

                                                                For example, I'd like to know what corresponds to Data browser, Console, OMV, Call stack, etc. in Visual Studio.

                                                                 

                                                                 

                                                                Kasyan

                                                                • 30. Re: what's the difference between a plug-in and a script?
                                                                  [Jongware] Most Valuable Participant

                                                                  I'll leave answering the rest of your (very good!) questions to Dirk et alii, but here's an interesting one:

                                                                   

                                                                  function(){return A.apply(null,[this].concat($A(arguments)))}

                                                                  Does scripting experience help in this?

                                                                   

                                                                  I've also dabbled with plugins for CS (and that without a Debug ID!), but was very happy to see JS processing speed sky-rocketing with CS2 and further on.

                                                                   

                                                                  YES: it absolutely helps if you are an experienced (not a starter!) script writer. Not only because of the discipline of code writing, but also because a lot of the "inner workings" of ID shine through into the scripting DOM. If you are familiar with this, you'll at least have some idea what all those bosses and interfaces are doing.

                                                                   

                                                                  It always surprises me to see InDesign rookies ("never used it b4, can u help me") post questions in the SDK forum. What are they thinking?

                                                                  • 31. Re: what's the difference between a plug-in and a script?
                                                                    Steven.. Level 3

                                                                    Kasyan Servetsky wrote:

                                                                     

                                                                     

                                                                    As far as I understand, if you want to start developing plug-ins you should invest considerable sum of money first — $450 and above — to join a partner support program so that to get debug version of InDesign. Or, alternatively go back to InDesign CS (Version 3). Right?

                                                                     

                                                                    InDesign Debug is given free to developers following guidelines mentioned at http://blogs.adobe.com/notesfrommnr/2005/08/heres_how_to_ge.html#more

                                                                     

                                                                    Kasyan Servetsky wrote:

                                                                     

                                                                     

                                                                    Is it difficult for a scripter, writing mainly in JS (but also acquainted with AS, VB and Xcode) to learn to make plug-ins? Does scripting experience help in this?

                                                                     

                                                                    Like Jongware mentioned there are 2 parts, knowing InDesign and understanding Object Oriented C++. To understand InDesign scripting experience will help, but it's still necessary to read and understand the "programmers guide.pdf" included with documentation. For Object Oriented C++, prior experience goes a long way. I personally have done lots of ATL and WTL Com programming, which helped me out immensely.

                                                                     

                                                                    Kasyan Servetsky wrote:

                                                                     

                                                                    Is there some free tutorials, articles, manuals, etc., for scripters making their first baby steps into the scary world of SDK?

                                                                     

                                                                    Not that I know of. All there is, are the many examples of the SDK. I use Locate32 app to full-text-search of sample files to find examples to learn more about API.

                                                                     

                                                                    Kasyan Servetsky wrote:

                                                                     

                                                                     

                                                                    I read about feature development with scripting and wonder: is it possible to create a native InDesign's panel with buttons, checkboxes, etc. and bind these UI elements to scripts — so that when a user clicks a button it triggers a script?

                                                                     

                                                                    Yes, it can be done. However the UI is from the hardest parts of SDK to get used to, making it questionable if you wan't to have to compile plugin for each platform and version so that your UI looks built-in. Besides, text seems to take up more space on mac dialogs or panels, making it sometimes necessary to change numbers based on platform, where ScriptUI (if used correctly) and InDesign scripting dialogs do panel layout for you.

                                                                    • 32. Re: what's the difference between a plug-in and a script?
                                                                      Dirk Becker  Level 4

                                                                      Hi Kasyan,

                                                                       

                                                                      The semi official way to get a hold on the debug build (highly recommended) is described in this 2005 blog entry:

                                                                      http://blogs.adobe.com/notesfrommnr/2005/08/heres_how_to_ge.html

                                                                      I do not know whether this information has been revised.

                                                                       

                                                                      I have to pass the question on difficulty if you come from JavaScript, as my C and C++ experience predates JavaScript by a decade. I can imagine hard times if you are only used to flat semi procedural JavaScript, on the other hand there are also advanced/twisted libraries in browser scripting. Jongware's quote is on the point. I've seen some Java (non -Script) developers despair, others succeed. Even to regular C++ developers the learning curve is steep, because the object model is BIG and has its specialties. Be prepared for dimensions in the difference of development time, e.g. a non trivial script will take you few hours, the first equivalent plugin will be weeks.

                                                                       

                                                                      Scripting experience helps because it already covers the most relevant  5 or 10 percent of the document object model. Repeat: You'll have an enormous advantage because you already know InDesign in and out, including expected UI behavior, where the average C++ developer does not know the difference between page and spread. You'll completely miss on the object model outside the document - UI, import filters and so forth, most of these classes are just exposed as an enum option given to a scripting method. You still know enough to prevent the worst gotchas of UI. A good introduction to software design patterns will also help.

                                                                       

                                                                      Native user interface is created from resources, which have their own language. Mac veterans will recognize the Rez language, actually the successor ODFRC was abandoned by a joint effort of Apple and IBM ages ago with the OpenDoc technology but is still alive in InDesign.

                                                                       

                                                                      You'd instantiate the resources from minimum code, but full user experience requires plenty glue code. Especially for true palettes you can not map straight to selected objects, but have to follow an abstraction "suite" that anonymizes objects and only passes the respective property. This is just the equivalent to the typical scripter's question "what class has app.selection[0] today?"

                                                                       

                                                                      If you know your way around in the object model, the major work is hook into the relevant notifications, advanced behavior (drag and drop) is also extra work. If you do not want to follow the selection, you can simply watch the widgets from an observer class and fire off scripts. Of course as I said this will break the expected user experience.

                                                                       

                                                                      The SDK itself has plenty examples, generated documentation and programming guides. Admittedly some of the examples show their age, others are taken straight from working code. We once started a wiki again sponsored by MNR, but unfortunately the typical developer is too busy to even copy and edit responses he received for free into the wiki. The fewer of us that actually answer also have their regular work. Maybe the login process was just too much asked.

                                                                       

                                                                      Parallels:

                                                                      - data browser => that would be the debugger, for your own classes. Problem here is most data is hidden in methods of interfaces, which are not displayed by a debugger. In other words, I maintain my "sniffing" plugin, there are also many obscure trace options in the debug build, but no silver bullet. The scripting data browser or an IDML file already get close.

                                                                      Console => there is a "debug window" application, again only for the debug build. Trace output is removed on compile time for the release build. VS has a console panel.

                                                                      OMV => unzip the generated HTML files. This command shows the size: du -s -h /Adobe/ID6SDK/docs/references/sdkdocs

                                                                      599M

                                                                      Call stack => again standard feature of XCode and Visual Studio. XCode / gdb is better to recover from call chains that include Adobe code, VS is lousy in that regard. XCode has other problems. For editing I still prefer CodeWarrior which was killed by Motorola around CS2 when Apple chose the Intel way.

                                                                       

                                                                      Quote from Jongware: It always surprises me to see InDesign rookies ...

                                                                      The tough ones learn patience and survive.

                                                                       

                                                                      Steven also beat me: "I use Locate32 ..."

                                                                      Yes, you will need a good full text search, I prefer the builtin of OSX but will try Locate32. VS is crawling by comparison.

                                                                      "text seems to take up more space" ... I start at Mac and only change details like expected button locations.

                                                                       

                                                                      Dirk

                                                                      • 33. Re: what's the difference between a plug-in and a script?
                                                                        Steven.. Level 3

                                                                        Dirk, you seem to use the mac as your development machine while I work on windows. (I actually borrow a friend of mine's mac for compiling on mac)

                                                                         

                                                                        Locate32, I think is Windows only, where build-in search is very slow. I like locate32 because I can save Search locations and reuse from dropdown.

                                                                        The problem is that it doesn't show where in the file the text is found. So I drag all the results into notepad++ and run a search on all files.

                                                                         

                                                                        Oh by the way, how much $ you sell your "sniffer" plug-in I only need 1 license.

                                                                         

                                                                        Also on Windows, all the documentation comes as a single chm file with built-in texual search.

                                                                         

                                                                        However, the most frustrating thing in my InDesign development is that even with debug version, there is very little information available via the immediate window since everything is hidden behind undefined functions.

                                                                         

                                                                        For editing, I guess i'm a little old school, I still like using a text editor like notepad++.

                                                                        • 34. Re: what's the difference between a plug-in and a script?
                                                                          Kasyan Servetsky Level 5

                                                                          A great big thanks to everybody who responded me!

                                                                           

                                                                          I read this blog entry about a year ago, when I was playing with SDK and looking for any information related to it, but all links turned out to be outdated and broken — so I was (and am) unable to get a free ASN web listing. Or, should I just skip this step and e-mail to mnr directly?

                                                                           

                                                                           

                                                                          Kasyan

                                                                          • 35. Re: what's the difference between a plug-in and a script?
                                                                            Harbs. Level 6

                                                                            You are probably going to need the listing to do any real work in the SDK. You will need your own prefixes, etc...

                                                                             

                                                                            If the links are broken, send Mark an email. He's a really helpful guy, and he'll probably sort it out for you...

                                                                             

                                                                            Harbs

                                                                            • 36. Re: what's the difference between a plug-in and a script?
                                                                              Steven.. Level 3

                                                                              sign up here https://www.adobe.com/cfusion/partnerportal/index.cfm and send email.

                                                                               

                                                                              These day's I think its part of your regular login.

                                                                              • 37. Re: what's the difference between a plug-in and a script?
                                                                                [Jongware] Most Valuable Participant

                                                                                Steven.., if you only like Notepad++, you'll love TextPad. It has full-text search in any folder and any set of files, and you can double-click the found items to immediately load&locate the original line. It has a better GREP than InDesign. It's highly configurable -- I used to compile and run BCC program directly from within it, and that's possible with any command line utility, even the ones you write yourself (in BCC, for example: run & compile, then run your own program and catch its output ... et cetera).

                                                                                 

                                                                                How does Notepad++ do with h-u-g-e files? I wrote a disassembler and loaded its output immediately into TextPad. One text file, 10 MB -- no sweat drop anywhere, not with paging up and down, not with searching, not even with replacing. It has no problem at all with the measly 6 MB JS Help XML.

                                                                                Being new on the Mac, I haven't found a plain text editor yet that even comes close, and missing it dearly already 

                                                                                • 38. Re: what's the difference between a plug-in and a script?
                                                                                  Dirk Becker  Level 4

                                                                                  Steve, you know you can drag the panels around in VS? Close, build a pile, create groups, and so forth.

                                                                                  I use Macs for myself because I'm faster with them but if a client insists I'll also do Windows only jobs.

                                                                                   

                                                                                  In case you were not kidding: That plugin is not for sale, it is a major unique selling point of my consulting business. Besides it needs heavy customizations for every other task. You definitely learn what interfaces not to use on certain notifications.

                                                                                   

                                                                                  Dirk

                                                                                  • 39. Re: what's the difference between a plug-in and a script?
                                                                                    Steven.. Level 3

                                                                                    [Jongware] wrote:

                                                                                     

                                                                                    Steven.., if you only like Notepad++, you'll love TextPad. It has full-text search in any folder and any set of files, and you can double-click the found items to immediately load&locate the original line. It has a better GREP than InDesign. It's highly configurable -- I used to compile and run BCC program directly from within it, and that's possible with any command line utility, even the ones you write yourself (in BCC, for example: run & compile, then run your own program and catch its output ... et cetera).

                                                                                     

                                                                                    How does Notepad++ do with h-u-g-e files? I wrote a disassembler and loaded its output immediately into TextPad. One text file, 10 MB -- no sweat drop anywhere, not with paging up and down, not with searching, not even with replacing. It has no problem at all with the measly 6 MB JS Help XML.

                                                                                    I guess spending money on a text editor is a hard sell, however Jongware you are a good salesman

                                                                                     

                                                                                    [Jongware] wrote:

                                                                                     

                                                                                    Being new on the Mac, I haven't found a plain text editor yet that even comes close, and missing it dearly already 

                                                                                    I think BBEdit is quite popular, maybe some mac experts could comment

                                                                                     

                                                                                    Dirk Becker wrote:

                                                                                     

                                                                                    Steve, you know you can drag the panels around in VS? Close, build a pile, create groups, and so forth.

                                                                                    Yes I do know. However I'm not sure what I wrote that prompted response.

                                                                                     

                                                                                    Dirk Becker wrote:

                                                                                     

                                                                                    In case you were not kidding: That plugin is not for sale, it is a major unique selling point of my consulting business. Besides it needs heavy customizations for every other task. You definitely learn what interfaces not to use on certain notifications.

                                                                                    I was kidding, thinking that even Harbs couldn't make a Scipt/Extension/Plug-Script etc.. to compete with such a capable product.

                                                                                    1 2 Previous Next