Edit script to be usable in CS3 (place Specific Asset on Page)

Can someone help me edit this script to be usable in InDesign CS3
myLib = app.libraries.item("Library.indl");
myFounds = app.activeDocument.search("[SampleLibrary Asset]");
for (j = myFounds.length - 1; j >= 0; j--) {
app.select(myFounds[j]);
myLib.assets.item("[SampleLibrary Asset]").placeAsset(app.activeDocument);
This use to work in InDesign CS2 but it not working in C2.
I tried placing the script to /Applications/Adobe InDesign CS3/Scripts/Scripts Panel/Version 4.0 Scripts /. But it did not help.
Thanks in advance.

var myDoc = app.activeDocument;
myLib = app.libraries.item("Library.indl");
app.findTextPreferences = app.changeTextPreferences = null;
app.findTextPreferences.findWhat = "[SampleLibrary Asset]";
myFounds = myDoc.findText();
for (j = myFounds.length - 1; j >= 0; j--) {
   app.select(myFounds[j]);
   myLib.assets.item("[SampleLibrary Asset]").placeAsset(myDoc);
app.findTextPreferences = app.changeTextPreferences = null;

Similar Messages

  • 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.

  • I like to edit single letter in the pdf file having more then 1000 page, Example "T" in place of "V" in all the 1000 pages in pdf file. Please let me know

    I like to edit single letter in the pdf file having more then 1000 page, Example "T" in place of "V" in all the 1000 pages in pdf file. Please let me know !

    In a PDF you can´t change single letter.
    You can only try to convert the PDF document into a Word document.
    Now you can search and replace a letter.

  • 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.

  • 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

  • I created a script to add logos to photos at a club and now when I run the script, the script runs but does not actually place anything on the photo itself.  What's going on?

    I created a script to add logos to photos at a club and now when I run the script, the script runs but does not actually place anything on the photo itself.  What's going on?

    He meant post it here, of course, Louie!  How on Earth would you post it "on Photoshop" ? 
    Thank you for the belly laugh. 

  • 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

  • JS: CS3-Change text on master pages

    Hello all,
    I am new to JS and I really need help. I have spent hours researching, but without much success. I have written code in VB before but I am totally new to JS so please be patient with me. Here is what I want to do.
    I publish a monthly trade magazine. Every month when it is time to create the next issue, I open the one that was just completed and do a Save As for the next month. I then go in and delete all the articles and just move around the ads. I have about 20 master pages (left and right combined) and I have to go in and do a find/replace to change the issue date on the top. I don't want to do a Replace All in case it is somewhere else in the document.
    For example, I am about to create the April, 2008 issue. The document will be named 2008-04.indd. I will go to the master pages and find 'March, 2008' and replace it with 'April, 2008'. I am thinking I should use Script Labels and name each text frame on each Master Page so I only change those instances.
    Any thoughts, suggestions, ideas...? Any help would be appreciated. Just remember to talk to me like you are dealing with a 5 year old. Scripting with JS in ID is totally new to me.
    TIA,
    Nancy

    You don't need a script. All you need is a couple of text variables, one with the month, the other with the year. Each month you just change the value of these two variables.
    Peter

  • How To Use Dynamic Menus To Place Manually Created Jspx Pages On Sub-Level

    JHeadstarters,
    Back on the JHS trail and could use some help.
    I started using dynamic menus (see section 9.2 JHS Dev Guide) to setup a custom menu structure and found it could not be easier however I need to solve 2 issues;
    1. How to get more than 2 levels deep on the menus (parent, child, grand-child, etc.)? In the menu structure setup I have created a menu that is 3-levels deep however when it runs you only get 2 levels. Perhaps a template needs to be changed.
    2. How can I assign manually created jspx pages to sub-level menus?
    Scenerio;
    I have JHS generated pages *** AND *** manually created pages. Using dynamic menus to place the JHS genned pages works fine, the problem is how to do it with manually created pages.
    Using Dynamic Menu's I created a top-level menu tab named "warp-core", below it on the next level I have two sub-menus, one named "search" and one named "form" for displaying the results of the search and modifying the rows (don't ask me why they are seperate).
    The problem is how to assign the manually created jspx pages to those sub-menus? Or am I going abouth this the wrong way? Perhaps I could use JHS to generate seperate search and display pages.
    Thanks!
    BG...

    Bill,
    1. Yes, you need to decide yourself how and where you want to render this third level menu. You then create a region file similar to dynamicMenu2Tabs.jspx, just replace the references to level2MenuItems with level3MenuItems. Then create a custom template to call this menu 3 region file.
    For example, you could create a bulleted vertical list for level 3 as illustrated in section 9.1.3 of the Developers Guide (that example is with static menu, but you can use similar technique for dynamic menu)
    2. Instead of a group name, you can specify a JSF Navigation action in the menu administration application. So, you create a global navigation case to your custom page, and you enter this navigation case id in the menu admin app.
    Note that if you want to generate separate search pages, you can do so by setting the advanced search property to "separatePage".
    Steven Davelaar,
    JHeadstart Team.

  • I want to edit properties of the interface windows opened while "Open File", "Save Page As" and interface opened during Downloading of any file.

    I am doing a small project on dedicated web client where in user automatically logs in non-root user and Firefox automatically starts.
    I am using Fedora 14 kernel 2.6.35.12-88.fc14.i686 and Firefox 3.6.16.
    I have installed only Gnome in my computer with no Nautilus or other file browser on it.
    I want to edit properties of the interface windows opened while "Open File", "Save Page As" and interface opened during Downloading of any file.
    Please guide me for this.

    First, I sent an email to the author of PhotoME to inform him of the serious issues his addon caused with Firefox latest versions.
    Now, for those of you who do not have the PhotoME addon and yet experience the same problem that I had and that I described above, I suggest the following strategy.
    As PhotoME did cause these problems with Firefox latest versions, I am pretty covinved other addons probably might cause these problems too. Therefore, adopt the following method.
    Test one addon at a time to see if this particular addon is behind your Firefox issues like the ones I had.
    So, disable one addon only at a time. Then close your Firefox and restart it from scratch and see if you still have your Firefox problems. You must restart the Firefox browser from scratch. If you still have these Firefox problems, re-enable the disabled addon, restart your Firefox (again!) and repeat the same method for every single addon that you have.
    Try to be selective by choosing first addons that are more likely to cause your Firefox problems such as not very well-known or not very popular addons (like it was the case for the PhotoME addon).
    If this method works or if it does not work, report it on this web page so that others can be helped with your comments.
    I hope this method will help you because I was really upset that I had these Firefox problems and I first thought it was the fault of Firefox, only to discover later that this PhotoME addon was the culprit and had caused me such upset.

  • If it is possible a scripting can making contents of a book with the correct page numbers?

    I was wondering if it is possible a scripting can making contents of a book with the correct page numbers.
    I know indesign has already a function that can making contents in a same file, as long as some paragraph styles were indicated to make the contents.
    But if the title on the master page, it doesn’t work.
    If it is possible to make it happen on a whole book, in spite of what I choosing title was on the master page?
    Can somebody help me?
    Thanks!

    I work on one book which has 40 topic that follow immediately, each topic has a title, socalled section headed. They were put on the master page. What I want is the section headed and the each topic's starting number to make a contents.
    Each time, I work on this kind of book, I have to copy them 40 times to make a contents page, and I have to writing down the each section's starting page number and then type in the contents.
    I was wondering if it is a function can help me and let me easily to make a contents.
    can somebody help me
    thanks!

  • When importing images in Pages, how do I set the default object placement to "stay on page" and "no text wrap"?

    when importing images in Pages, how do I set the default object placement to "stay on page" and "no text wrap"?

    Then use a Layout template.
    I am a designer and I use Word Processing templates with layout breaks and all the other tools available because Layout templates are just WP templates with a lot of options removed.
    Pages is not Indesign, but then Indesign is not Pages, …and Pages 5 is not Pages '09.
    Unless your flyers are for the Web, why are you using Pages at all?
    I am curious, what does your post have to do with the O.P.'s question? …and why are you posting it here?
    Peter

Maybe you are looking for