[JS][CS3] Script to edit script

HI
I have made a script that passes values into another script and re-saves the new script.  This works fine, but I really need to save as a binary version.
Is this possible?
Cheers
Roy

Harbs is right, but if your need is to update some litteral or numeric values in a jsxbin where you have preformatted fields, it is possible to directly encode and re-inject the data within, using elaborately the File.seek and File.write methods with your encoder. You'll find a few clues about this technique here: http://www.indiscripts.com/post/2009/11/can-indesign-script-rewrite-itself

Similar Messages

  • Reflection errors in Field Data Edit Scripting context(Line Item class)

    Hello Experts,
    I have a script that does some validation in the Field Data Edit Scripting context of the "Line Item" class, and I  have "MATERIAL" as my target. when i try throwing an Application Exception in this context I get a reflection error message box instead of the message I have passed to the Application Exception constructor.
    your help will be greatly appreciated.
    kind regards,

    One thing to be aware of is that no matter how you choose to construct your exception in field, field data edit and collection scripts, the attribute is always set to the be the taget field/collection. Have you noticed that? The script designers made things that way. What's going on here is that the exception raised in the Interprer is caught by the Script Manager and rethrown with the script target as the attribute and your raised exception as the exception.
    One other thing I would point out is that scripts set to execute on the Collection Member Lifecycle event tend to be poor performers.  You can get a faster result if you edit whole collection and chain the errors onto one ChainException. I can only speculate as to why, but I have seen major improvements in complex scripts if I iterate the whole collection, versus implementing a collection memeber lifecycle validate event. This is counter-intuitive, but there it is.
    Finally, exceptions raised in Collection Lifecycle Events that interupt the overall save process in the prescence of parent document Lifecycle Validation events can result in partially saved data. I observed this issue a few years back and it may be resolved now. The only member lifecycle event I use is Created, to lock, default, etc.
    So, for your particular problem, you may want to rethink your strategy and see if you can get things to work for you bypassing that reflection issue. If you still can't raise the exception on MATERIAL, maybe you can raise it on another field, because another advantage of this approach is that you have full control to raise any error on any field on the Line Items.

  • As3 script to edit sound files -

    A wav or mp3 file will be taped or various. Is there any script to edit these files in batch ie: to Trim the beginnings ie: no sound parts. Or would I have to use a sound editor. As I say I don't want to do it manually. This sounds like a stupid use but it's important as I have children taping themselves and can't use a 3 party product to edit. Perhaps AIR has something in an API.
    Cheers

    Can this be done with differing lengths of white spaces ie: Does the class detect where the white space is and how long it is or do I have to tell it which means it's no good to me.

  • Script to edit conf files: suggestions & comment sought

    I have this script to edit conf files in $XDG_CONFIG_HOME. It works fine:
    #!/bin/sh
    dir=$XDG_CONFIG_HOME/$1
    if [ -d "$dir" ]; then
    for f in $dir/* ; do
    file=${f##*/}
    case $file in
    *conf | config | *.cfg | *rc) $EDITOR "$f" ;;
    esac
    done
    fi
    It has already been pointed out that this could easily be achieved in Bash 4 with:
    #!/bin/bash
    shopt -s extglob failglob
    $EDITOR ~/.config/$1/@(conf|config|*.cfg|*rc)
    The shortcoming with my script is that it only handles files correctly placed in $XDG_CONFIG_HOME, and as many apps litter thier conf files about the shop, I wanted to try something that dealt with those cases. Hence this.
    #!/bin/sh
    dirs=($HOME/.$1* $HOME/.$1/ $XDG_CONFIG_HOME/$1/)
    search=$(find "${dirs[@]}" -type f \( -name "*.conf" -o -name "conf" -o -name \
    "config" -o -name "*rc" -o -name "*.cfg" \) 2>/dev/null )
    for f in $search; do
    $EDITOR "$f"
    done
    ...which again works, but seems pretty ugly.
    I'd appreciate any comments on approaches to the same problem that achieve the result in a more efficient and portable way.
    Last edited by jasonwryan (2011-10-18 02:53:06)

    Instead of:
    search=$(find "${dirs[@]}" -type f \( -name "*.conf" -o -name "conf" -o -name \
    "config" -o -name "*rc" -o -name "*.cfg" \) 2>/dev/null )
    You should either read the results into an array and act on the array, or launch the editor straight from find via exec.
    Using an array:
    IFS=$'\n' read -r -d '' -a files < \
    <(find "${dirs[@]}" -type f \( -name "*.conf" -o -name "conf" -o -name "config" -o -name "*rc" -o -name "*.cfg" \) 2>/dev/null
    (( ${#files[*]} )) && "$EDITOR" "${files[@]}"
    Usind only find:
    find "${dirs[@]}" -type f \( -name "*.conf" -o -name "conf" -o -name "config" -o -name "*rc" -o -name "*.cfg" \) -exec "$EDITOR" {} +
    I prefer the second method -- its right to the point and isn't shell specific. It is, however, somewhat GNU find specific.

  • Editing Script Component in VS2013 launches VS2012?

    New SSIS developer here.
    Using VS Premium 2013 RTM (12.0.21005.1 REL) with SSDT 12.0.30919.1 and SQL Server Integration Services.
    I have a Business Intelligence -> Integration Services project (an SSIS project), and when I create a Script Component in a Data Flow Task and click "Edit Script...", it launches Visual Studio 2012.
    The ScriptLanguage property for the Script Component is set to "Microsoft Visual C# 2012". I don't see an option for "Microsoft Visual C# 2013" (if such a thing exists?).
    Questions:
    1. How can I set VS2013 to call VS2013 (and NOT VS2012) for editing the C# in my Script Component? I can create/edit/build a straight C# project just fine in VS2013, so how to do I get VS2013 to edit C# in the Script Component instead of launching VS2012?
    2. What is the relationship between the version of Visual Studio ("Visual Studio 2013") and the version of the languages available/defaulted in the ScriptLanguage setting ("Microsoft Visual C#/Visual Basic 2012")?
    Thank you very much for your help.

    Answer:
    You cannot as the Script Task is done via VSTA which is VS 2012 Shell. And there is not such need;
    Arthur
    MyBlog
    Twitter

  • AW memory error when clicking "Edit Script" on ICM 7.2.7 Script editor

    I have installed a new AW/HDS(ICM 7.2.7).Installation went on smoothly but when i open a exist script through script editor and click "Edit Script", I get memory error "The instruction at "0x7c1..the memory could not be read" and the script editor closes automatically. I am able to make changes in Configuration Manager without any issues.The new server is configured as a secondary pointing to a primary distributor in a different region.Let me know if anyone has faced this issue or have any idea.All the ICM processes on the server looks fine. I am able to open the same script from other AWs without any issues.
    Thanks
    KMS

    I would run "Initialize Local Database" on the secondary to drop the local AW DB and rebuild it from the Central Controller.
    Then I would try stopping the primary Distributor so the Secondary establishes the real-time feed to the Router by itself and check.
    Regards,
    Geoff

  • Can't edit script

    Hi,
    I've looked through forums where others have experienced the same problem:
    - text is not editable, and seems to be locked.
    Have tried Ctrl key to try and toggle this off, but only worked once.
    What is the solution to having full access to an editable script please?

    Hi Rohit,
    I can send you the file in a few months after we've concluded filming.
    For now I can't share the file.
    Is this a common issue people have? I discovered a few similar cases in forums online.
    Thanks,
    stefan

  • Upgraded to VS 2013 - cannot edit script in SSIS script component

    I'm running SQL Server 2014 and just recently upgraded to Visual Studio 2013 from 2012. I was attempting to develop an SSIS solution today - the first time since the upgrade - and was blocked because I wasn't able to edit the script for a script component
    in an SSIS package.
    I can add the object to a data flow but clicking on the "Edit Script..." button yields no response whatsoever. No error, no scripting environment. 
    I'm running VS2013 Ultimate with SSDT 2013, and SS 2014 Enterprise. 
    My hunch is that there are components missing somewhere but I don't know enough about this platform to piece together how things are related. I have nearly every option installed for VS2013 except for Windows Phone and app store development.
    I didn't have an issue previously and I'm unsure how to debug this - especially since I'm not a real SDE. 
    Thanks in advance for your help

    Hi Torben E,
    Maybe that you were unaware that you post this issue in Visual Studio Setup and Installation forum. This forum is to discuss and ask questions about the install and setup of Visual Studio. Obviously, this case is out of the scope of this forum.
    I'm unsure which forum is better for this case. Is Visual Studio General forum? Or SQL Server Integration Services forum? But I'd like to find a suitable forum along with you.
    >>I was attempting to develop an SSIS solution today - the first time since the upgrade - and was blocked because I wasn't able to edit the script for a script component in an SSIS package.  
    I see that you upgrade to Visual Studio 2013 from 2012. And you didn't have an issue previously. Do you mean that you can create SSIS project and edit the script for a script component before you upgrade VS?
    >>ERROR: Cannot resolve reference coloader80.dll,processorArchitecture="X86",type="win32",version="1.0.0.0".
    From the error message, it seems that the IDE can't find the coloader80.dll. Can you find this dll in your PC? Does it exist in the path ""C:\Program
    Files (x86)\Microsoft
    Visual Studio 11.0\Common7\IDE\"?
    If you can find it, please try to register the oleaut32.dll as the thread below mentioned to see if this method can solve this issue.
    https://social.msdn.microsoft.com/Forums/en-US/68d89658-b35f-4828-a9b1-31cf5cfc7717/coloader80dll-and-critical-debug-error?forum=Vsexpressvb
    This error is caused by the registration for oleaut32.dll was corrupted, there maybe other dll that also named oleaut32.dll, so visual studio could not
    find the right oleaut32.dll.
    So please download the OleAutClean.msi in this link and run it, to clean all the registration of oleaut32.dll.
    http://download.microsoft.com/download/a/9/3/a93f06e7-5828-460c-a78b-ab89c77b6957/OleAutClean.msi
    Then register the oleaut32.dll again.
    1.     
    Right click the Commandline to run the commandline as administrator.
    2.     
    In the commandline, run the following command if you are using Win7 or vista.
    regsvr32 "%CommonProgramFiles%\microsoft shared\VS7DEBUG\coloader80.dll" . Then you will see a dialog that shows the registration
    successes.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Script Editor takes forever to load with SSIS 2012 packages in VS 2012 when you click on Edit Script... button

    Hi,
    I'm upgrading some SSIS Packages to the SQL 2012 Project deployment model. However, when I click on the Edit Script... button in a Script Editor Task, Visual Studio just sits there for minutes until it sometimes opens, sometimes doesn't. Surely this should
    open up pretty much instantaneously. Can anyone shed any light on why this is happening ?
    Thanks
    Dave Evans

    Hi Dave Evans,
    It might be due to permission issue, please try to uncheck "Check for publisher’s certificate revocation" under the "Security" group in "Advanced" tab in "Internet Options", please see:
    http://stackoverflow.com/questions/13540151/ssis-script-editor-loads-very-slow 
    Thanks,
    Eileen
    Eileen Zhao
    TechNet Community Support

  • How can i edit script component in another machine?

    Hello everyone,
    i am using sqlserver data tools to build a package..
    i have alot of script components...the problem is i wrote this package in machine A ... when i take the whole solution in machine B 
    i can not edit or see the script components projects files etc...
    am i missing an atribute at package solution/project file?
    because in ssis 2008 r2 version i can edit all of components (script componet,oledb source component...etc.)
    ...but  in 2012 version of ssis i can not edit script component project..
    thanks a lot..
    evgeni

    Evgeni
    because in ssis 2008 r2 version i can edit all of components (script componet,oledb source component...etc.)
    ...but  in 2012 version of ssis i can not edit script component project"
    I guess you need to upgrade the package/solution 1st to the SSIS 2012 format.
    You need to go to Start-Microsoft SQL Server 2012->Integration Services and choose
    Project Conversion Wizard .
    Once the project (not just a package) is converted to SSIS 2012 open it in SSDT, access your Script Component and then choose
    Design Script button
    Arthur My Blog

  • Writing Cleint side scripting to edit internal table

    Hello Gurus
    I have a internal table which i am displaying  in tableview . i want to add record into the itab when i i click on one button on the form.
    I want to do it this action in the client side using abap script of java script.
    I am not sure how to handle internal table with java script. and one more question is that how to write client side abap script.?
    Is there any recommendation?
    Thanks
    Hari

    I guess you didn't quiet understand my question.
    1. Can i access page attribute s( ex:iinternal table ,or string variable )  in the client script.( java script which runs on client browser ).
    2. If the above answer is yes, how to add a record into intertal table with java code . ( syntax ) .
    Thanks for the help.
    Thanks
    Hari

  • Save a script or copy a script with SQL Script  editor

    Hello,
    I try to rename a script in the script repository I've loaded using the upload command.
    I enter the new script name in the text field and save with the new name as the pdf doc explain (page 18-8).
    It does not create any new script in the repository.
    Also when i make a change and save it does not save the modification and the last modification date remains the upload date.
    Can you help me ?
    Thx.
    Jean-Paul

    Scott,
    Thx for your help. I use Application Express 3.1.0.00.32 and the document I refer is Application Express User’s Guide Release 3.1 E10499-01 chapter 18 page 18-8 "Copying a script".
    What I do is the following :
    1) upload a file name pks_test with encoding scheme 'Western European ISO-8869-1' (to preserve accentuation characters used in the french language)
    2) Edit it then modify it in the editor then save it.
    3) The re-open it : the modification made at previous step has disapeared !
    4) Change the name from pks_test to test_pks and the name is not changed.
    Also the 'Last Updated' info is updated as if there were no change since the
    script creation time.
    If i do the same steps with the Hosted version of APEX (thx to Oracle) all work
    fine.
    There is a difference between the 2 environment :
    my local (in France) display text in english (Home/Application Builder/SQL workshop ...)
    the hosted (somewhere in the world) display text in french (Page d'accueil/Application Builder/SQL workshop ...)
    Thx for the help

  • To View Calc Scripts and Report scripts via MaxL or Esscmd

    Hi all,
    Can somebody tell how to read any calc script or report script in any database with the help of MaxL or Esscmd?
    For example if there is any .csc or .rep file, I want to read the context of the file i.e. the script that is written in the file. Is it possible via MaxL or Esscmd?
    Does Hyperion supports this functionality?
    Regards,
    James

    You know that calc and report scripts are text files, right?
    They are typically stored in the database directory, although that is not a requirement; they can be stored in other client-accessible directories and run from there.
    I haven't done it in ages, but is also possible to pass calc and report scripts to Essbase via the API. I can't remember if the API will let you enumerate calc scripts from the database directory. I sort of strongly think yes. Someone who is more knowledgeable will either correct or refute that statement pretty soon. :)
    If you want to list the objects (calcs or reports): http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/techref.htm
    A few things that you can do with MaxL re calc scripts:
    1) execute calculations, including a string that you pass through MaxL: http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/maxl/ddl/statements/excalc.htm
    2) delete calculations: http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/maxl/ddl/statements/drpcalc.htm
    3) list the calcs: http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/maxl/ddl/statements/dispclc.htm
    4) create the calc: http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/maxl/ddl/statements/crecalc.htm
    Report scripts are sort of a poor relation in MaxL (and were in Esscmd as well). You can basically only run a report as kind of export: http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/maxl/ddl/statements/exprt.htm
    So, I think it's mostly there, especially the display object command. BTW, if MaxL can list it, the API can too -- how else does MaxL work?
    Regards,
    Cameron Lackpour
    Edited by: CL on Dec 1, 2008 11:53 PM
    Didn't post the right URLs. Now fixed. CL

  • Run a script from a script

    Can anyone help me run a script from a script to kill an event listener?
    There is an event listener on save. The same script may be run multiple times before changing workflows (which require different sets of scripts).
    The eventual goal is to have a time stamp in a specific text frame that will already have content. The new stamp will overwrite the old, and only happen before close. Right now it's set for "on save" because I can't figure out an if else statement for "before close". I don't want to have to end the session to be able to work different job types. I need to be able to kill the event listener when exiting documents that create one.
    I'm throwing crap at the wall, hoping it will stick. I'm sure there's a better way to handle it. Anyone have ideas.
    CS3 & CS4 javascript
    Thanks

    Here's the kind of thing I use:
      function runShortRanges() {
        var shortRangesScript = File(getScriptPath().parent.parent + "/IndexExtras/ShortRanges.jsx");
        if (shortRangesScript.exists) {
          app.doScript(shortRangesScript);
    In this case, I want to run a particular script in a known location, only if it exists. It's a way of adding optional functionality to a script.
    Dave

  • Browser Script or Server Script run first

    Hi,
    As the tittle above may I know the priorty that siebel would run first ? Browser script or server script first ? Its important for me as my own thumb of rule.
    Cheers.
    Edited by: 928756 on Jun 19, 2012 3:50 AM

    Hi,
    The browser scripts are executed before server scripts!
    for more info & details:
    http://docs.oracle.com/cd/E05553_01/books/PlanUpgdSiebel7/PlanUpgdSiebel7_chapter18.html
    ;-)

Maybe you are looking for