InDesign CS3 script that changes fonts on open

Hello.
I am trying to come up with a script that would change a specific group of fonts, that will always show up missing, to the new font. Basically, it is a bunch of our postscript fonts that are now using our open type font. Below is what I have so far. I want to create a list that goes through about 8 fonts that are old and replace them on the fly with the 8 new fonts. This would be great if I could have this happen on open.
Can anyone see what I have and offer some guidance?
thanks
babs
Open this Scriplet in your Editor:
tell application "Adobe InDesign CS3"
   set find text preferences to nothing
   set change text preferences to nothing
   tell application "Adobe InDesign CS3"
       set OLDfont to {"times", "arial"}
       set NEWfont to {"times new roman", "helvetica"}
       --set find what of find text preferences to testString
       tell document 1
           repeat with swap from 1 to 2
               set NEWfont to item swap of OLDfont
           end repeat
       end tell
   end tell
end tell

For starters, you're going to have to use the correct font names, including correct capitalization. The property you want to change is "applied font", not "find what". And it would probably be more sensible, to go through all paragraph and character styles and make the changes there first, otherwise you'll have troubles again every time you edit stuff.
So start off by getting the name of the font used in every paragraph style, and loop through your list to see if they should be changed. Do the same for character styles. And then do the find/change to find any that have been applied manually.

