It is possible to script a decimal approximation in Indesign?

In a file of several decimal numbers should be rough.

It is possible to add a script?


Real Mandatory

22.90 23

21,87 22

26,47 26

11.93 12

29,16 29

You can change the grep changeWhat according to exactly what numbers you want to find, but it's the basic idea to round all numbers with one ',' instead of a '. '.

var doc = app.activeDocument;
app.changeGrepPreferences = app.findGrepPreferences = null;
app.findGrepPreferences.findWhat = "\\d+\,\\d+";
var myNumberFinds = doc.findGrep(),
      l = myNumberFinds.length;
while (l--)
    {
        app.changeGrepPreferences.changeTo = Math.round(myNumberFinds[l].contents.replace(/\,/,".")).toString();
        myNumberFinds[l].changeGrep();
    }

If you want to change the numbers that have at least 1 but not more than 2 whole numbers then a comma and then at least 1 and up to 2 fractional numbers then you can use for your find what line

app.findGrepPreferences.findWhat = "(?)".<>

Which ensures that history did not begin or end with the number to be changed.

Tags: InDesign

Similar Questions

  • Discordance of signature - possible attack script

    Hi guys

    You helped me week last on my PC to work brilliantly. This time, it's my PC at home. Windows 7, Firefox 39.0.

    I play an online game called Wartune through servers Kabam. Whenever I chose my server, I get the following message...

    Discordance of signature - possible attack script. Retry

    A new attempt made anything of course. Currently my game on Chrome (ugh) and I'd love to be able to transfer my games in Firefox.

    Do you accept third-party cookies? You can check in your Privacy Options, here:

    "3-bar" menu button (or tools) > Options > privacy

    If necessary, adjust the selector on "conservation rules: use the custom settings for history".

    Then:

    [X] accept cookies
    Accept third-party cookies: always
    Keep until: I close Firefox or they expire

  • Lot: Open Bridge "Stacks" in the form of layers in PS CS5 + run action. Is this possible with script?

    A couple of days, I posted this topic - I did not know this forum/group so the thread is displayed in Photoshop scripts and windows of the bridge. I did find a solution on these forums - can help any person here?


    http://forums.Adobe.com/thread/880777?TSTART=0

    http://forums.Adobe.com/thread/880779?TSTART=0

    I would like to automate a part of my job, which is to open the images superimposed (in Bridge CS5) in the form of layers in Ps CS5 and performs a PS action than the layers of composites and processes the image. Something similar to 'Process Collection' in Bridge CS5 only with my own action instead of merging HDR/panorama.

    Apparently, it's possible with Mac "Automator" - I can do in Windows? I have no experience with writing scripts, but have friends who can help. Can someone tell me if its possible and point me in the right direction please?

    This must be a batch process. I know how to open images in layers of the bridge so that I can manually run action PS - I deal with automatically batches of images in this same way.

    To clarify, if possible script must

    (1) find the first battery (in bridge [in the selected folder])

    2) open as layers in PS

    (3) run PS action

    (4) save and close (like psd retaining layers)

    (5) find battery new bridge (selected folder) and try again.

    I mean by "stack", a set of similar files (for example same scene-2 EV, 0EV, + 2 EV)

    Function 'Collection of process' of the bridge is great because it recognizes very skillfully similar images (I think that you first need to stack them) opens to them and either treated in a hdr or panoramic image. Instead or hdr or pano, wouldn't be great if you can run your own action.

    The bridge Image Processor is fantastic to open a package of individual files and run your own action of treatment, but it will not be open to groups of images ("Stacks" or sets) in the form of layers.

    What I need, is essentially a hybrid of the two.

    In case missed you my end added in the other thread, you can watch the auto collection script that comes with the bridge and use it as a basis for what you want to do. You can also to the controller of the creation of your batteries if their timestamps are nearby. Overnight Auto Collection Script now performs two types of battery HDR and Panoramas.  You may be able to modify it to a third type of battery. You stack type and use your stack of transformation of the process instead of mearge of HDR or PhotoMerge.

    The help of Bridge:

    The script Auto Collection CS5 from Adobe Bridge assembles sets of images into piles for treatment as a high dynamic range (HDR) or composite panoramas in Photoshop CS5. The script collects images into stacks based on capture time, exposure settings and the alignment of the image. The timestamps must be within 18 seconds for the Auto Collection script to process the photos. If the exposure settings vary according to the pictures and content overlaps by more than 80%, the script interprets the photos as a HDR set. If the exposure is constant and content overlaps by less than 80%, the script interprets the photos as part of a panorama.

    Note: You must have Adobe Bridge with Photoshop CS5 CS5 Collection car is available.
    1. To activate the Auto Collection CS5 script, choose the command Edition > Preferences (Windows) or Adobe Bridge CS5.1 > Preferences (Mac OS).
    2. In the Startup Scripts panel, select Auto Collection CS5 and then click OK.
    3. Select a folder with the HDR or panoramic and choose stacks > Auto stack Panorama/HDR.
    4. Choose Tools > Photoshop > process Collections in Photoshop to merge automatically and visualize the result in Adobe Bridge.
  • Want to automate chimneys open as layers + run action. Possible with script?

    I would like to automate a part of my workflow that involves stacked opening images as layers in Ps CS5 and performs a PS action than the layers of composites and processes the image. Something similar to 'Process Collection' in Bridge CS5 only with my own action instead of merging HDR/panorama.

    Apparently, it's possible with Mac "Automator" - I can do in Windows? I have no experience with writing scripts, but have friends who can help. Can someone tell me if its possible and point me in the right direction please?

    For the name, I thought in the direction to use the name of the first frame of the stack (or layer) as part of the file name.

    For action, I think it depends on the action and how the script should be used. My tests were piles of images of three images each. Action selects the top layer, reverse, selects the layer below, reverse, selects the layer below, and reverse. So it reverses all layers, because he expects that there will be three layers. I guess you could script runs the action on all layers, but following the workflow that is perhaps not ideal.

  • Is this possible with scripts to create a shortcut for a GUI element that currently has no any shortcut?

    Hello

    I would like to add a shortcut for 'always use pressure for opacity and size', but before investing time reasearching the api and how do it, let me know if it's possible.

    Thank you.

    I don't think that it would be possible.  There is no entry in the edition for the user interface element shortcuts and using them they show events that are not recorded by the scriptlistener.  There is no way that I know to do on Photoshop UI without the source for Photoshop.  Their user interface element are not yet on the screen all the time, and their places may change.

  • Is it possible to script an image to open it after another field reached a certain value?

    I have very little programming knowledge.  I was wondering if I had two calculations that would be compared with each other.  When the second total is equal to the first calculation, it is possible to open an image?  (Like the flowers that say "Congratulations!")

    It is an autonomous form that is not connected to any source of data.

    Thank you

    Christina in Tucson

    poundsOn_Off.rawValue returns the value in the string format that can not be compared with a number.

    Then, use the following syntax to convert the string to a number value.

    If (parseInt (poundsOn_Off.rawValue) > 1 & parseInt (poundsOn_Off.rawValue))<>

    {

    a logic

    } else

    {

    //...

    }

    Nith

  • Is it possible to "script" a swf from another flash object.

    I would like to be able to place or load another flash file in my main flash file.  The flash of the child file is written by a third party, and I don't want to rewrite / recompile all parts of its source code.  So ideally, I would like to be able to call something like:

    child_mc.genericFlashSpirte.x += 15;

    child_mc.genericFlashSpirte.y = 30;

    etc...

    flash file inside the code of the parent company.

    Is this possible.  I guess, that once I have incorporate the child flash file, I should be able to start and stop playing, but I want to do more, then this.

    You can load external swf with the Loader class files.  You can target the loaded file after loading is finished and he created himself (after the INIT event) by targeting the event.target.content.

  • Is it possible to create a predefined subfolder that InDesign will recognize?

    I need to introduce the hierarchy to the query find/replace preset files due to a large number of custom presets.  I have a fairly long list of presets organized nomenclature, which add another level of organization would improve significantly their use. Unfortunately, InDesign does not recognize the files I have added to the folder queries search - replace (/ users/my-name/Library/Preferences/Adobe InDesign / Version 11.0/en_US/Find-Change Queries).  InDesign recognizes only the files that are installed with the program, i.e., glyph, Grep, text object.  And exchanging files is not practical, even though it works.

    Does anyone know if it is possible to add the hierarchy to the presets?

    I hope that this isn't just a feature request.

    Thank you

    Dan

    The script Panel can be configured as a hierarchy, so you can move your searches saved scripts and store them in folders nested, which show that way in the control panel.

    Here is a model of AppleScript (OS x only) I use, which is easy to modify. You can run one or more searches from a single script, this version works 4 GREP searches to remove white space.

    Edit the lines in my GrepSearch ("yourfindgrep", "yourchangegrep") according to the needs. NOTE! with AppleScript slashes must be preceded by an additional backslash, so it's '\\t+' and not '\t+ '.

    Tell application "Adobe InDesign CC 2014"

    activate

    -replaces several tabs with tab

    My GrepSearch ("\\t+", "\\t")

    -Removes any white space at the beginning of a paragraph, including multiple returns

    My GrepSearch ("^ \\s *","" "")

    -replace multiple spaces with a space

    My GrepSearch ("\\p {zs} {2}", "\\s")

    -replaces spaces nonbreaking spaces

    My GrepSearch ("~ s |") ~ S", "\\s")

    tell the end

    on GrepSearch (f, c)

    Tell application "Adobe InDesign CC 2014"

    set preferences for grep to find nothing

    set preferences for grep for nothing change

    game to find what to find grep preferences in f

    change set to c change grep preferences

    change of grep

    tell the end

    end GrepSearch

  • Is it possible to automate the export of my InDesign file to several different export settings with PDF files?

    OK, so not sure if this is possible, but it would be a great time for me if possible gain, so I throw it out there.

    I often work on spec sheets to work in InDesign and when I finished, I have preset PDF export settings for Print and Web. Printing has all the markings of bleed and printer, and one, web well... you get the idea.

    For now, I need to run export separately; so I do my export to a PDF print... and then I make my export to obtain a PDF optimized for Web.

    These are separate tasks, but surely there must be a script or another way to get InDesign just export the two PDF files at the same time, respecting the presets they are posted.

    How can I do this?

    Looks like it's what you're looking for:

    http://www.ID-extras.com/script-to-export-multiple-PDFs-at-once

  • Is it possible to add a QR code to InDesign eBook?

    Is it possible to add a QR code to an InDesign document, and then export it to eBook so that the eBook and the QR code works on mobile devices?

    Addition of a QR code to the InDesign document, simply creates an embedded image. Anchor this image somewhere in the text and it will translate on the ePub.

    But what do you want that code QR to do?

    If you want the person who reads the book click on the QR code to access a web page, you'd be better off with a hyperlink.

    If you want the person with the book to hold the mobile camera upward and another person to use a reader to analyze the code, then 'Yes'. This can be done.

    He is clumsy, but devices can mate like that.

  • Script to merge 2 files Indesign pages alternating

    Hello

    I created a document of data fusion for a book I'm writing (fortunately I already had everything in Excel). I created a model with management style headings and positioned graphics and size exactly where I wanted to. My master page had repeated elements etc.

    Loved the process and it worked perfectly. He literally saved me a weeks of formatting and graphic insertion works. However, the file essentially created the page left hand ONLY a 2 page.

    My understanding of student tutorials on the fusion of data, is that they can create a page of output even though I know that you can change in 2 pages later.

    The second data fusion created a file which would ideally be the right of every broadcast page.

    It is a book of type reference/encyclopedia with each 2 page spread a separate entity devoted to a topic

    I need to together the 2 files.

    1. The first file would be left hand or page PAIR
    2. The second file is the right hand or ODD page.

    The document is 350 pages. Each page is the same size, margins, and the object but with different headings and graphics

    (By dragging the pages would be too tedious and I had problems with ID crashing.) Don't want to go back)

    I read a response by Dave Saunders ( 9 1 November 2008 17:03 (in response to Al Ferrari) Re: Script of intertwining of the two counties of equal page InDesign files )

    This work would be - do you think?

    I have ID CS4 6.0 running on windows vista.

    I have NO experience of script but I can follow directions.

    Is there some kind, wise scripts, I can (or should) this?

    Thanks in advance for any help

    Lauren

    My understanding of student tutorials on the fusion of data, is that they can create a page of output even though I know that you can change in 2 pages later.

    This is not true. Data merge can be made with many pages. See my response to this post:

    http://forums.Adobe.com/message/3909894#3909894

    In response to the request of script of the OP, I can't be of any help.

    What I hope is that after reading how a merger of data with left and right of the pages of the post that I linked, that data can be merged again... assuming he was little (or not) of post processing of the file once the merger took place.

  • Is it possible to design an electronic newsletter with InDesign CS5?

    I realized that the creation of documents interactive in InDesign, you can export to swf and pdf among others.

    I would like to design a newsletter in InDesign CS5 interactive help, but I don't want it to be a pdf but a bulletin electronic html.

    Is it possible to do in InDesign, when export to dreamweaver, that would be compatible with browsers?

    Thank you

    InDesign is certainly NOT the right tool for this. Dreamweaver would be my personal choice.

    Bob

  • is it possible to back - install a version of InDesign, without the new dark interface...

    .. .and also how to give feedback to Adobe that the new dark gray interface with the White type (a) is extremely difficult to read, (b) looks like Windows, (c) it is difficult to see the colors on your color chart, especially if you work with a lot of gray, (d) is too small (and I have 20-20 vision).   What they think / why they continue to change for the sake of change?  This software doesn't have to be a work of art in itself. He needs to work and be practical, so that we can CREATE art.

    Absolutely, I hate this new user interface and want to backdate a version with a beautiful light normal backdrop for windows, the chassis, the menus and toolbars. I see no benefit to this new "he wasn't so broken and you certainly shouldn't ' tve 'fixed' it ' 'upgrade '.

    Thank you.

    You can change it in preferences > Interface > appearance > theme color > light. Do it with no documents open, it becomes the default.

  • Merge elements of form script possible?

    When I have a pathItem in my doc with several subPathItems how can I access the ability to activate the "form components merge"?

    Is it possible by script?

    I tried listener script with no luck.

    pathsComp.jpg

    Record fine for me. (Edit: the path must be selected.)

    // =======================================================

    var idcombine is stringIDToTypeID ("combine");.

    var desc2 = new ActionDescriptor();

    var idnull = charIDToTypeID ("null");

    var ref1 = new ActionReference();

    var idPath = charIDToTypeID ('Path');

    var idOrdn = charIDToTypeID ('Ordn');

    var idTrgt = charIDToTypeID ("Trgt");

    Ref1.putEnumerated (idPath, idOrdn, idTrgt);

    desc2.putReference (idnull, ref1);

    executeAction (idcombine, desc2, DialogModes.NO);

  • How to change power mode using powershell script?

    In Windows 7, there are 2 available for selection (balance or eco) power switch mode.

    I would like to know if it is possible to script powershell code to pass these 2 modes of window 7 or not.

    Does anyone have any suggestions?

    Thanks in advance for your suggestions

    Hello

    You want to know about the encoding of a PowerShell script, I recommend that you post the question on the Forum on TechNet script where you will have the best support for any problem related to scripts.

    http://social.technet.Microsoft.com/forums/scriptcenter/en-us/home?Forum=iTCG

    Thank you.

Maybe you are looking for