CS3 Script Label not found

Hi all,
Very much a newbie with InDesign Scripting, but I've managed to build a script that does exactly what I want - almost.
It opens a document, looks for a Script Label, and when it's found, it does something with the item's contents. The only problem is that some of the documents don't have a Script Label, and should therefore be ignored. I've taken this code from one of the supplied examples:
var myPageItems = myPage.pageItems.item("myScriptLabel");
var myString = myPageItems.contents;
If there are no items called "myScriptLabel", the second line will generate an error. How do I test whether the myPageItems actually contains any pageItems? I've tried all the obvious things I can think of, but have had no success. I'm sure the answer has to be a simple one.
Thanks,
Bruce

Hi Bruce,
Hm. I thought that this would return an array, but it doesn't--it returns a single page item, even if a.) there are no objects with that label, b.) there is one object with that label, and c.) there are multiple objects with that label. If all you want to do is set some property of all of the returned page items, this is a good thing. But if you want to do something else, it makes it more difficult. Here's a basic script that shows how to deal with it. It's probably quicker than looping through every page item.
var myDocument = app.documents.add();
var myRectangle = myDocument.pages.item(0).rectangles.add({label:"myLabel"});
var myRectangle = myDocument.pages.item(0).rectangles.add({label:"myLabel"});
var myObjectList = myDocument.pages.item(0).pageItems.item("myLabel");
try{
//If the object is not valid, the following line will throw an error.
switch(myObjectList.id.constructor.name){
  case("Number"):
   //Do something with the object.
   alert("Object ID is: " + myObjectList.id);
   break;
  case("Array"):
   //Do something with each object (you can use objectByID to get a
   //reference to each object).
   for(var myCounter = 0; myCounter < myObjectList.id.length; myCounter++){
    alert("Object ID is: " + myObjectList.id[myCounter]);
   break;
catch(myError){alert("eh")}
Thanks,
Ole

Similar Messages

  • Script Component WebService Binary code for the script is not found

    I am using SSIS 2012 to access a Public Web Service
     http://marketinformation.natgrid.co.uk/MIPIws-public/public/publicwebservice.asmx
    However, when adding reference to WebService (not Service Reference),
    I receive the dreaded msg "Binary code for the script is not found"
    I have spent an age ploughing through the forums.
    Many replies seem to suggest not using Script Component to acces WebService.
    Should I write a .NET app  ?
    Any thoughts how I should proceed would be most welcome.
    thanks JohnJames

    Hi JohnJames,
    If I understand correctly, you already add this public web service via Add Service Reference option in the Script Component. Then you receive the error message when you trying to call the bindings and Contract settings stored in app.config file to access
    the web service.
    Please note that we cannot all the web service normal way as SSIS Script Component task doesn’t recongnise the app.config file. To fix this issue, we should define the BINDINGS via code rather than depending on the App.config file. For more details, please
    see the following blog:
    http://social.technet.microsoft.com/wiki/contents/articles/22587.consume-webservice-via-ssis-script-component.aspx
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • The binary code for the script is not found error for the Script component - SSIS 2012

    Hi,
    I'm implementing a SSIS 2012 pkg. For a data flow task, I'm using a Visual Basic 2010 script component with an Oracle input flow. For the script component I've an input column and I've created an output column. Inside the script code I've edited only inside
    Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer).
    The written code is:
    If Year(Row.OFFDATAORI) < 1900 Then
    Row.OFFDATAORIconv = CDate(CStr("1900" + "-" + Right("00" + CStr(Month(Row.OFFDATAORI)), 2) + "-" + Right("00" + CStr(DatePart(DateInterval.Day, Row.OFFDATAORI)), 2))
    Else : Row.OFFDATAORIconv = Row.OFFDATAORI
    End If
    It is to note that OFFDATAORI isn't the name of the input column for the script component.
    When I close the script component I've an error about "The binary code for the script is not found".
    Any helps to me, please?
    Thanks

    Hi,
    I've solved. There was a syntax error, a bit hidden.
    Bye

  • Script Labels Not Working In CC

    Any time I attempt to edit a script label in InDesign CC, the change is not applied.  Clicking off the element results in anything typed being erased. This was a persistent problem for us in CS5 (hitting tab after entering the content made it stick), but was completely resolved in CS6, but is back rearing its ugly head in CC.

    Have you tried searching the forum? There have been several questions regarding this.
    Searching has changed between CS2 and CS4.
    Try putting the script in folder: Applications/Adobe InDesign/Scripts/Scripts Panel/Version 4.0 Scripts

  • CS3-Entry Point Not Found

    Hello-
    I'm running WinXP SP3.
    I have Photoshope CS3 and have recently installed Flash CS4.
    Whenever I double-click a Photoshop file to open/edit it in Photoshop, just as it is about to finish "Initializing panels..." an error box pops up saying: "Photoshop.exe - Entry Point Not Found" "The procedure entry point IsThreadDesktopComposited could not be located in the dynamic link library USER32.dll."
    After the box pops up I press the "Okay" button (that's the only one there) and it then opens Photoshop - which works perfectly.
    No other errors, no missing functions, no lag.
    Still, it's become quite annoying to start the program like this everytime and I'm pretty sure getting an error during start up is a good indication that not everything is 100%.
    Does anyone have any suggestions about what I should do?
    I also attached a picture of what I get in case it's helpful in some way.
    -PT

    You could try resetting your preferences as described in the FAQ.
    http://forums.adobe.com/thread/375776?tstart=0
    You either have to physically delete (or rename) the preference files or, if using the Alt, Ctrl, and Shift method, be sure that you get a confirmation dialog.
    This resets all settings in Photoshop to factory defaults.

  • Install error script is not found

    Hello. Everyone.
    I uninstall Sys9 and install EPM 11.1.2.3 .
    I use  installTool.cmd  for installing EPM11.
    When installation gose to 97% , error message 'スクリプトファイル "C:\Oracle\Middleware\EPMSystem11R1\common\config\11.1.2.0\resource\instance\shortcut.vbs'" がみつかりません。 '.
    I select  install lang English but error message is Japanese.
    Certainly OS langage is Japanese.
    「スクリプトファイル」 means 'script file ’.
    「がみつかりません」 meane 'is not found'
    'c\Oracle\Middleware' is my Middleware Home.
    The script is not exist.
    What is happen?
    OS:Windodw server 2003 Standard Edition

    Install log write "Install is success."
    But I can't configration.
    I can't ignore
    Can you elaborate on Config issue ? I think install would be completed fine.
    You can launch EPM Configurator from Start -> Oracle EPM System -> Foundation Services -> EPM System Configurator. Try it.
    Thanks,
    Santy.

  • Frame Label not found

    I have an FLA with two scenes. The first scene is an
    opening...at the end it goes to the next scene called Main.
    On Main I have a series of buttons....that click to different
    frame labels in Main.
    When I play JUST the scene it works fine...but when it goes
    from the opening into Main...I get this error on all the buttons:
    ArgumentError: Error #2109: Frame label Board not found in
    scene Main.
    at flash.display::MovieClip/gotoAndPlay()
    at ASIS4_fla::MainTimeline/onMouseClickBoard()
    There is a label called Board...and it works with that scene
    alone...any idea why it doesn't work when coming off the previous
    scene.
    Thank you in advance...

    this is on the first frame of the scene...when I do test
    Scene...it works great. But Test Movie I get that error
    btn_boardcert.addEventListener(MouseEvent.CLICK,
    onMouseClickBoard);
    function onMouseClickBoard(event:MouseEvent):void
    gotoAndPlay("Board");

  • Automtor shell script "command not found"

    I want to include the execution of a shell script in Automator. The script just executes a third-party application (actually, pdftk) with certain parameters. I have written the script, saved it in my Home directory as "foo.sh", made it executable, and can correctly call it from Terminal with ./foo.sh. It works as expected.
    But if I include it in Automator's workflow, into action "Run shell script", its execution breaks complaining that "pdftk: command not found". This indicates that the script is correctly found and read by Automator. How is it, that Terminal's bash can find the command, but Automator doesn't ? Have commands to be written in a special way to be understood by Automator ? Perhaps third-party commands are not allowed in Automator ?

    As twtwtw has said, you environment when running Automator is NOT the same as when you are in a Terminal session.
    pwd:
    /Users/harris
    /bin/ls -dlaeO@ .
    drwxr-xr-x  349 harris  harris  - 11866 Mar 14 22:06 .
    id -a:  uid=501(harris)
    gid=501(harris)
    groups=501(harris),
    204(_developer),
    100(_lpoperator),
    98(_lpadmin),
    80(admin),
    61(localaccounts),
    12(everyone)
    $# 0
    printenv: SHELL=/bin/bash
    TMPDIR=/var/folders/zv/zvU6+bMiHTeElG+JIWOdzk+++TI/-Tmp-/
    Apple_PubSub_Socket_Render=/tmp/launch-rVMvHQ/Render
    USER=harris
    COMMAND_MODE=unix2003
    SSH_AUTH_SOCK=/tmp/launch-fH4Gt7/Listeners
    __CF_USER_TEXT_ENCODING=0x1F5:0:0
    PATH=/usr/bin:/bin:/usr/sbin:/sbin
    PWD=/Users/harris
    DBUS_LAUNCHD_SESSION_BUS_SOCKET=/tmp/launch-RIPIu6/unix_domain_listener
    SHLVL=1
    HOME=/Users/harris
    LOGNAME=harris
    DISPLAY=/tmp/launch-ttdbVO/org.x:0
    FRED=3-Mar-2009
    _=/usr/bin/printenv

  • After Effects CS3 error: file not found -43 and TIFFIO failed to open the file

    Hello
    I am experiencing a problem with AE CS3.
    I have several TIFF sequences (with alphas) that are giving me a headache. When I import them into AE, I get an "AEGP Plugin TIFFIO: Failed to open the file" error.
    I researched the forums and found that this could be related to odd formatting of the source media (my TIFF sequence). I created these TIFFs in Maya 2008 and I have imported other sequences made with Maya into AE with no issues.
    Just to be sure, I created a Photoshop droplet that re-saved my TIFFs as Photoshop TIFFs with the same names.
    I re-imported the new Photoshop TIFF sequences (still with alphas) into AE CS3, and I get the same error.
    Any ideas? I don't know what to do next.
    Thanks,
    -------------S

    Your USB drive may have had a weird character in it's name.
    AE can't read CMYK images, that is usually the problem.
    Imported images do not have to conform to any specific sizes (unless you want to go over 30,000 x 30,000 pixels.)
    - Jonas Hummelstrand
    http://generalspecialist.com/

  • Flash CS3 Default.xml not found, can't open any windows!

    So, here's the story. I am now running CC, but I have a very old Flash file that needs to be updated that uses action script 2. I still have a version of CS3 on my computer, but I get this error when I try to open a file:
    The following panel layout is missing or could not be read:
    /Applications/Adobe Flash CS3/Configuration/Workspace/Default.xml
    The application will not have a correct layout. Please load one from Windows—>Workspace Layout
    I click ok, the file opens, but I am unable to get any of my windows (layer, properties, etc) to appear, and Windows—>Workspace Layout does not exist as far as I can see. The last time I opened this program was probably a few years ago. (Not sure if this is relevant, but I recently got a new hard drive, upgraded to Mavericks, and migrated all the files & folders back to this computer with migration assistant) I just need to make some really quick adjustments to this old flash website, please help!
    thanks
    shannon

    uninstall, clean and then reinstall cs3, Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    Downloads available:
    Suites and Programs:  CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.4 (win) 5.4 (mac) | 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • Web Reference inside Script Task causes Binary code for script not found error

    I am attempting to access a SOAP web API (sales force) from a SSIS package. To do this I created a script task.
    Inside the script task I went to Add Service Reference. Then I click advanced to make it a web reference. Then I point it to the WSDL file and give it a name SFEnterprise. It successfully finds and adds the Web Reference to the script task.
    I leave scriptMain.cs alone and I have no warnrings and no errors. Now in the solution explorer I right-click the script task and hit BUILD. I see the message from Output that BUILD succeeded.
    I close the VSTA script editor and now I am back on the control flow window. However I have a red X on the script task with the following message. "The Binary code for the script is not found. Please open the script in the designer by clicking EditScript
    button and make sure it builds successfully"
    But it does build successfully! And I have not even added any custom code except for the web reference using the WSDL file.
    I am using SSIS 2012 and Visual Studio 2012. I have been reading about this binary code error message on Google searches and suggestions about delay validation and turning off pre-compile do not apply to SSIS 2012.
    Is SSIS not capable of doing this?

    I was wanting to use the 2.0 coding style of accessing the soap service which is supported by adding the web reference vs. adding a service reference. But using a service reference instead of web reference actually allows the script task to compile. This
    is really odd behavior. I wonder why one works and not the other.
    Changing my C# code over to service reference coding style to access the SOAP service was still returning an error. When I added a break point I found the error message "Could not find default endpoint element that references contract in the ServiceModel
    client configuration section"when calling new SoapClient();
    I found this page http://www.sqlis.com/sqlis/post/Where-is-my-appconfig-for-SSIS.aspx and after I copied the System.ServiceModel app settings from the script task app.config to the DTSDebugHost.exe.config it was able to successfully login to the endpoint
    during package debug mode.
    This means I will have to edit the SQL Server DTS config files on the prod SSIS server to get the package to actually run in the job agent.
    So for now I am good I think just plugging away at coding what the script task is actually supposed to do now that is can actually login.

  • ScriptMenuAction Label not assigned in CS3 JS

    The below script is working fine in CS4 but in CS3, the label is not assigned properly.
    var myScriptAction = app.scriptMenuActions.add("TestingMenu");
    myScriptAction.label="Automation";
    alert(myScriptAction.label);
    My requirement is, i want to know my parent menu name from the child event.
    var myEventListener = myScriptAction.eventListeners.add("onInvoke", function(event)
                                //Trigger script
                                alert(event.currentTarget.name);
                                 //the above line giving current menu name, but i need parent menu name
    Arivu...

    Thanks Dave
    Based on the information you have posted I have been doing everything correctly. But I am still having no luck.
    I did read an article by David Blatner on InDesign Secrets that talks about using the "Version" folders at http://indesignsecrets.com/using-old-scripts-in-cs3.php
    He mentions at the end a tip for people having trouble:
    >Bonus Script Troubleshooting Tip
    >By the way, Ive gotten a couple of emails from people who simply cant get their scripts to run on their Mac. They even did clean installations and the scripts still dont work. I was flummoxed, but Ryan Russelldedicated InDesignSecrets fancame up with a solution that worked for him. He noticed (with the help of Adobes tech support) that some of his folder names on his hard drive were slightly wrong.
    >Specifically, the folders in this path:
    >User>Library>Preferences>Adobe InDesign>Version 5.0
    >werent named the same as in this path:
    >User>Library>Cache>Adobe InDesign>Version 5.0
    >Apparently, thats all it takes for InDesign to break. He renamed the folders and all his scripts suddenly started working again. I dont know if that will help anyone else, but its worth looking into.
    Now I had a look at both folders and compared the two... they appear to be completely different and don't seem to relate at all. I don't know what I should try based on this suggestion.

  • Command not found error while executing a shell script

    Hello,
    I am a newbie to linux.I am attaching the code which gives me following errors..
    error list:
    1. no such file or directory enviornemnt
    2. command not found
    3. ambiguous redirectline
    Script
    cd $HOME/wkdir
    rm /tmp/*.log
    # source environment
    . ./env
    # Run the install script to setup the database
    # Configure SH account
    sqlplus "/ as sysdba" <<! > /tmp/perflab_install.log 2>&1
    grant connect, resource, dba to SH;
    alter user sh account unlock;
    # create the fetch_n_rows procedure
    sqlplus "$PERFLAB_USER" <<! >> /tmp/perflab_install.log 2>&1
    drop index sales_time_bix;
    drop index sales_time_idx;
    create index sales_time_idx on sales(time_id) compute statistics;
    -- fetch_n_rows: fetches 'n' rows from the specified statement --
    CREATE OR REPLACE PROCEDURE fetch_n_rows(
    stmt VARCHAR,
    name VARCHAR,
    nexec NUMBER := 1,
    nrows NUMBER := 0,
    debug BOOLEAN := FALSE)
    IS
    -- Local variables
    curs INTEGER := null;
    rc INTEGER;
    nexec_it INTEGER := 0;
    nrows_it INTEGER;
    BEGIN
    dbms_application_info.set_module('DEMO', name);
    WHILE (nexec_it < nexec)
    LOOP
    curs := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(curs, stmt, DBMS_SQL.NATIVE);
    rc := DBMS_SQL.EXECUTE(curs);
    nrows_it := 0;
    LOOP
    IF (dbms_sql.fetch_rows(curs) <= 0 OR (nrows <> 0 AND nrows_it = nrows
    THEN
    EXIT;
    ELSE IF (debug = TRUE)
    THEN
    DBMS_OUTPUT.PUT_LINE(nrows_it);
    END IF;
    END IF;
    nrows_it := nrows_it + 1;
    END LOOP;
    DBMS_SQL.CLOSE_CURSOR(curs);
    nexec_it := nexec_it + 1;
    END LOOP;
    dbms_application_info.set_module(null, null);
    END fetch_n_rows;
    show errors
    # Start the workload
    . ./start_workload.sh > /tmp/setup_perflab.log 2>&1
    # Wait two minutes for workload to get going
    sleep 120
    # Modify snapshot interval
    sqlplus -s /NOLOG <<EOF >> /tmp/setup_perflab.log 2>&1
    connect / as sysdba
    set head on
    set feedback on;
    set pagesize 40
    rem -- event to allow setting very short Flushing interval
    alter session set events '13508 trace name context forever, level 1';
    rem -- change INTERVAL setting to 2 minutes
    rem -- change RETENTION setting to 6 hours (total of 180 snapshots)
    execute dbms_workload_repository.modify_snapshot_settings(interval => 2,-
    retention => 360);
    EOF
    Note : start_workload.sh is also in the same directory..
    Any help would be greatly appreciated.

    Please put your script between "code" format delimiters.
    http://wiki.oracle.com/page/Oracle+Discussion+Forums+FAQ
    You can add the line "set -x" at the beginning of your script to see at which line it fails? I suspect the . ./env line.

  • Bridge CS3 (Windows XP) fails to start because Symlib.dll was not found

    Bridge CS3 (Windows XP) fails to start because Symlib.dll was not found? How do I fix this? I've re-installed and the auto updater has run...I even downloaded and ran the patcher application? By the way Bridge CS3 doesn't show up in the CS3 program list in the start menu but it is installed in my program files - I've tried launching it directly from there as well. Bridge CS2 is operating just fine.
    Update: I installed and ran the Adobe Support Advisor, resulting in - Issues: "The module found no solutions to report for the selected log file."
    I tried to package the report and the error read: "The size of the package is too large to be handled with the current configuration! Please contact Adobe Support for additional information."
    I opened a web based report/case number at the Adobe Support Portal about the missing Symlib.dll (including the Adobe Support Advisor error). Their response was: We regret to inform you that complimentary support for your product is not available and/or has expired.

    Did Bridge work before? If so, reset preferences by holding down the Ctrl key when starting Bridge. If successful you will get a Reset Window, choose all 3 options.

  • File not found: Label (variation label page giving error)

    Please bear with me as I have to explain. 
    I have a publishing site with variations.
    English (source)  
    Spanish (target)  
    The site was working fine since the beginning it was created a few months ago. But today something happened to the top navigation in Spanish site. The option in "Navigation" under "Site Settings" selected was "Show current site navigation"
    but it started showing all other links which are not part of it.  
    I then changed it to "Show parent site navigation" upon which it showed correct links based on parent site. So I tried to change it back to "Show current site navigation" but still it showed those incorrect links and not the actual site
    navigation.  
    I thought let's restart IIS which I did and viola it almost solved the problem. Now I could see current site navigation but there was one link missing which I added a couple of days ago.
    I tried to investigate as to what happened exactly and tried to access "Variation Labels" page in site setting but got error "File not found: Label"  
    It turns out somehow there is a field called "Label" in Variations list which is hidden or may be somehow its name got changed. I found out using SharePoint Manager 2013. I could access both English and Spanish site variation settings page by going
    to the page directly and passing their ID but: 
    1. Why did it happen? I mean why all of a sudden SharePoint would do this? Or is it one of those SharePoint things which you cannot explain and this is how it does? 
    2. If let's say somehow "Label" field got deleted then how can I put it back or how to find the new name of this field if it got changed somehow? 
    3. How do I fix Variation Labels page?
    Because of this problem I am also facing another issue and that is there is a page in Spanish in which I have added custom web part that use resource files. It was working fine but after this issue it is showing error that it is not able to find resource files
    when they are actually there and are present all the time.

    what he did he went to List setting directly and compare it with freshly created list in different farm.
    as he mentioned: 
    "by going to _layouts/ListEdit.aspx?List={GUID of Variation Labels list} and compared the field names with the freshly created site collection on a separate VM with variations"
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

Maybe you are looking for

  • MSI P6N SLI Platinum + E6850 + 533Mhz (PC-4200) RAM?

    Hi, I got hold of an E6850 (1333 MHz FSB) CPU for upgrade and I would like to know if it can run with 2Gb hynix RAM (533MHz PC-4200) on my MSI P6N SLI platinum (Rev 1.0). If it will run, how much performance loss would there be compared to using 667M

  • Time Stamp problem while writing data into the excel file

    Hii, All               I am taking the data from the DAQ card of the TOPSCCC with the 8 ms of scanrate for each channel and there are total 16 no of Analog channels in the Card, now i am acquiring the data from the card, time stamping it and writing

  • Netgear WGR614v6 Problems with Ebay and others-Help!!

    Just put in a Netgear WGR614v6 router and I can connect to the internet thru my 2-wire DSL modem (non-gateway1070-b). First issue was that any email I sent out-bound from Mac Mail that had an attachment would just sit in my outbox, I then disabled th

  • Mac Mini - Home Automation

    'just wondered if anyone is using the 'Mini for Home Automation - it would seem ideal (and even more so, perhaps, if a lower-cost cut-down version were also available, then 'could distribute them also task-specifically around the house) Power Mac G4

  • Crystal Reports dynamic parameters data source

    Database: Sybase ASA 9 Crystal: Developer 11 SP4 , activex viewer Application: Powerbuilder 11 I am embedding crystal reports into a powerbuilder 11 application. The crystal reports (.rpt files) are created in Crystal reports developer 11 sp4. The ap