Similar Messages

  • Running InDesign CS3 Script like a service

    Hi,
    Do anybody know if is there any option to run an InDesign CS3 Script as a service or daemon? I would like to execute some actions depending on some others and I need to have an script running all the time and checking for certain states.
    Thanks
    Aleix

    Hi,
    Can you give me information for both cases? The truth is that I need to monitor something related with an InDesign plug-in and maybe one or both methods could help me.
    Thanks
    Aleix

  • HELP:script that iterates through all opened documents and rezise them to match the biggest one.

    Hi,
    I'm making a batch processing action and I really need a script that iterates through all open documents, finds the one with the biggest image size and then iterates one more time to change the rest of the documents to the same image size dimensions. At the end all documents must share identical image size.  I'll really  appreciate if someone can put a quick script for doing this. Thank you !

    I think should do…
    #target photoshop
    if (documents.length > 1) {
         var smallest = 1000000; // Set beyond any size you may be expecting this should do?
         for (var a = 0; a < documents.length; a++) {
              smallest = Math.min(smallest,documents[a].width.as('px'));
         for (var b = 0; b < documents.length; b++) {
              if (documents[b].width.as('px') != smallest) {
                   app.activeDocument = documents[b];
                   var newWidth = new UnitValue(smallest, 'px');
                   documents[b].resizeImage(newWidth,undefined,undefined,ResampleMethod.BICUBICSMOOTHER);
    }else{
         alert("NOT enough docs to resize?");

  • Sechs-Ecken-Objekt mit InDesign CS3-Script / JavaScript ???

    Hallo.
    Können Sie mir evtl.  helfen? Siehe Bild im Anhang.
    Wie kann ich dieses Sechs-Ecken-Objekt (Kontur 1 Pkt nach innen) mit Indesign-Script erstellen ? (InDesign CS3-Script / JavaScript)
    myPolySCHATTEN = myDocument.pages.item(0).polygons.add();   ???
    oder mit
    myPath = myDocument.paths.item(0).add();                                  ???
    Oder... ????
    Freundliche Grüße,
    AndreasRoe aus Germany

    Piece of cake.
    You can either create a default Rectangle or Polygon, and add and move the points around, or -- my preferred way -- add a GraphicLine and add the other points to that path, until you are nearly done. Then set the path type to "Closed", and you are really done.
    For starters, let's create a regular rectangle the hard way:
    var hoehe = 10;
    var breite = 20;
    newrect = app.activeDocument.graphicLines.add ();
    newrect.paths[0].pathPoints[0].anchor = [0,0];
    newrect.paths[0].pathPoints[1].anchor = [0, hoehe];
    newrect.paths[0].pathPoints.add({anchor:[breite,hoehe]});
    newrect.paths[0].pathPoints.add({anchor:[breite,0]});
    newrect.paths[0].pathType = PathType.CLOSED_PATH;
    Run this and experiment with breite / höhe.
    If you look at your drawing, you can see you need an inset value for the chopped off corners. You can also see where to add the new points, when you start counting at top left. That results in this -- notice how breite / höhe are adjusted one by one:
    var hoehe = 50;
    var breite = 100;
    var inset = 4;
    newrect = app.activeDocument.graphicLines.add ();
    newrect.paths[0].pathPoints[0].anchor = [0,0];
    newrect.paths[0].pathPoints[1].anchor = [0, hoehe - inset];
    newrect.paths[0].pathPoints.add({anchor:[inset,hoehe]});
    newrect.paths[0].pathPoints.add({anchor:[breite,hoehe]});
    newrect.paths[0].pathPoints.add({anchor:[breite,inset]});
    newrect.paths[0].pathPoints.add({anchor:[breite-inset,0]});
    newrect.paths[0].pathType = PathType.CLOSED_PATH;

  • InDesign CS3 showing all available fonts

    I have a user with Adobe InDesign CS3 and Extensis Fusion 12.1.7 running on a MacBook Pro 17" and OS 10.4.11. A small window, in the bottom-right of the screen, has a tab named <Character> that allows you to choose a font. When clicking on the double-arrow all fonts on the computer are displayed. The user would like this to only display fonts activated by Fusion - is this possible? I know better than to disable any fonts in /Library/Fonts or /System/Library/Fonts.

    I don't understand that business about a <Character> tab, but I do know that InDesign does not let you pick and choose which fonts to display in its Font menu. Unless there is a plug-in that I don't know about.

  • Is it possible to write a script that changes swf export settings?

    I want to be able to export a swf file that uses a different text anti-alias setting. Is it possible to create a script that can set and export a swf file to my specifications?

    function(){return A.apply(null,[this].concat($A(arguments)))}
    Is it possible to create a script that can set and export a swf file to my specifications?
    It seems there isn't. A script cannot add basic functionality, only access it. In this case, you can't change the setting because there is no 'antialias text' setting in the SWF export settings.
    However, all is not lost. Google turned up this helpful page; it might be possible to edit your SWF after exporting and then re-save it.

  • InDesign CS3 no longer seeing font

    We have a project we just finished which was worked on at different times on three different computers, all InD CS3, Windows XP. The project uses the Britannic Bold TTF font with which we had no trouble during production and a completed / final PDF has gone to the client.
    Now, however, when opening the files on any computer InD thinks it needs the OTF version of that font. The font file hasn't changed nor has anything on those machines related to InDesign, they're all running the latest version of CS3.
    The only thing that HAS possibly updated on those computers is Acrobat 9. Is it possible that InD could be affected by THAT?
    I've seen similar posts about TTF showing as an OTF and I understand that a .TTF file can be an OTF "flavor" font but I've not seen anything else where InD changed (in effect) the type of font it was "seeing."
    Reassigning the font that InD thinks is an OTF with the TTF font doesn't seem to change anything but I'd like to avoid this problem in the future.
    Just now noticed that the OTF that InD thinks is missing its showing as "Regular" but the TTF shows as "Bold" in the InD menu.
    Any help would be greatly appreciated.
    All the Best,
    Ken

    I'm suddenly getting this "AMT Subsystem Failure" message.  I've been using CS3 without any problems for at least a year and I haven't made any system changes for a while so there is no ready explanation why this error message would suddenly appear.  I was using Dreamweaver CS3 yesterday and it was fine.  The only thing I've done today is install a java application used to bid in eBay.
    I visited the adobe forum for MacOS related to this problem and the adobe support article ( http://kb2.adobe.com/cps/402/kb402004.html )
    says to enure that all Adobe and Flexnet services are running and I checked this in my admin tools - > services and they're fine.   I really dislike it when software vendors like adobe tell you to re-install your whole bloody suite.  It's a real cop-out on their part.   I will keep looking for a solution to this stupid and annoying error message.

  • How do I save my file using InDesign CS6 so that it can be opened with CS5?

    I know other people asked similar questions but I can't find anything that helps me figure my issue out.
    Basically, I packaged my file using InDesign CS6. When I sent it to the person it needed to be sent to, she couldn't open it. She was running CS5.
    So now I'm trying to REpackage it still using CS6 but when I make an IDML version and try to package it, it says that I need to SAVE it. Well the only options are CS6, which I can't use again, and another IDML version. If I did the IDML it would just save it as another untitled document and then I'd have to start all over.
    Actually I just tried that, and InDesign crashed.
    Any suggestions?

    Hey,
    There is no such function in InDesign as 'saving to a lower version' (as it is in e.g. FrameMaker). There are interchange formats: obsolete INX (CS2,CS3,CS4) and current IDML (CS5, CS5.5, CS6).
    You need to export (ctrl+e) previously saved document into IDML and attach to existing INDD file (Attaching is not necessary as IDML is a self-sufficient file). Also it's a really good idea to attach a PDF file (from CS6) as there might be some differences when opening a IDML from higher file in lower version program.
    Final package could look like this:
         Document fonts
         Links
              original file.indd
              original file.idml
              original file.pdf
    best regards
    Kuba

  • A few questions about indesign CS3 scripting

    1.     I often do one thing that pressing a Ctrl + ~, followed by a Ctrl + Shift + E. So I have spent one day trying to write a script today but failed to. I am going to be insane sooner or later.
    I have tried this line "app.menus[0].menuElements[10].menuElements[1].shortcutKey" for "Ctrl + Shift + E". This line is the farthest point I can get. It doesn't work.
    2.     if (app.menuActions.item (5262).name == "Stop BlackLining" || app.menuActions.item (5262).name ==  "Start BlackLining")
    is not equal to
    if (app.menuActions.item (5262).name == ("Stop BlackLining" || "Start BlackLining"))
    why?
    3.     I try this line "app.menuActions.item (5262).name" in ESTK. JavaScript Console reads "Start BlackLining".
    When I select and click the menu "Start BlackLining", the menu's contents changes to "Stop BlackLining". See below.
    Then I try the line refered above. JavaScript Console reads "Start BlackLining" again. As you can see, I consider that it should be "Stop BlackLining". The two different menus use the same index in Indesign.
    But when I only click their parent menu "BlackLining" once and then try the line, JavaScript Console reads "Stop BlackLining". That's normal. But how come? Do I click their parent menu to refresh all the menus to make it normal?
    Thanks in advance.

    Thanks for the tips. When I write a script, I will open all the Help Document, Object Model Viewer, Core JavaScript Classes and ScriptUI Classes.
    function(){return A.apply(null,[this].concat($A(arguments)))}
    function(){return A.apply(null,[this].concat($A(arguments)))}There are some reasons to avoid dealing with selections in scripts, but perhaps in this case it is correct to do so. Then you would use app.selection[0].fit(FitOptions.CENTER_CONTENT);
    After reading instruction in OMV, I can't figure it out what exactly "app.selection[0].fit(FitOptions.CENTER_CONTENT);" does.
    As the "Ctrl+Shift+E" is a shortcut customized for starting or stopping the function of the Plug-In "BlackLining" (The  Plug-In's name is BlackLining).
    function(){return A.apply(null,[this].concat($A(arguments)))}
    function(){return A.apply(null,[this].concat($A(arguments)))}In JavaScript you should use === and !== instead of == and !=, unless you want to be tripped up by weird type coercion problems.
    But anyhow, hwy would you think these would be equivalent?
    First, let's write out your first case parenthesized according to the JS precedence rules, so there is no ambiguity:
    ((app.menuActions.item(5262).name=="Stop BlackLining") || (app.menuActions.item(5262.name == "Start BlackLining"))
    Hopefully that's what you expect. Let's suppose it is the start case. Then that will evaluate to:
    ((false) || (true))
    which evaluates to true.
    But your second case is nothing like that.:
    (app.menuActions.item (5262).name == ("Stop BlackLining" || "Start BlackLining"))
    So first the interpreter evaluates ("Stop BlackLining" || "Start Blacklining"), that is, it takes the logical OR of two strings. This is not a very useful thing to do. It will always return the first one. That is ("a" || "b") always evalutes to "a". So then you have:
    (app.menuActions.item (5262).name == "Stop BlackLining")
    and if we're in the start case, then it is: false.
    I think there is no way to make it short, right?
    In fact, it's hard for me to find material of learning script t just execpt serveral PDFs (about basic of script) was added when the software was installed. I learned the C Language before. I try to remember the similar usage in C Language. Maybe I am wrong.
    function(){return A.apply(null,[this].concat($A(arguments)))}
    function(){return A.apply(null,[this].concat($A(arguments)))}As for your third question, well, the language is a bit confused, but menus can change their appearance when they are clicked on. That's a good reason not to use menu names or positions in scripts. Doesn't this blacklining extension (whatever it is) define a stopBlackLining() function somewhere in the DOM? Or someting like that?
    BTW, "BlackLining" is a Plug-In. Is Plug-In equal to extension in English? And DOM is short for document object model? It seems there are a lot more for me to learn.
    I want to tell you what kind of script I want to write. Make it simple. Forgiving my poor English.
    Let's get it started.
    I have to open many documents at the same time and then shut down the plug-in "BlackLining". So I have to press the shortcut "Ctrl+~", which means selecting the next document, and then press the shortcut "Ctrl+Shift+E", which is set by me and means starting or stopping the plug-in.
    When I finished some operions, which can't be proceeding while the plug-in "BlackLining" is on, I have to press the shortcut "Ctrl+~", and then press shortcut "Ctrl+Shift+E" to start "BlackLining".
    I have to do it over and over again day after day. I am almost insane. (Problem one)
    So, I want to write a script, let the computer do it for me. Further more, the shortcut "Ctrl+Shift+E" is used for both starting and stoping "BlackLining". Can't be set separately.
    At the same time, I don't know whether the "BlackLining" is on or not. What if it's off? Maybe old documents are on, some subsequent are off. See below:
    So I have to check the state before I press "Ctrl+Shift+E". (Problem two and three)
    Can you help me out? Thanks.
    If you need "BlackLining", you can download demo at http://www.blacklining.com/.

  • Indesign Post Script name changing to back up file name

    Hi all
    I am in a pre press workflow that requires that I write a post-script file to a hot folder.
    So saving as a post-script is the only option for our entire workflow to take place.
    When saving the post script file from indesign , the name defaults to the back up file name which is
    not similar to the original file name. We deal with an extremely large number of pages
    and need for this file name to stay the same as the original not the back up. Manually putting these file names
    in is a serious chance for error and takes too much time.
    Does anyone know how to prevent the name from changing?
    Thanks for any help.

    You should be posting to the InDesign or Acrobat forum. Please repost there giving them your version of InDesign and Acrobat. Detail you method of creating the postscript file. You should be printing to file using the Adobe PDF printer instance. I only suggest the InDesign forum, since the print dialog box in InDesign is not a standard Windows Print dialog box.

  • Outlook script to change font format on mail sent to a specific recipient

    I'm trying to learn VBA for a number of more appropriate uses, but this one is kind of an inside joke.   My standard email font color is purple and the text is small and 'girly" (10 point Georgia).   My warehouse manager is always picking
    on me about  my email font and how his 'old eyes' can't read it.  Is there a way to write a script, or combine the rule that runs a script in order to change the font on emails sent to one specific person?  If anyone is going to bother to write
    it out for me (THANK YOU in advance btw), the font I'd like to use is 14 pt Candara in black.
    This is indeed more of a joke, but it will help me learn this VBA stuff.  I'm mostly using it in excel for now.
    Thank you thank you thank you.

    If you add the following macro to the ThisOutlookSession module, it will intercept your messages and if they are to '[email protected]' they are reformatted as requested - though frankly bold (included) looks better
    Option Explicit
    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim olInsp As Inspector
    Dim wdDoc As Object
    Dim oRng As Object
    If Item.To = "[email protected]" Then
    With Item
    .BodyFormat = olFormatHTML
    Set olInsp = .GetInspector
    Set wdDoc = olInsp.WordEditor
    Set oRng = wdDoc.Range
    .Display
    With oRng
    .Font.Name = "Candara"
    .Font.Bold = True
    .Font.Color = &H0
    .Font.Size = 14
    End With
    .Save
    End With
    End If
    lbl_Exit:
    Exit Sub
    End Sub
    Graham Mayor - Word MVP
    www.gmayor.com

  • How to make at startup script that fits spread on open

    Hi there,
    Does anyone know how to make a startup script for InD CS6 that fit spread too screen when document open?
    I've tried this and it works but I've get a dialog that says "Object is not valid":
    #targetengine "session"
    main();
    function main(){
    var myEventListener = app.eventListeners.add("afterOpen", excuteScript);
    function excuteScript(){
    var myD = app.documents[0];
    app.layoutWindows[0].zoom(ZoomOptions.FIT_SPREAD);

    Hi Jump_Over and thank's for reply.
    I'm a total newbie when it comes to scripting.
    Can you show me how you mean?
    Jonas

  • I need this indesign cs3 script to run under Indesign cs2

    This is paragraph changes script which is run under indesign cs 3, I need this  script to run under my indesign cs 2, can anyone help me pls?. thank you  in advance
        Fixing paragraph style combinations
        Version: 1.1
        Script by Thomas Silkjær
        http://indesigning.net/
    var the_document = app.documents.item(0);
    // Create a list of paragraph styles
    var list_of_paragraph_styles = the_document.paragraphStyles.everyItem().name;
    // Make the dialog box for selecting the paragraph styles
    var the_dialog = app.dialogs.add({name:"Fix paragraph style pairs"});
    with(the_dialog.dialogColumns.add()){
        with(dialogRows.add()){
            staticTexts.add({staticLabel:"Find:"});
        with(borderPanels.add()){
            var find_first_paragraph = dropdowns.add({stringList:list_of_paragraph_styles, selectedIndex:0});
            staticTexts.add({staticLabel:"followed by"});
            var find_second_paragraph = dropdowns.add({stringList:list_of_paragraph_styles, selectedIndex:0});
        with(dialogRows.add()){
            staticTexts.add({staticLabel:"Change:"});
        with(borderPanels.add()){
            var change_first_paragraph = dropdowns.add({stringList:list_of_paragraph_styles, selectedIndex:0});
            staticTexts.add({staticLabel:"followed by"});
            var change_second_paragraph = dropdowns.add({stringList:list_of_paragraph_styles, selectedIndex:0});
    the_dialog.show();
    // Define paragraph styles
    var find_first_paragraph = the_document.paragraphStyles.item(find_first_paragraph.selectedIndex);
    var find_second_paragraph = the_document.paragraphStyles.item(find_second_paragraph.selectedIndex);
    var change_first_paragraph = the_document.paragraphStyles.item(change_first_paragraph.selectedIndex);
    var change_second_paragraph = the_document.paragraphStyles.item(change_second_paragraph.selectedIndex);
    // Set find grep preferences to find all paragraphs with the first selected paragraph style
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    app.findGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedParagraphStyle = find_first_paragraph;
    app.findGrepPreferences.findWhat = "^";
    //Search the current story
    var the_story = app.selection[0].parentStory;
    var found_paragraphs = the_story.findGrep();
    var change_first_list = [];
    var change_second_list = [];
    // Loop through the paragraphs and create a list of words and mark them as index words
    myCounter = 0;
    do {
        try {
            // Create an object reference to the found paragraph and the next
            var first_paragraph = found_paragraphs[myCounter].paragraphs.firstItem();
            var next_paragraph = first_paragraph.paragraphs[-1].insertionPoints[-1].paragraphs[0];
            // Check if the next paragraph is equal to the find_second_paragraph
            if(next_paragraph.appliedParagraphStyle == find_second_paragraph) {
                    change_first_list.push(first_paragraph);
                    change_second_list.push(next_paragraph);
        } catch(err) {}
        myCounter++;
    } while (myCounter < found_paragraphs.length);
    // Apply paragraph styles
    myCounter = 0;
    do {
        change_first_list[myCounter].appliedParagraphStyle = change_first_paragraph;
        change_second_list[myCounter].appliedParagraphStyle = change_second_paragraph;
        myCounter++;
    } while (myCounter < change_first_list.length);
    alert("Done fixing pairs!");

    CS2 didn't support grep searches so you're going to have to do some serious reworking of the script. It's not a flick of the wrists.
    Dave

  • InDesign CS3: Referring to changing picture numbers

    I have a large document with loads of pictures in it, and text which on some instances refers to a picture (For example 'Picture 5').
    It happens sometimes that the number of an image changes, for instance when I place an image on the 5th place, then Picture 5 becomes Picture 6, Picture 6 becomes Picture 7, etc.
    I am way to lazy to adjust all the text referring to those pictures, so how can I automate this?
    Kind regards, and thanks for your answer
    Job Jansweijer

    You might find this script for using Hyperlinks as cross-references helpful.
    Cross-referencing is now a native feature in CS4.
    Peter

  • InDesign CS3- some documents cause hang on open

    I have one designer that I support, whose InDesign has suddenly started freezing upon opening *some* documents. We can:
    Create a new blank document on her computer/account
    Open some other documents successfully
    Open the problem documents with another computer
    Open the problem documents with another account on same computer
    To fix, I've
    Reinstalled the 5.02 updater
    Removed the ~/Library/Preferences/Adobe InDesign/Version 5.0 folder
    Deleted Adobefnt[xx].lst files
    Rebooted.
    She's having problems this afternoon with files that were fine this morning. Since another account on the same machine doesn't have the same behavior, it must be something hiding in her home directory.... but what?
    When it hangs, I can watch one of each of the 4 cores (it's a Mac Pro with 5 gigs RAM) take turns spiking to 100%. There's always one at full usage, and never 2.
    Any help appreciated- deadlines and clients await.

    I'll answer my own question- hope it benefits someone someday.
    Delete ~/Library/Preferences/com.adobe.mediabrowser.plist .

Maybe you are looking for

  • Thinking of getting an iPad but have a few questions

    After using the iPhone 4 (3GS previously) and really liking the OS on it, I am thinking of purchasing an iPad to make reading ebooks easier, also, having the iPad would be more convenient for me to quickly go on the net in my home (or other wifi area

  • I can't get iTunes to open from the desktop

    I am using iTunes 7.0.2.16 and the only way I can get it to open is through foxy tunes in my Firefox browser. I would delete it and reinstall it but I have a lot of carefully maintained playlists and I am afraid I will have to redo all of them if I d

  • Can't send mail with wifi

    Hi to all. My problem is that everytime i try to send an email from the iphone with wifi connection, i can't. Always says impossible to sent. Disconnecting wifi sends email in few seconds. Thanks for suggesting

  • Transformations for 0IC_C03

    Hi Guys, We are doing a new BI 7.0 implementation and we are on Support pak 13. In BW3.5,for the 0IC_C03(2lis_03_bf/um) cube we have lot of complicated update rules. As in BI 7.0 we are using transformations instead of Transfer/Update rules, how do i

  • Image resizing

    Hello, For different websites I always need multiple dimensions of the same pictures (small sizes 50*50, large 100*100, medium etc etc). To make the website efficient this means resizing every picture into multiple sizes and saving them seperately on