GREP space more point using extendscript

Hello

I try to remove all spaces before a point using a GREP formula.

GREP '\s+\' works very well in the InDesign user interface, but as soon as I try to make it work as a script, it no longer works, and the result is a replacement of all spaces by a space more a point!

My script works for various other changes of grep.

It looks like:

app.changeGrepPreferences = NothingEnum.nothing;

app.findGrepPreferences = NothingEnum.nothing;

app.findChangeGrepOptions.includeFootnotes = true;

app.findChangeGrepOptions.includeHiddenLayers = false;

app.findChangeGrepOptions.includeLockedLayersForFind = false;

app.findChangeGrepOptions.includeLockedStoriesForFind = true;

app.findChangeGrepOptions.includeMasterPages = false;

app.findGrepPreferences.findWhat = '\s+\.';

app.changeGrepPreferences.changeTo = ' \. ';

app.activeDocument.changeGrep ();

Any idea on how to do that work?

Stone

(Great. Just typed a long answer and Jive killed. "That's the short version).

1. ask for Scripting in the Scripting forum questions.

2 backslashes are too - special in JavaScript strings and JavaScript parses the string first. Double your backslashes to preserve.

3. do not replace by "\.", it will insert a backslash as well. Replace codes differ from the codes Find.

Tags: InDesign

Similar Questions

  • What I really need to buy more FEPs in the clowd to update my creative cloud, my free space I s complete, I am now froced to pay more to use my programs?

    What I really need to buy more FEPs in the clowd to update my creative cloud, my free space I s complete, I am now froced to pay more to use my programs?

    Hi TinEriksson,

    CC cloud offer free space 2 GB, but if you bought the subscription for one of the CC app you'll get 20 GB space cloud until you have the subscription.

    So, if you need more creative space Cloud you must subscribe.

    Kind regards

    Nicos

  • Get information for clip loaded in the source using ExtendScript monitor

    Hello

    So, the short version: I was wondering if there is a way to get information about the clip currently loaded in the source, using ExtendScript monitor. Specifically, I am interested in the name, from timecode and in/out points. I don't see anything obvious in the ExtendScript Toolkit data browser, but I thought I'd ask.

    The long version of what I'm trying to do: I have a clip in the source monitor Panel that I know is in the active sequence. I would take the points of entry/exit from the source element and those like entry/exit points in the sequence. It's kind of a hack to get around the fact that you can't associate speech analysis with a multicam clip so I cut with one of the audio clips in the multicam clip and then I am translating those points to the multicam editing sequence. I have a way to do it with an AppleScript macro, but I would find a more robust solution (and cross-platform).

    Thank you!

    There is no possibility of returning to an element of the Source monitor to real projectItem in Agency CC 2015.

    However, you are not the first to ask such a feature, and (ahem) I can neither confirm nor deny that it can be added in the near future.

  • Add more points to the belvedere

    The end of construction of a process to 6.6. with 50 points, Yes, I used all, now the client wants to add more points to monitor.  What is the process of upgrading 6.6 50 permits a 6.6 100 e/s I/O?  Thank you.

    Jim

    Call OR sales or customer service. We have a specific product to expand points of e/s.

  • Is it possible to find which item bin belongs a calendar item using ExtendScript?

    I have several questions in fact. What I'm trying to do, is to understand, is what parts of my bin items are in my active sequence.

    Using ExtendScript, if I get the sequence active of my project and look through the video tracks, I can get a list or elements of each track. The item object don't help me much however. It does not seem any parent property or even a name (even though in the first, I see the name of the bin is displayed on each element of the track). Is it possible for me to understand what bin item is the source of my track point?

    Also, elements have start and end properties that do not appear to relate to the source element. I can sort of understand where the element starts in the source?

    I was interested in getting the information in ExtendScript not to see it first.

    For the article bin, the clip belongs, it's a different solution. It seems that I am confused by the list of issues on the track. If you have a question about your video track which starts at frame 50 I thought that qe.project.getActiveSequence () .getVideoTrackAt (0) .getItemAt (0) would be that point back but it doesn't. When you make the ExtendScript call for a list of questions for the track, you get 3 instead of 1. The first spans from 0-50 and the third from the end of the clip until the end of the timeline. The first and third items are fairly empty objects with just a beginning and an end and no further information, but these are not your clips. Your (second) clip is something very different from the other two and it has a getProjectItem() method that returns the bin clip element belongs to.

    Objects start and end of the object element are actually related to your sandbox don't point not the chronology of the first. The picture in the start object number is therefore the scope of the question bin where the clip begins.

  • component using ExtendScript method exportOMF()

    Does anyone have experience call this method using ExtendScript? I am trying to integrate in a script, but so far have not been able to call successfully. I guess he has need of an argument of the sequence you want to export an OMF, but so far it keeps returning 'list of bad argument' whenever I try to call it with something like:

    SEQ = app.project.activeSequence;

    app.project.exportOMF (seq);

    I tried to use reflect.properties, but have not been able to find something useful. Can someone point me in the right direction to call this method, or tell me what arguments it expects?

    Thank you!

    This PProPanel sample snippet should help:

    dumpOMF: function() {}
    app.enableQE ();
    var active_seq = qe.project.getActiveSequence ();
    If (active_seq! = null) {}
    var output_path is Folder.selectDialog ("choose the output directory");.
    If (output_path! = null) {}
    var abs_path = output_path.fsName;
    outName var = new String (active_seq.name) + ".omf;

    Ms var = '-';

    If (qe.platform == "Macintosh") {}

                   Sep = ' / ';.

    }

    var full_out_path_with_name = abs_path + sep + outname;

    () app.project.exportOMF app.project.activeSequence, / / sequence
    full_out_path_with_name, output file path
    "OMFTitle", / / title OMF
    48000, / / (48000 or 96000) sampling rate
    16, / / bits per sample (16 or 24)
    1, / / audio encapsulated flag (1: Yes or 0: no)
    0, / / audio file format (0: AIFF or 1: WAV)
    0, / / cut audio files (0: no or 1: Yes)
    0, / / manage executives (if trim is 1, the handle from 0 to 1000 frames)
    (0);                        includes pan indicator (0: no or 1: Yes)
    }
    } else {}
    Alert ("no active sequence.");
    }
    },
  • The latest changes to the 'Upload to the FTP host' function has made it useless - no point using a program such as Muse if I can't easily and automatically upload work to the Web server.

    The latest changes to the "Upload to Host FTP" function made it useless - no point using a program such as Muse if I can't easily and automatically upload work to the Web server.  I use BlueHost webhosting with a main area and I have several domains with this account (such as subdomains or folders on this server) - with older versions of Muse when downloading pages it simply opened a warning window to tell me (what I already know) the Web site I am downloading does not point to the main domain BUT now Muse is trying to create a new folder separated into the root directory of the main domain. completely ignoring the directory path that I am giving him - useless!  Why do these crazy changes to the program - and so often - it is very frustrating as amateur ware!

    Hello Stephen,

    There are some problems with the download of ftp through Muse, who knows the team of engineers and those will be corrected in a future version of Muse. At this point, the work around would be to export the html code of Muse and then download via some third party client like filezilla ftp.

    I would recommend that you keep an eye on our page of release notes to get updates more about it - Release notes | Adobe Muse CC

    - Abhishek Maurya

  • Is it possible to use automatic lens correction profiles in Camera RAW using Extendscript?

    I developed some Javascripts use Extendscript toolkit to help me process batches of files to create videos of time, and

    I would like to take advantage of the automatic lens correction profiles available in Adobe Camera RAW (I use Adobe Photoshop CS6 64-bit), but in the CameraRAWOpenOptions, there is no property describing automatic lens correction profiles.  It seems that there must be a way to automate the selection of the checkbox "Activate the profile of lens Corrections" at the opening of RAW images from the camera.  I use Canon lenses and large Adobe lens correction profiles work, so I want to use them.

    I am aware of the other way to do this Photoshop using file-> automate-> Correction of the lens, but it seems to work more slowly than to use the lens correction in Camera RAW.

    Thank you.

    You don't need to bother... just set your camera Raw "Defaults" to include allow Corrections lenses profile and check the Auto CA correction. Then go to the ACR contextual menu and choose Save new Camera Raw default... Note: If you have your ACR preferences to have separate by default based on the serial number of camera and ISO, you will need to save by default, separate for each camera and ISO values you use.

  • How to extend (i.e. add more points at the end of) a Bézier path?

    What is the best way to make a trace of Bézier longer by adding more points at the end? I can do it by moving the end point to the location where I the new endpoint using the direct Selection tool, and then using the Add Point to replace the old end point and then add the new points I want between the former end point and the new endpoint. But it's very tedious surely there must be a better way. I just want to keep adding points as I did when I was creating the path in the first place.

    I use CS2, so I need a technique that works with this version.

    Thanks – Rowan

    I think that's what you're looking for.

    With you deselected Bézier open, select the pen tool. With the selected pen tool, it will have an 'x' next to it. Pass the tool back on the endpoint and it will turn to a ' / '. Click on the endpoint and start earning new line segments.

    Good luck

  • What color spaces / profiles are used?

    I can't find all the information on the spaces/profiles/tags used for conversions of colors color Kuler... can someone please help?

    Thank you

    the conversion of colors from one color space to another of kuler are coherent with the default color space conversions in Adobe Illustrator CS/CS2/CS3. As an info, kuler is a subset of the Illustrator CS3 Live Color feature. The formulas for the color themes are from this source. You can learn more about the color dynamics and Illustrator of the following URL. http://www.Adobe.com/products/Illustrator/features/

  • I have a new PC with Windows 10 Pro and I leave iTunes every time I gt the flollowing message. "One or more applications use scriping of iTunes interface. Are you sure you want to exit? "All help to stop this would be appreciated.

    I have a new PC running Windows Pro 10 and everytime I close iTunes I get the following message.

    "One or more applications use iTunes script interface. Are you sure you to quit smoking? -If you have nothing will close the application using the script interface and a 20 20 second timer starts. "

    I was wondering if someone can help me with a solution to this?

    What third-party software is running on your computer? Last.FM is one that comes to mind.

    TT2

  • My space Icloud is used because of the backup of the Ipad and I use three devices under ID so my iphone always gives the warning of small footprint. How can I save the back upward on my PC so that I can delete of I have cloud and free space

    My space Icloud is used because of the backup of the Ipad and I use three devices under ID so my iphone always gives the warning of small footprint. How can I save the back upward on my PC so that I can delete of I have cloud and free space

    Hello

    You want to know is explained here: https://www.apple.com/support/iphone/backup/

    If you want to delete the backups that are currently clogging up your iCloud-storage space, use this: iCloud: delete a backup device iOS to iCloud

  • Is it possible, using ExtendScript, to retrieve the name of a model used in first

    I have an AE Comp used in first instance.  I'm looking for a way to quickly manage the names of the AE model and this model used in the first instance.  The goal is to maintain naming conventions as efficiently and accurately as possible.  I was wondering if there is a way, using ExtendScript (a command in a custom panel) to retrieve the name AE Comp of her in first instance.

    Any projectItem with a path ending with .aep is a likely candidate.

    Our next version provides iteration better the elements in a sequence; You can reach the projectItem of any clip, that should give you what you need.

  • Clear sΘquence in Premiere Pro using ExtendScript

    My work is almost done, but there is a simple question, how to remove the sequence using ExtendScript?

    In my script I can clone, rename, move the footages, WAV, pictures etc, but I can't delete it.

    In Data Browser (ExtendScript) it is app.project.deleteSequence (), but what are the arguments for this function? I know QE and I found only one thread on this topic (https://forums.adobe.com/thread/1977423?start=0 & tstart = 0), there is no response, how it works. For many years, I'm waiting for the manual PR as a Guide of the effects scripts after = ( )


    In my project, there's a sequence I need to make a copy, create some footages and titles, then rename the cloned sequence, export it as a Premiere Pro project and remove it. Everything works perfectly except the last.

    This is the part of the code:

    app.project.activeSequence.clone(); // create "old_seq copy" from "old_seq"
    var nI = app.project.rootItem.children.numItems;
    for (var i = 0; i < nI; i++) 
          {
             if (app.project.rootItem.children[i].name == "old_seq copy") 
                {
                  var item = app.project.rootItem.children[i]
                         item.name = "new_seq";
                 }
           }
    --------------------------------------------------------------
    /*--*/
    for (var i = 0; i < nI; i++)
          {
           if (app.project.rootItem.children[i].name == "new_seq") 
               {
                 app.project.deleteSequence(); //<--- this is just an example of the line, but how to delete "new_seq"?
                }
           }
    

    I can't find anything about this in PProPanel. It is possible at all?

    Thank you!

    There is no scheduled Scripting Guide for the organization. Potentially comforting: > 140 panels there to use today which depend on ExtendScript API of the body, and none of them had documentation either.

    It is not possible at all. Best thing: move old sequences in a sandbox that you create, named something like "Andrei_says_to_delete_these".

  • Definition of white/black Points using the tone curve

    I am trying to install white/black points using the tone curve, but when I try to drag one of the end points of the line in the tone curve tool, I can't move. Could those be locked somehow...?Screenshot 2015-01-09 19.26.12.png

    It is what it is supposed to do. Without the sliders, you work with the curve itself. Now, you have direct control of the curve and can drag any part of it. Have you thought in your white and black points using the whites and blacks in the base Panel while holding down the opt/alt key? I guess the reason why what he says point curve is because this icon is what allows you to curve to the point.

Maybe you are looking for