February 22 2007 Adobe Systems Incorporated 1 of 16 ExtendScript Toolkit 2 ReadMe 1. Overview This document contains a list of new features and known issues in this ExtendScript Toolkit 2 ESTK release. The last section describes a few hidden gems like additional Preferences settings or how to customize the editor or add new language definitions to the editor. 2. New Features The ESTK comes with a totally new UI which follows the OS specific UI guidelines i.e. on Windows there is a main window on
↓↓点击展示更多信息↓↓
Mac OS there is no main window. Each document window has its own toolbar where you can connect the document and its script to a target and engines of the selected target and where you find the debugging buttons. The panels are the same panels as for other CS3 applications so they can be rearranged freely. The ESTK can now debug more than one script on different targets at the same time using the toolbar. So for example you can debug a script in Photoshop and while still in debug mode start another debug session with a script in InDesign. The ESTK comes also with a new text engine. This engine supports line wrapping and code collapsing and it supports many different syntax highlighting schemes. A keyboard shortcut editor has been added to the Preferences dialog. A new Favorites panel displays user-configurable lists of source files. An improved Console panel lets users cut copy and paste texts. Single-line scripts can be re-executed by moving the cursor to that line and pressing the Enter key and multiple lines can be executed by selecting them and pressing the Enter key. This release contains an Object Model dictionary for the Core JavaScript Classes as well as for the ScriptUI classes under the Help menu. CS3 applications add their own dictionaries when installed making the browsing of a target applications host model easy and straightforward. To connect to an application click on the quotchainquot icon to the left of the target popup menu in the document window. Hitting any of the debugging buttons such as Run will also automatically launch the target application. There is an option in the Startup preferences to auto-launch the application every time you select the target. Good to know: - If the Shift key is pressed and held during startup the preferences arent loaded. - If the Shift key is pressed and held during shutdown the preferences arent written. 2.1. Find and Replace The ESTK supports a limited set of Regular Expression syntax for the Find and Replace dialog: February 22 2007 Adobe Systems Incorporated 2 of 16 . Matches any character This marks the start of a region for capturing a match. This marks the end of a capturing region. lt This matches the start of a word using the editors current definition of words. gt This matches the end of a word using the editors current definition of words. x This allows you to use a character x that would otherwise have a special meaning. For example would be interpreted as and not as the start of a character set. ... This indicates a set of characters for example abc means any of the characters a b or c. You can also use ranges for example a-z for any lower case character. ... The complement of the characters in the set. For example A-Za-z means any character except an alphabetic character. This matches the start of a line unless used inside a set see above. This matches the end of a line. This matches 0 or more times. For example Sam matches Sm Sam Saam Saaam etc. This matches 1 or more times. For example Sam matches Sam Saam Saaam and so on. It is possible to use the captured regions of a match in the replacement expression by using the placeholder 1 through 9. 1 refers to the first captured region 2 to the second etc. For example if the search string was Fred1-9XXX and the replace string was Sam1YYY when applied to Fred2XXX this would generate Sam2YYY. 2.2. The Adobe Scripts folder On first launch the ESTK creates a folder named Adobe Scripts in the users Documents folder. This is the folder whose contents the Default favorite in the Scripts panel displays. When double-clicking a .jsx file the ESTK acts as an invisible security filter. Before actually launching the file a security dialog pops up asking if it is OK to execute the script. The ESTK treats the Adobe Scripts folder in the users Documents/Adobe Scripts folder as a trusted location. When double-clicking a .jsx file in that folder the ESTK does not display the security alert. 3. Known Issues This section explains a few limitations of the ESTK which will be addressed in a future release. 3.1. Preferences/Favorites - It is not possible to add the root folder of a Macintosh as a favorite. - On the Mac do not create an alias to the ESTK as a shortcut for launching in a folder having been defined as a Favorite. If you do so it is not possible to add more than one Favorites to the Favorites panel. - Aliases are displayed as files in the Scripts pane if the .jsx file filter is not used. Aliases to files must also have the same extension in order to display in the Scripts pane. February 22 2007 Adobe Systems Incorporated 3 of 16 3.2. Window Placement The ESTK attempts to adjust itself to the current layout of the desktop including multiple screens. It cannot detect that a screen has been added or removed without the user having notified the operating system first by using the Desktop Properties Windows or System Preferences Macintosh. Also it attempts to adjust its window size to a new desktop size when it detects that the desktop has changed between program runs. There are circumstances however where manual adjustment of the ESTKs windows is necessary. 3.3. Windows Font Support The Preferences panels cannot display East Asian characters if East Asian language support is not installed in Windows. Also it cannot display files containing East Asian characters correctly if that package is not installed. It is possible however to alter the default font settings see the section about Hidden Gems. 3.4. ScriptUI Programming - When programming ScriptUI dialogs the ESTK ignores breakpoints in callback functions if the dialog is modal. The modal ScriptUI dialog causes the ESTK to go into a modal state where most of the UI is disabled. Therefore it cannot easily switch back into normal debug mode when a breakpoint is hit. - When programming the ScriptUI FlashPlayer widget do not use its playMovie method. The loadMovie method already loads the Flash movie and starts playing. 3.5. Extended Input The ESTK does not fully support Extended Input to enter non-Roman characters such as Japanese. Especially reconversion is not supported. On the Macintosh if you change the syntax highlighting language while in Extended Input mode sometimes strange characters are entered. 3.6. Compiled Scripts If a script is compiled to a .jsxbin file the target directive is ignored. Double-clicking a .jsxbin file does not execute the script in the application that the target directive defines. 4. Hidden Gems 4.1. Preferences In the Fonts and Colors dialog select multiple styles by using either the Ctrl key or the Shift key to change the settings for more than one style at once. February 22 2007 Adobe Systems Incorporated 4 of 16 4.2. Hidden Preferences The ESTK contains a few hidden settings. These settings can be edited manually by editing the Preferences template file defs.xml. The file is located here: Windows: Program FilesAdobeExtendScript Toolkit 2Requireddefs.xml Macintosh: Inside /Applications/Utilities/Adobe Utilities/ExtendScript Toolkit 2.app you need to control-click the application icon and select quotShow Package Contentsquot to open the package. The file is located here: Contents/SharedSupport/Required/defs.xml After editing the file start the ESTK with the Shift key down to have the ESTK revert to the default preferences by loading this file. Note: This will also erase your keyboard shortcuts favorites etc. If desired the other settings of 4.2.1. Enable a Save This File Dialog before debugging To enable a dialog asking to quotSave this filequot before debugging set this XML tag to true: ltdebuggtltsaveBeforeDebuggtfalselt/saveBeforeDebuggtlt/debuggt 4.2.2. Auto-indenting The ESTK supports intelligent auto-indenting. Every time the user types in an opening bracket the indent increases and it decreases for every closing bracket. Change this behavior by setting this XML tag to a different value: ltdocumentgtltautoIndentgt2lt/autoIndentgtlt/documentgt There are three possible values: 0 – auto-indenting off 1 – static auto-indenting – the indents are preserved as the user enters them 2 – intelligent auto-indenting default 4.3. Configuring the Editor The editor loads its setting from the XML file syntaxdefs.xml. The file is stored is the same location as the file defs.xml mentioned above. The structure of this file is quite complex its documentation is beyond the scope of this document. It contains settings for all supported languages such as: - The menu text - The colors to be used - Keyword tables - Which characters to be recognized as word characters - Block indentation support Adding even more language definitions is easy and straightforward. To reload this file after editing start the ESTK with the Shift key down to cause the ESTK to revert to its default settings causing it in turn to load the altered file syntaxdefs.xml. February 22 2007 Adobe Systems Incorporated 5 of 16 5. Third Party Legal Notices This product may include software licensed under terms that requires Adobe to display the following notices. 41 The contents of this file are subject to the Netscape Public License Version 1.1 the quotLicensequot you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/NPL/ Software distributed under the License is distributed on an quotAS ISquot basis WITHOUT WARRANTY OF ANY KIND either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is Mozilla Communicator client code released March 31 1998. The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by Netscape are Copyright C 1998-1999 Netscape Communications Corporation. All Rights Reserved. Contributors: ______________________________________. Alternatively the contents of this file may be used under the terms of the _____ license the quot___ Licensequot in which case the provisions of ______ License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the ____ License and not to allow others to use your version of this file under the NPL indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the ___ License. If you do not delete the provisions above a recipient may use your version of this file under either the NPL or the ___ License. 46 Copyright C 1995-1997 Eric Young eaymincom.oz.au All rights reserved. This package is an SSL implementation written by Eric Young eaymincom.oz.au. The implementation was written so as to conform with Netscapes SSL. This library is free for commercial and non-commercial use as long as the following conditions are adhered to. The following conditions apply to all code found in this distribution including RC4 RSA lhash DES etc... The SSL documentation included with this distribution is covered by the same copyright terms except the holder is Tim Hudson tjhcryptosoft.com. Copyright remains Eric Youngs and as such any Copyright notices in the code are not to be removed. If this package is used in a product Eric Young should be given attribution as the author of the parts of the library used. This can be in the form of a textual message at program startup or in documentation online or textual provided with the package. Redistribution and use in source and binary forms with or without modification are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the copyright notice this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. February 22 2007 Adobe Systems Incorporated 6 of 16 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: quotThis product includes cryptographic software written by Eric Young eaycryptsoft.comquot The word cryptographic can be left out if the rouines from the library being used are not cryptographic related. 4. If you include any Windows specific code or a derivative thereof from the apps directory application code you must include an acknowledgement: quotThis product includes software written by Tim Hudson tjhcryptsoft.comquot THIS SOFTWARE IS PROVIDED BY ERIC YOUNG quotAS ISquot AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE DATA OR PROFITS OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The licence and distribution terms for any publically available version or derivative of this code cannot be changed. i.e. this code cannot simply be copied and put under another distribution licence including the GNU Public Licence. 52 Copyright c 1998-2001 Greg Roelofs. All rights reserved. This software is provided quotas isquot without warranty of any kind express or implied. In no event shall the author or contributors be held liable for any damages arising in any way from the use of this software. Permission is granted to anyone to use this software for any purpose including commercial applications and to alter it and redistribute it freely subject to the following restrictions: 1. Redistributions of source code must retain the above copyright notice disclaimer and this list of conditions. 2. Redistributions in binary form must reproduce the above copyright notice disclaimer and this list of conditions in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgment: This product includes software developed by Greg Roelofs and contributors for the book quotPNG: The Definitive Guidequot published by OReilly and Associates. 54 This software is based in part on the work of the Independent JPEG Group. 74 Copyright 1991 by the Massachusetts Institute of Technology Permission to use copy modify distribute and sell this software and its documentation for any purpose is hereby granted without fee provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation and that the name of M.I.T. not be used in advertising or publicity pertaining to distribution of the software without specific written prior permission. M.I.T. makes no representations about the February 22 2007 Adobe Systems Incorporated 7 of 16 suitability of this software for any purpose. It is provided quotas isquot without express or implied warranty. 82 Pool.c_Copyright 1987 - NeXT Inc. and Graphics.c_Copyright 1988 NeXT Inc. as an unpublished work. All Rights Reserved. 83 The Apache Software License Version 1.1 Copyright c 1998-2000 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms with or without modification are permitted provided that the following conditions are met: 1. Re.