Exceptions from script menus open ExtendScript Toolkit

I'm having trouble with exceptions thrown by scripts that appear in custom menus.
Whenever an error is encountered when thrown by a script executed from one of these menus, it causes the ESTK to open and break on the offending line. For extra frustration, this happens even if the exception originates from within a try/catch block.
To outline what is happening:
I create a file, throw_error.jsx, in which I put one line:
throw "error";
When run from my menu, it opens the ESTK:
If I put this file in the scripts folder and run it from the scripts palette the exception is shown by the standard InDesign script-exception dialog:
Any ideas how to stop the ESTK catching the error?
[Edit] Sorry, I can't get it to embed the images properly [/Edit]

Don't use Alt for script shortcuts; holding down Alt while firing up a script in InDesign instructs InDesign to open the script in ESTK.
Dave

Similar Messages

  • Can´t prevent ExtendScript Toolkit from starting debug mode

    Hi,
    i have developed a panel in configurator and have installed it in my plugins folder in ID 5.5
    If i click buttons, it opens ExtendScript Toolkit and shows me one single yellow line. If i click "Debug" > "Run" it executes
    my script, but i have to click "Run" for each button i click in my panel.
    It happens only on my computer. On other machines its running fine.
    Is there a way to prevent this permanent debug mode startup?
    Many thx,
    Sven

    Could you provide more information? Which button do you click? The script in the editor of ExtendScript Toolkit.

  • [JS] Open from scripting specific paragraphStyle palette

    Hi!
    Can I open the InDesign palette of a specific paragraphStyle from script JS, for managing properties of style?
    Thanks!

    I'm thinking that what you're thinking that he's thinking is not entirely correct. You are correct in that you don't need to open the dialog to change anything there, but I think that he doesn't want to change anything by script (probably because he thinks he can't do that) -- he just wants one of us to do a script that opens the Paragraph Style Options dialog.
    It looks as though you were right, by the way. This:
    // the "Style Options" item in the par. st. panel
    app.menuActions[172].invoke();
    produces this error: "The requested action opened an asynchronous previewable modal dialog. This is not compatible with the scripting architecture, and so the dialog has been automatically dismissed using the default button."
    But maybe we should wait and see what Leonardo really thinks!
    Peter

  • Removing Open With dialog from contextual menus

    Does anyone know how to remove the "Open With..." option from contextual menus?
    Thanks

    musicwind95 wrote:
    What are you trying to do?
    I'm hoping to find an option to remove the Open With dialog which I never use. If I right click on a simple JPEG to move it to the trash and happen to land on the Open With dialog it takes almost ten seconds to populate the dialog before I can move off of it. It is a consequence of having, and using, hundreds of applications. I'm also an extensive user of contextual menus. I get stuck with that unexpected delay numerous times each day. It is annoying.

  • [Win]: Can't install ExtendScript ToolKit 2 - Problems with an already installed E'Script T'Kit 2?

    Hi
    I have problem to install ExtendScript ToolKit 2. I had installed ExtendScript ToolKit 2 and removed it with the Uninstaller. Now I want to reinstall it but it doesn't work. The setup says there is a conflict with the already installed ExtendScript ToolKit 2, but I have removed it.
    What can I do?
    I have searched in the registry about keys with the ExtendScript ToolKit 2 and removed it, but no success. I have searched in the file system for ExtendScript ToolKit 2 and removed all, no success.
    How can I force the installation?
    Thanks
    Hans

    I have just had exactly the same problem and I ended up telephoning Adobe support - officially free products such as the ExtendScript Toolkit 2 do not get telephone support.
    The person I spoke to at Adobe suggested I run the CS3Clean utility, and that worked for me. See http://www.adobe.com/go/kb402767
    BE SURE TO READ THE INSTRUCTIONS IN FULL FIRST
    In my case I only needed to run level 1 in the utility. Bit of a pain though to have to uninstall everything and re-install.

  • CS6 Extendscript Toolkit won't start on my Windows 7 64bit machine...

    When launching ExtendScript I just get a blank application window with a totally unresponsive ui. I don't get a blank document on startup, I can't use any hotkeys, buttons or menu items to create or open a document. Compeletely dead. I tried deleting the preferences for it but that did nothing. I have uninstalled and reinstalled twice already. Searching the forums did not return much except for the deleting the preferences tip. Anybody have a clue as to why this is happening? The rest of the suite works fine bt I need the extendscript to do my job here.
    Thanks,
    James

    Okay, I just figured out why it wasn't working and it's really stupid on both mine and adobe's part. At least I think so anyway. I downloaded the scripting guides for photoshop and illustrator because my install did not come with them. The reason the toolkit didn't start properly was because I wanted to keep all the scripting guides and docs in one place and put them in the sdk doc folder in C:\Program Files (x86)\Adobe\Adobe Utilities - CS6\ExtendScript Toolkit CS6\SDK\English
    As soon as I removed them the toolkit started up fine. Yeah, I know, I shouldn't be putting stuff like that in the program files folder but really? Not starting becasue I put a few pdf's in its install folder? I was totally reaching for straws when I decided to move those pdf's out of there and just had to do a face palm for a day wasted trying to figure this out. Anyway, maybe my mistake will help others in the future.
    James

  • C# Script to open and read an Excel spreadsheet with multiple worksheets

    Can someone provide me the C# syntax and Edit Script to open an Excel spreadsheet with multiple worksheets and then using the data to create and output a .csv file? The multiple worksheets contain different data elements that I'll need to parse out and then
    store as a .csv file that will then be read to pump data into our SQL Server Database.
    Thanks for your review and am hopeful for a reply.
    PSULionRP

    I think this code originally came from Joel, who comes here quite a bit.  I'm not a C# expert, like Joe is, but I think this is pretty close to what you want.
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using Excel = Microsoft.Office.Interop.Excel;
    using Microsoft.Office.Interop.Excel;
    using System.IO;
    namespace WindowsFormsApplication2
    public partial class Form1 : Form
    public Form1()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Main();
    public void Main()
    string filePath = "C:\\Users\\Ryan\\Desktop\\MainExcel.xlsx";
    Microsoft.Office.Interop.Excel.Application xlobj = new Microsoft.Office.Interop.Excel.Application();
    Workbook w = default(Workbook);
    Workbook w1 = default(Workbook);
    Worksheet s = default(Worksheet);
    Worksheet s1 = default(Worksheet);
    Worksheet xlsht = default(Worksheet);
    xlobj.Visible = true;
    int intItem = 1;
    DirectoryInfo dirSrc = new DirectoryInfo(@"C:\Users\Ryan\Desktop\Test_Folder\");
    foreach (FileInfo ChildFile in dirSrc.GetFiles())
    try
    // Renaming the excel sheet
    w = xlobj.Workbooks._Open(ChildFile.FullName,
    Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing);
    w1 = xlobj.Workbooks._Open(filePath,
    Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing);
    //this doesn't make any sense
    //w1 = xlobj.Workbooks.Open(filePath);
    //if (intItem > 3)
    Excel.Worksheet lastSht =
    (Excel.Worksheet)w1.Worksheets[w1.Worksheets.Count];
    xlsht = (Excel.Worksheet)w1.Worksheets.Add(Type.Missing,
    lastSht,
    Type.Missing, Type.Missing);
    s = (Excel.Worksheet)w.Worksheets[1];
    s1 = (Excel.Worksheet)w1.Worksheets[intItem];
    s1.Name = ChildFile.Name;
    // it will copy and paste sheet from one to another with formula
    s.UsedRange.Copy(Type.Missing);
    Excel.Range r = s1.get_Range("A1", Type.Missing);
    r.PasteSpecial(Excel.XlPasteType.xlPasteValues,
    Excel.XlPasteSpecialOperation.xlPasteSpecialOperationNone,
    Type.Missing, Type.Missing);
    s1.UsedRange.Formula = s.UsedRange.Formula;
    // Renaming the excel sheet
    //w.Save();
    w.Close(false, Type.Missing, Type.Missing);
    w1.Close(false, Type.Missing, Type.Missing);
    catch (Exception ex)
    //w.Save();
    w1.Save();
    w.Close(false, Type.Missing, Type.Missing);
    w1.Close(false, Type.Missing, Type.Missing);
    intItem = intItem + 1;
    //Dts.TaskResult = ScriptResults.Success
    Do you need help getting everything into a CSV, or can you take it from here???
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Run javascript (not in a jsx file) from the command line extendscript

    Hi all,
    I was wondering if anyone knew how to run javascript from the command line in Extendscript (meaning Extendscript would be the target application). I know about the -run command line flag in which allows you to run a .jsx script from the command line but what I'm looking for similar syntax to run a script directly without needing to put it in a file. For example I have tried (obviously unsuccessfully):
    C:\Program Files (x86)\Adobe\Adobe ExtendScript Toolkit CC\ExtendScript Toolkit.exe -run "alert('Hello World');"
    Thanks!

    You might be looking for something like this: javascript - Is it possible to execute JSX scripts from outside ExtendScript? - Stack Overflow
    Although that one is about executing JSX files, the solutions given (Applescript as well as COM/VBScript) can be adapted to simply run a javascript code snippet rather than JSX file because the solutions simply call the Adobe app's Applescript/COM API to "execute javascript" (actually execute ExtendScript technically), and in the solution, they using includes to pull in the JSX file. You'd simply replace the include with actual javascript code snippet inserted in.
    Though this would then require you to run a VBScript, Applescript, or other script (that calls the COM/Applescript API) rather than the ESTK command line option.

  • Calling an action in extendscript toolkit

    Is there a possibility to execute an action by extendscript toolkit?
    Name of action is: test.
    In the action is defined that all layers must be unlocked + unlock all items + select all + Edit>edit colors>convert to grayscale
    I hope someone can give me a hint

    you are correct Mark, Javascript could write a VBS file and run it via File.execute(). For simplicity, I wrote the VBS file myself and had JS call it.
    the action in this sample is called "selectAll" and lives in the "Set 1" action set.
    the vbs file is saved as "Hello Test.vbs", the sample adds a "Hello World" text frame, counts all text frames, then calls the action to select all items.
    'Sub testSelectAllAction()
        set Iapp = createobject("illustrator.application")
            Set Idoc = Iapp.ActiveDocument
        set tFrame = Idoc.textframes.add
        tFrame.contents = "Hello World"
            MsgBox Idoc.TextFrames.Count
        Iapp.DoScript "selectAll","Set 1"
            Set tFrame = Nothing
            Set Idoc = Nothing
            Set Iapp = Nothing
    'End Sub
    call the VBS file from Javascript like this
    var file = File('/c/Users/carlos.canto/Documents/Adobe Scripts/Hello Test.vbs');
    file.execute();

  • Uninstall Adobe Photoshop Element 9 \ Adobe ExtendScript Toolkit CS5

    Silent uninstall | Photoshop Elements 9
    hi everyone, I hope I could find an answer to my problem here:
    I have a volume licence for adobe photoshop elements 9.0, and I'm trying to uninstall it silently.
    I've read the documentation here: http://kb2.adobe.com/cps/876/cpsid_87681.html but I still can’t uninstall the Adobe ExtendScript Toolkit CS5. Anybody knows what’s the command to uninstall Adobe ExtendScript Toolkit CS5.
    This is the command I’m using install the Adobe Photoshop Elements 9:
    Start /wait C:\"Adobe Photoshop Elements 9"\Setup.exe /UL1033 /V"SERIALNUMBER=XXXX-XXXX-XXXX-XXXX-XXXX-XXXX"
    This is the command I’m using to uninstall Adobe:
    start /w Msiexec /x {007F778D-F15C-4EAB-AE92-071D21FAF632} NOT_STANDALONE=1 /qn
    start /w Msiexec /x {433EACD8-4747-4A6A-826A-FFA9F39B0D40} NOT_STANDALONE=1 /qn
    start /w MsiExec.exe /x {F302F4F0-588D-6501-1ACF-BE3FDCC9135D} /qn
    cd "c:\Program Files\Common Files\Adobe\OOBE\PDApp\DWA"
    setup.exe --mode=silent --deploymentFile="C:\Program Files\Common Files\Adobe\Elements9STIorPSE\ElementsSTIInstaller.remove.xml"
    rmdir /s /q "c:\Program Files\Common Files\Adobe\Elements9STIForPSE"
    anyone has any idea please please please let me know!
    thanks!
    Jose

    This command will uninstall PSE10 silently -
    To uninstall ESTK or other plug-n use Step-4. [These steps are for PSE10 ,apply version as 9 accordingly in commands]
    Uninstall PSE-10 in silent mode
    Open the command prompt in the administrator mode.
    (Windows XP) Choose Start > Run. Enter cmd in the Run window, and press OK.
    (Windows 7 and Windows XP) Click Start (Windows-Logo), and type "cmd". Press [Shift]+[CTRL]+[ENTER].
    Run the following command to uninstall Photoshop Elements.Verify that the Photoshop Elements 10 folder has been removed from the Program Files folder after running the command.
      start /wait Msiexec /x { EE549AF9-8FAA-4584-83B2-ECF1BC9DC1FF} NOT_STANDALONE=1 /qn 
    After the uninstallation is complete, run the following command to uninstall Elements Organizer. Verify that the Elements 10 Organizer folder has been removed from the Program Files folder after running the command.
    start /wait Msiexec /x {22D3A614-482C-444A-932C-9DA1B8ECDFD2} NOT_STANDALONE=1 /qn
    After Elements Organizer has been uninstalled, run the following commands to uninstall STIs (ACR, APE, ESTK). The following procedure assumes that you are using the C drive as your boot drive. Modify the command accordingly if you are using a different drive.
      cd "Program Files\Common Files\Adobe\OOBE\PDApp\DWA" 
    setup.exe --mode=silent --deploymentFile="C:\Program Files\Common Files\
    Adobe\Elements10STIForPSE\ElementsSTIInstaller.remove.xml"
    Finally, run the following command:
    rmdir /s "C:\Program Files\Common Files\Adobe\Elements10STIForPSE"

  • How can I download ExtendScript Toolkit for CS6 in the Creative Cloud

    I try to find a way to get the ExtendScript Toolkit for CS6 products. The Adobe Scripting Center states "The latest version of ExtendScript Toolkit (ESTK 3.8) is available with Creative Suite 6." How can I get if from the Creative Cloud"?
    Thank you very much for your help.

    Searching on Google for the same thing and it was much harder than it should have been. Hard to believe that CS6 is from 2006 already! I'm trying to find ExtendScript for CS6 for a project I'm working on. Here's the link I found:
    Adobe - ExtendScript Toolkit : For Macintosh : ExtendScript Toolkit 1.0.3
    and
    ExtendScript Toolkit Archives | Adobe Developer Connection

  • Adobe ExtendScript Toolkit 2 don't find running Indesign Server CS3

    Hi
    I develop a plugin and differnet Javascripts who interact with this plugin. Now I like to debug my plugin and this Javascript. I start the debugger in Visual Studio 2005, this starts my Indesign Server CS3 (Debug) using the port 18383. Now I like to connect with this server in Adobe ExtendScript Toolkit 2, but this application don't find the running server. Adobe ExtendScript Toolkit 2 want do start an Indesign Server, but there is one running.
    I havn't installed the release verision of the server on my PC.
    - Why does Adobe ExtendScript Toolkit 2 dont find the running server?
    - Port?
    - Can I change anything to fix this behaviour?
    Thanks for the help.
    Kind regards
    Hans

    In the meantime I've read some more documentation.
    You can specify a configuration name on the command line, default is "configuration_12345" if the -port is 12345.
    Apparently you can then add the configuration name to the target expression, e.g. create a new script with this line
    #target "indesignserver_configuration_12345"
    Run the script - the target is recognized (no dialog "server ... is not running") and from now on shows up in the target dropdown of ESTK.
    Right now though after a long timeout I can't talk to any scripting engine of my CS4 server.
    The status line displays "Can't initialize target", maybe some startup problem my server is having.
    Dirk

  • Extendscript toolkit won't load

    I'm running CS4 on Windows XP and trying to look at some of the help information in the extendscript toolkit to help with some scripting issues in ID, but for some reason the toolkit simply won't load. I've tried right-clicking on an ID script and then choosing edit script; I've tried running it from the start menu, and the results are the same: sometimes I get a brief hourglass (or not), and then nothing. Has anyone had this experience and figured what to do about it?
    Thanks very much.
    Phil

    You would possibly have to press those keys while starting... and that's hardly possible when the program quits to quickly. I recognize the error you have, but do not remember exactly how I fixed it. There are probably some preferences files on disk (if they are the problem), which can be renamed in order to let new ones be generated. That has been the case with the main application.
    Look for updates for InDesign (Help menu), so you're sure to have the latest.
    Also try resetting the preferences for InDesign (the main application) by pressing Shift+Ctrl+Alt while starting it. If that makes no difference you could have a look (v. google) for resetting/trashing the preferences by hand for the ESTK.
    A last resort would be to reinstall.
    // Andreas

  • CS4 + extendscript toolkit 3.5?

    hi,
    is it possible to use the extendscript toolkit 3.5 with creative suite 4 applications?
    I just installed it (because version 3.0 keeps on crashing after a while), but the only target application that is available is ExtendScript Toolkit CS5.
    isn't it downward compatible?
    or is there maybe some kind of hack to make it work?
    thanks,
    w

    Hey!
    No, it's not possible. You can edit script in ESTK 3.5 but then you have to run it from InDesign.
    tomaxxi
    http://indisnip.wordpress.com/

  • Run external executable from script

    Hi,
    it's possible launch an external executable (Es. .\smsclient.exe "3201234567" "SMSClient.exe Tested on %date% at %time%")  from script .aef (not from CAD)?

    Hi Anthony,
    i have developed a Java class how you said me. I receive the sms, if run application from Eclipse. But if I invoke this class from script .aef not operate. For an simply example i have also created an Notepad example but not open pop up with notepad but also in this case if I run application from Eclipse all correctly function.
    Above there is my script and java source for Notepad example.
    Have you any suggestion?
    ***************************************SCRIPT testNOTEPAD.AEF********************************
    Start
    Do
              testpackage.Notepad AA = new testpackage.Notepad();
    End
    In console i read this output:
    Begin Debugging C:\UCCX_Script_Esempi\TestNotepad.aef...
    when i stop debug:
    Done Debugging C:\UCCX_Script_Esempi\TestNotepad.aef.
    but Nptepad.exe not running
    *******************************************JAVA SOURCE ********************************************
    package testpackage;
    import java.io.*;
    public class Notepad {
          public static void Main(String args[]) {
               try {
                   Runtime rt = Runtime.getRuntime();
                   Process pr = rt.exec("notepad.exe");
                   BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
                   String line=null;
                   while((line=input.readLine()) != null) {
                       System.out.println(line);
                   int exitVal = pr.waitFor();
                   System.out.println("Exited with error code "+exitVal);
               } catch(Exception e) {
                   System.out.println(e.toString());
                   e.printStackTrace();

Maybe you are looking for

  • Can I customize the history grouping?

    If I select Show All History, the history is grouped into TODAY, YESTERDAY, LAST 7 DAYS, THIS MONTH, LAST MONTH etc. The first issue I have with this is that the groups are not mutually exclusive.... eg. I can't delete everything but TODAY and YESTER

  • How to use boolean?

    I now boolean is a data type that returns either true or false but i dont really know how to use it. Can someone please explain it for me with some common examples or codes would be highly appreaciated? One more question, how do you use boolean isDig

  • How to move documents from one iPad to another iPad?

    I have a new iPad and want to move my documents. Is there a quick way to do this?

  • Saving file format - suddenly having problems

    Hi all, I have been using PSE9 on my Intel iMac (OS 10.5.8) for a couple of weeks, and yesterday I started experiencing the following problems: (In Full Edit Mode) 1) When trying the "Save As" command after working on an image, I was getting a messag

  • JSF Tutorial - can't edit css files

    Hi; To edit a css file I ahve to do Open With... Text editor. If I try to just open it, it tells me it cannot find the file. ??? - thanks - dave