Add Find & Replace Buttons

Dear Mi_D,
I got your reply. But couldn't reply you on my previous ID due to loss of my password.
I forgot my password for my ID. I created new account.
I have tried your code but it is not working. It doesn't show any dialog box.
Could you please check the code and help me.
If anybody can help me please do so.
Thanks,
Kerosk
Hello All,
Below is the my code to find empty text frames in my documents.
I want a dialog which show me 4 buttons 1. cancel, 2. Skip, 3, Show and 4. Delete buttons in my Dialog.
My below code finds text frames but I need to add onClick code on above buttons Please help me with this code..
JS code-------------
EmptyTf= app.activeDocument.layers.item(0).textFrames;
for (etf=0; etf<EmptyTf.length; etf++)
if (EmptyTf[etf].contents<=0)
app.select(EmptyTf[etf]);
alert ("Selected  is EMPTY Textframe.\r"+"Textframe selected "+[etf]+".");
Thanks,
kerosk
Dear kerosk,
try below code
var myDialog = app.dialogs.add({name:"MI_D"+"      ", canCancel:true});
with(myDialog){
          with(dialogColumns.add()){
               with(borderPanels.add()){
               staticTexts.add({staticLabel:"Chose Operation:"});
               var myRadioButtonGroup = radiobuttonGroups.add();
                    with(myRadioButtonGroup){
                         var ShowRadioButton = radiobuttonControls.add({staticLabel:"Show"});
                         var DeletetageRadioButton = radiobuttonControls.add({staticLabel:"Delete "});
                         var DeletetageRadioButton = radiobuttonControls.add({staticLabel:"Skip "});
if(myDialog.show() == true){
     if(myRadioButtonGroup.selectedButton==0){
               EmptyTf= app.activeDocument.layers.item(0).textFrames;
               for (etf=0; etf<EmptyTf.length; etf++)
               if (EmptyTf[etf].contents<=0)
               app.select(EmptyTf[etf]);
               alert ("Selected  is EMPTY Textframe.\r"+"Textframe selected "+[etf]+".");
               if(myRadioButtonGroup.selectedButton==1){
                         EmptyTf= app.activeDocument.layers.item(0).textFrames;
                              for (etf=0; etf<EmptyTf.length; etf++)
                              if (EmptyTf[etf].contents<=0)
                                   app.select(EmptyTf[etf]);
                                   var select=app.selection[etf];
                                    select.remove();
                                   alert ("Selected  is EMPTY Textframe.\r"+"Delete  "+[etf]+".");
                    if(myRadioButtonGroup.selectedButton==2){
               EmptyTf= app.activeDocument.layers.item(0).textFrames;
                    for (etf=0; etf<EmptyTf.length; etf++)
                    if (EmptyTf[etf].contents<=0)
                              app.select(EmptyTf[etf]);
                                   var select=app.selection[0];
                                   var select=app.selection[etf+1];
                                   alert ("Next"+[etf]+".");

Dear Mi_D,
I got your reply. But couldn't reply you on my previous ID due to loss of my password.
I forgot my password for my ID. I created new account.
I have tried your code but it is not working. It doesn't show any dialog box.
Could you please check the code and help me.
If anybody can help me please do so.
Thanks,
Kerosk
Hello All,
Below is the my code to find empty text frames in my documents.
I want a dialog which show me 4 buttons 1. cancel, 2. Skip, 3, Show and 4. Delete buttons in my Dialog.
My below code finds text frames but I need to add onClick code on above buttons Please help me with this code..
JS code-------------
EmptyTf= app.activeDocument.layers.item(0).textFrames;
for (etf=0; etf<EmptyTf.length; etf++)
if (EmptyTf[etf].contents<=0)
app.select(EmptyTf[etf]);
alert ("Selected  is EMPTY Textframe.\r"+"Textframe selected "+[etf]+".");
Thanks,
kerosk
Dear kerosk,
try below code
var myDialog = app.dialogs.add({name:"MI_D"+"      ", canCancel:true});
with(myDialog){
          with(dialogColumns.add()){
               with(borderPanels.add()){
               staticTexts.add({staticLabel:"Chose Operation:"});
               var myRadioButtonGroup = radiobuttonGroups.add();
                    with(myRadioButtonGroup){
                         var ShowRadioButton = radiobuttonControls.add({staticLabel:"Show"});
                         var DeletetageRadioButton = radiobuttonControls.add({staticLabel:"Delete "});
                         var DeletetageRadioButton = radiobuttonControls.add({staticLabel:"Skip "});
if(myDialog.show() == true){
     if(myRadioButtonGroup.selectedButton==0){
               EmptyTf= app.activeDocument.layers.item(0).textFrames;
               for (etf=0; etf<EmptyTf.length; etf++)
               if (EmptyTf[etf].contents<=0)
               app.select(EmptyTf[etf]);
               alert ("Selected  is EMPTY Textframe.\r"+"Textframe selected "+[etf]+".");
               if(myRadioButtonGroup.selectedButton==1){
                         EmptyTf= app.activeDocument.layers.item(0).textFrames;
                              for (etf=0; etf<EmptyTf.length; etf++)
                              if (EmptyTf[etf].contents<=0)
                                   app.select(EmptyTf[etf]);
                                   var select=app.selection[etf];
                                    select.remove();
                                   alert ("Selected  is EMPTY Textframe.\r"+"Delete  "+[etf]+".");
                    if(myRadioButtonGroup.selectedButton==2){
               EmptyTf= app.activeDocument.layers.item(0).textFrames;
                    for (etf=0; etf<EmptyTf.length; etf++)
                    if (EmptyTf[etf].contents<=0)
                              app.select(EmptyTf[etf]);
                                   var select=app.selection[0];
                                   var select=app.selection[etf+1];
                                   alert ("Next"+[etf]+".");

Similar Messages

  • Help with Find / Replace button title tag contents (text)

    Hi there,
    I designed my site with Sitegrinder (Medialab) –
    Currently all the title tags generated for buttons are the same as
    the actual html page name.
    The problem with this is that the tooltip which appears in
    browsers when you hover over the button with the mouse gives you
    the page name. Instead I want to use these tooltips to give the
    user an indication of what the function of the button is.
    An example: A zoom button above an image: Currenty the
    tootlip says “zoom imagename pagename” – Instead
    it should say “click here to zoom”.
    I need help to get the Dreamweaver Find and Replace tool to
    batch replace these tags for me for about a 100 pages.
    Here is an example of the code:
    <body>
    <div id="id1zoomimpastooilweddingbutton"><a
    href="zoomimpastooilwedding.html"
    title="zoomimpastooilwedding"></a></div>
    I only want to replace the text in the title tag - Since the
    text “zoom” appears several times in the body, I
    can’t get the Find tool to pick up and Replace the occurrence
    of “zoom” in the title only…….
    Options I’ve tried:
    Search Current document: Search for: “specific
    tag”: “title”, “containing”:
    “text” = zoom (I’ve tried this with
    “zoomimpastooilwedding” and zoom[^”]* with no
    results
    I’ve also tried: Search for: “specific
    tag”: “body”, “containing”:
    “specific tag” “title”
    “containing”: “text” = zoom
    etc……………..
    I need help with what parameters to enter in order to find
    and replace all the text within the title tag with my own text
    Thanks very much!
    Anton

    You have ~ 100 pages, each of which has images with title
    attributes (not
    tags), all of which BEGIN with the letters "zoom"?
    What do you want to replace that text with? Wouldn't it be
    different for
    each button? Or do you mean that you would do multiple
    sitewide searches,
    one for each button? This illustrates how wrong it is to not
    use DW
    Templates or server-side includes to simplify the management
    of your
    navigation elements....
    Did you ask Medialabs if it would be possible to specify this
    before
    generating the HTML?
    How did you like working with SiteGrinder? It looks like a
    nice product to
    me, although I'm not fond of the final results code-wise....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "unison123" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi there,
    >
    > I designed my site with Sitegrinder (Medialab) ?
    Currently all the title
    > tags
    > generated for buttons are the same as the actual html
    page name.
    >
    > The problem with this is that the tooltip which appears
    in browsers when
    > you
    > hover over the button with the mouse gives you the page
    name. Instead I
    > want to
    > use these tooltips to give the user an indication of
    what the function of
    > the
    > button is.
    >
    > An example: A zoom button above an image: Currenty the
    tootlip says ?zoom
    > imagename pagename? ? Instead it should say ?click here
    to zoom?.
    >
    > I need help to get the Dreamweaver Find and Replace tool
    to batch replace
    > these tags for me for about a 100 pages.
    >
    > Here is an example of the code:
    >
    > <body>
    > <div id="id1zoomimpastooilweddingbutton"><a
    > href="zoomimpastooilwedding.html"
    > title="zoomimpastooilwedding"></a></div>
    >
    > I only want to replace the text in the title tag - Since
    the text ?zoom?
    > appears several times in the body, I can?t get the Find
    tool to pick up
    > and
    > Replace the occurrence of ?zoom? in the title only??.
    >
    > Options I?ve tried:
    >
    > Search Current document: Search for: ?specific tag?:
    ?title?,
    > ?containing?:
    > ?text? = zoom (I?ve tried this with
    ?zoomimpastooilwedding? and zoom[^?]*
    > with
    > no results
    >
    > I?ve also tried: Search for: ?specific tag?: ?body?,
    ?containing?:
    > ?specific
    > tag? ?title? ?containing?: ?text? = zoom etc?????..
    >
    > I need help with what parameters to enter in order to
    find and replace all
    > the
    > text within the title tag with my own text
    >
    > Thanks very much!
    >
    > Anton
    >
    >

  • "Add New Tab" button does not exist in the Window -Customize Toolbar, and not on my Navigator toolbar. Where can I find one to put on my Navigator toolbar, please?

    I see "Add New Window" but..."Add New Tab" button does not exist in the Window -Customize Toolbar any longer, and not on my Navigator toolbar. Where can I find one to put on my Navigator toolbar, please?
    Thanks

    It's the "+" on the Tab bar. You can move it to the Navigation Toolbar if you prefer. When you start Customize, the + moves to the far right end of the Tab bar. You can drag it where you want (see attached image).
    Any luck?

  • Code for  single button which acts for add,find,update

    I have created one btns- (acting for add,find, update etc having same unique id )using VB.NET code.I want to write code according to the captions of the button...I mean for diff caption of the btn , diff action should perform?
    So , plz anyone tell me how to code for it using VB.NET(for Business One)
    Thnxs in advance..
    Chetan

    Chetan,
    You have posted your question in the SAP Business One integration for SAP NetWeaver forum.  Your question relates to the SAP Business One SDK and you need to post your question in the SAP Business One forum.  You should get a response by posting it in that forum.
    Eddy

  • Add a browse button

    Hi All
    I'm using Oracle From 10G,
    how to add a browse button so that user can browse the file system and then
    select the file that they want WITHOUT needing to type the FULL PATH.
    Thanks And Regards
    Vikas Singhal

    Download WebUtil and JACOB libraries
    • Download WebUtil version 1.0.6 from:
    http://www.oracle.com/technology/software/products/forms/files/webutil/webutil_106.zip
    • Download the JACOB libraries from:
    http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip
    Extraction
    Extract the webutil_106 zip file and make the following:
    • Copy the webutil folder to this directory:
    o <Developer Home>\forms90
    • Copy contents of the server folder to this directory:
    o <Developer Home>\forms90\server
    • Make sure that the webutil.cfg, webutilbase.jar,
    webutiljini.jar, webutiljpi.jar files are copied
    • Copy contents of the java folder to this directory:
    o <Developer Home>\forms90\java
    • Make sure that the frmwebutil.jar file was copied
    Extract the jacob_18 zip file and make the following:
    • Copy the jacob.dll file to this directory:
    o <Developer Home>\forms90\webutil
    • Copy the jacob.jar file to this directory:
    o <Developer Home>\forms90\java
    Sign the Jar files using sign_webutil.bat
    • Sign both the frmwebutil.jar and the jacob.jar with the same digital
    certificate.
    • Make sure that keytool and jarsigner are present in the path.
    • Make sure that you have shutdown the OC4G Instance .
    • From command line type the following:
    o C:\cd <Developer Home>\jdk\bin
    o C:\<Developer Home>\jdk\bin>
    <Developer Home>\forms90\webutil\sign_webutil.bat
    <Developer Home>\forms90\java\frmwebutil.jar
    o Make sure that this message (...successfully done.) is appeared.
    o C:\<Developer Home>\jdk\bin>
    <Developer Home>\forms90\webutil\sign_webutil.bat
    <Developer Home>\forms90\java\jacob.jar
    o Make sure that this message (...successfully done.) is appeared.
    orion-web.xml Configuration
    • Go to this directory:
    o <Developer Home>\j2ee\DevSuite\applicationdeployments\
    forms\forms90web
    • Open the orion-web.xml file.
    • Add this line:
    o <virtual-directory virtual-directory="/webutil"
    real-directory="<Developer Home>/forms90/webutil"
    />
    • Save the changes.
    default.env Configuration
    • Go to this directory:
    <Developer Home>\forms90\server
    • Open the default.env file.
    • Find FORMS90_PATH=<Developer Home>\forms90
    • Append this line:
    o C:\oracle\product\10.2.0\ds_1\forms90\webutil
    • In a new line under (FORMS90_PATH=) add this line:
    o WEBUTIL_CONFIG=<Developer Home>\forms90\server\webutil.cfg
    • Find PATH= , comment it and replace it with this line:
    o PATH=<Developer Home>\bin;
    <Developer Home>\jlib;
    <Developer Home>\jdk\bin;
    <Developer Home>\jdk\jre\bin;
    <Developer Home>\jdk\jre\bin\client;
    <Developer Home>\jre\1.1.8\bin;
    • Find CLASSPATH= and append this line:
    o <Developer Home>\forms90\java\jacob.jar;
    <Developer Home>\forms90\java\frmwebutil.jar;
    <Developer Home>\forms90\java\f90all.jar;
    <Developer Home>\jdk\jre\lib\rt.jar;
    • Save the changes
    formsweb.cfg Configuration
    • Go to this directory:
    o <Developer Home>\forms90\server
    • Open the formsweb.cfg file.
    • Under the [Default] section
    o Find archive_jini=f90all_jinit.jar
    o Comment this line.
    o Add the following:
    �� archive_jini=f90all_jinit.jar,frmwebutil.jar,jacob.jar
    �� archive=f90all.jar
    • At the end of the formsweb.cfg file, Define a new section
    [webutil]
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    baseHTML=webutilbase.htm
    archive_jini=f90all_jinit.jar
    WebUtilArchive=frmwebutil.jar,jacob.jar,f90all.jar
    archive=frmwebutil.jar,f90all.jar
    lookAndFeel=oracle
    • Save the changes.
    webutil.cfg Configuration
    • Go to this directory:
    o <Developer Home>\forms90\server
    • Open the webutil.cfg file.
    • At the end of this file add the following
    o transfer.database.enabled=TRUE
    o transfer.appsrv.enabled=TRUE
    Registry Configuration
    • In the registry editor find FORMS90_BUILDER_CLASSPATH
    • Modify by appending this line:
    o <Developer Home>\forms90\java\jacob.jar;
    <Developer Home>\forms90\java\frmwebutil.jar;
    <Developer Home>\forms90\java\f90all.jar;
    <Developer Home>\jdk\jre\lib\rt.jar;
    • Note: The total length of the FORMS90_BUILDER_CLASSPATH cannot exceed
    512 characters.
    • If the FORMS90_BUILDER_CLASSPATH exceeds 512 characters, you will get
    this error when you start the Forms Builder:
    o FRM-18122: Oracle Forms Debugger failed to Initialize.
    • To solve this problem make the following:
    o Return FORMS90_BUILDER_CLASSPATH to its previous value.
    o Workaround FORMS90_BUILDER_CLASSPATH by defining new
    environment variables (user variables):
    Variable Name Variable Value
    WEBUTIL_CONFIG <Developer Home>\forms90\server\webutil.cfg
    CLASSPATH <Developer Home>\forms90\java\jacob.jar;
    <Developer Home>\forms90\java\frmwebutil.jar;
    <Developer Home>\forms90\java\f90all.jar;
    <Developer Home>\jdk\jre\lib\rt.jar;
    Configuring Database for WebUtil
    • Start SQL*Plus as SYSDBA, and issue
    o CREATE USER webutil IDENTIFIED BY [password]
    DEFAULT TABLESPACE users
    TEMPORARY TABLESPACE temp;
    o GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC
    SYNONYM TO webutil;
    • Start iSQL*Plus as webutil
    o Load the script create_webutil_db.sql
    (You find this script under webutil_106 zip file after extract it)
    o Execute the script.
    o You will get this message:
    PACKAGE CREATED
    PACKAGE Body CREATED
    • Start SQL*Plus as webutil, and issue
    o CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
    • Reconnect as SYSDBA, and issue:
    o GRANT EXECUTE ON webutil_db TO PUBLIC;
    • Start the OC4J instance.
    • Start Forms Builder and connect to your schema.
    o Open webutil.olb
    o Open webutil.pll
    • Compile ALL (Shift-Control-K)
    • Generate PLX (Control-T).
    • If the PLX is not generated, the webutil.pll library would have to be
    attached with full path information to all forms wishing to use WebUtil. This is
    NOT recommended.
    • Create a new Form
    o Open webutil.olb, and Subclass (not Copy) the WEBUTIL object to
    the Object Groups of your form.
    o There is no need to Subclass the WEBUTILCONFIG object.
    o Attach the webutil.pll Library, and remove the path.
    o When you open the WEBUTIL_CANVAS in layout editor,

  • Find & replace part of a string in Numbers using do shell script in AppleScript

    Hello,
    I would like to set a search-pattern with a wildcard in Applescript to find - for example - the pattern 'Table 1::$*$4' for use in a 'Search & Replace script'
    The dollar signs '$' seem to be a bit of problem (refers to fixed values in Numbers & to variables in Shell ...)
    Could anyone hand me a solution to this problem?
    The end-goal - for now - would be to change the reference to a row-number in a lot of cells (number '4' in the pattern above should finally be replaced by 5, 6, 7, ...)
    Thx.

    Hi,
    Here's how to do that:
    try
        tell application "Numbers" to tell front document to tell active sheet
            tell (first table whose selection range's class is range)
                set sr to selection range
                set f to text returned of (display dialog "Find this in selected cells in Numbers " default answer "" with title "Find-Replace Step 1" buttons {"Cancel", "Next"})
                if f = "" then return
                set r to text returned of (display dialog "Replace '" & f & "' with " default answer f with title "Find-Replace Step 2")
                set {f, r} to my escapeForSED(f, r) -- escape some chars, create back reference for sed
                set tc to count cells of sr
                tell sr to repeat with i from 1 to tc
                    tell (cell i) to try
                        set oVal to formula
                        if oVal is not missing value then set value to (my find_replace(oVal, f, r))
                    end try
                end repeat
            end tell
        end tell
    on error number n
        if n = -128 then return
        display dialog "Did you select cells?" buttons {"cancel"} with title "Oops!"
    end try
    on find_replace(t, f, r)
        do shell script "/usr/bin/sed 's~" & f & "~" & r & "~g' <<< " & (quoted form of t)
    end find_replace
    on escapeForSED(f, r)
        set tid to text item delimiters
        set text item delimiters to "*" -- the wildcard 
        set tc1 to count (text items of f)
        set tc2 to count (text items of r)
        set text item delimiters to tid
        if (tc1 - tc2) < 0 then
            display alert "The number of wildcard in the replacement string must be equal or less than the number of wildcard in the search string."
            error -128
        end if
        -- escape search string, and create back reference for each wildcard (the wildcard is a dot in sed) --> \\(.\\)
        set f to do shell script "/usr/bin/sed -e 's/[]~$.^|[]/\\\\&/g;s/\\*/\\\\(.\\\\)/g' <<<" & quoted form of f
        -- escape the replacement string, Perl replace wildcard by two backslash and an incremented integer, to get  the back reference --> \\1 \\2
        return {f, (do shell script "/usr/bin/sed -e 's/[]~$.^|[]/\\\\&/g' | /usr/bin/perl -pe '$n=1;s/\\*/\"\\\\\" . $n++/ge'<<<" & (quoted form of r))}
    end escapeForSED
    For what you want to do, you must have the wildcard in the same position in both string. --> find "Table 1::$*$3", replace "Table 1::$*$4"
    Important, you can use no wildcard in both (the search string and the replacement string) or you can use any wildcard in the search string with no wildcard in the replacement string).
    But, the number of wildcard in the replacement string must be equal or less than the number of wildcard in the search string.

  • Find & Replace

    I'm trying to get DW 8 to allow me to remove some of the
    "found" items before using the replace function to avoid having to
    open each file individually - but when I delete entries from the
    "found" list, on r-click I'm given 3 options:
    - Open File
    - Find & Replace
    - Clear Results
    The Find & Replace option takes me back to the original
    Find & Replace screen. With DW4 you have the option of deleting
    some of the "found" entries before pressing the "replace" button.
    Has DW really taken a backward step?

    I neevr used DW4, so I'm not certain how that worked. And it
    doesn't look like you can delete entries from the Search panel.
    You might use other techniques to limit your changes. Any
    folders or files that are cloaked will not be updated by the
    Replace. You can set cloaking for specific files or folders, or by
    file extension (on the Site panel). Or, you could select only the
    files you want to target and use the Selected Files in Site option
    of the Find In drop-down. Or, you could use the Replace button in
    the Find/Replace panel to go through the results one at a time,
    rather than using Replace All.
    If you are changing HTML tags or attributes, the Find/Replace
    options are very powerful.

  • Add on custom button to ALV toolbar in std tcode ME51N, ME52N and ME53N.

    Hi All,
    I have the requirement to add on the custom button to ALV toolbar in ITEM OVERVIEW for standard transaction ME51N, ME52N and ME53N. Does anyone know what enhancement point or user exit i should apply and how i can add on the custom button?
    Thanks.

    There are no user exits or badi's for COOIS. You may have to make copy of the PPIO_ENTRY to ZPPIO_ENTRY including all the varians without changing their names like copy SAP&COOIS to SAP&COOIS. Create a T-Code ZCOOIS and replace COOIS in variant SAP&COOIS to ZCOOIS not in the name of the variant but in the field "Check Authorization for".
    The PF-Status is found in the include LCOISOUTPUTF16 which is located in the function group COISOUTPUT you may have to copy that too. Finally you need to copy SAPLCOISOUTPUT with its GUI status GENERAL and add your custom button there.

  • Find Replace from Textfile with regex

    Hello.
    I'm wondering if anyone knows about an existing script that does a find/replace by list like the script "FindChangeByList.jsx" that comes with every InDesign installation.
    This consists of tow parts, the script itself with the functionality and a simple textfile where you have simple one-liners capable of find/replace with regex.
    the Textfile:
    //FindChangeList.txt
    //A support file for the InDesign CS4 JavaScript FindChangeByList.jsx
    //This data file is tab-delimited, with carriage returns separating records.
    //The format of each record in the file is:
    //findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
    //Where:
    //<tab> is a tab character
    //findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
    //findProperties is a properties record (as text) of the find preferences.
    //changeProperties is a properties record (as text) of the change preferences.
    //findChangeOptions is a properties record (as text) of the find/change options.
    //description is a description of the find/change operation
    //Very simple example:
    //text          {findWhat:"--"}          {changeTo:"^_"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double dashes and replace with an em dash.
    //More complex example:
    //text          {findWhat:"^9^9.^9^9"}          {appliedCharacterStyle:"price"}          {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}          Find $10.00 to $99.99 and apply the character style "price".
    //All InDesign search metacharacters are allowed in the "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
    //If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
    //as shown in the example below:
    //{findWhat:"\\s+"}
    grep          {findWhat:"  +"}          {changeTo:" "}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double spaces and replace with single spaces.
    grep          {findWhat:"\r "}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a space And replace with single returns.
    grep          {findWhat:" \r"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a space and replace with single returns.
    grep          {findWhat:"\t\t+"}          {changeTo:"\t"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double tab characters and replace with single tab characters.
    grep          {findWhat:"\r\t"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a tab character and replace with single returns.
    grep          {findWhat:"\t\r"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a tab character and replace with single returns.
    grep          {findWhat:"\r\r+"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double returns and replace with single returns.
    text          {findWhat:" - "}          {changeTo:"^="}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all space-dash-space and replace with an en dash.
    text          {findWhat:"--"}          {changeTo:"^_"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all dash-dash and replace with an em dash.
    The script:
    //FindChangeByList.jsx
    //An InDesign CS5.5 JavaScript
    @@@BUILDINFO@@@ "FindChangeByList.jsx" 3.0.0 15 December 2009
    //Loads a series of tab-delimited strings from a text file, then performs a series
    //of find/change operations based on the strings read from the file.
    //The data file is tab-delimited, with carriage returns separating records.
    //The format of each record in the file is:
    //findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
    //Where:
    //<tab> is a tab character
    //findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
    //findProperties is a properties record (as text) of the find preferences.
    //changeProperties is a properties record (as text) of the change preferences.
    //findChangeOptions is a properties record (as text) of the find/change options.
    //description is a description of the find/change operation
    //Very simple example:
    //text          {findWhat:"--"}          {changeTo:"^_"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double dashes and replace with an em dash.
    //More complex example:
    //text          {findWhat:"^9^9.^9^9"}          {appliedCharacterStyle:"price"}          {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}          Find $10.00 to $99.99 and apply the character style "price".
    //All InDesign search metacharacters are allowed in the "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
    //If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
    //as shown in the example below:
    //{findWhat:"\\s+"}
    //For more on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html
    //or visit the InDesign Scripting User to User forum at http://www.adobeforums.com
    main();
    function main(){
              var myObject;
              //Make certain that user interaction (display of dialogs, etc.) is turned on.
              app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
              if(app.documents.length > 0){
                        if(app.selection.length > 0){
                                  switch(app.selection[0].constructor.name){
                                            case "InsertionPoint":
                                            case "Character":
                                            case "Word":
                                            case "TextStyleRange":
                                            case "Line":
                                            case "Paragraph":
                                            case "TextColumn":
                                            case "Text":
                                            case "Cell":
                                            case "Column":
                                            case "Row":
                                            case "Table":
                                                      myDisplayDialog();
                                                      break;
                                            default:
                                                      //Something was selected, but it wasn't a text object, so search the document.
                                                      myFindChangeByList(app.documents.item(0));
                        else{
                                  //Nothing was selected, so simply search the document.
                                  myFindChangeByList(app.documents.item(0));
              else{
                        alert("No documents are open. Please open a document and try again.");
    function myDisplayDialog(){
              var myObject;
              var myDialog = app.dialogs.add({name:"FindChangeByList"});
              with(myDialog.dialogColumns.add()){
                        with(dialogRows.add()){
                                  with(dialogColumns.add()){
                                            staticTexts.add({staticLabel:"Search Range:"});
                                  var myRangeButtons = radiobuttonGroups.add();
                                  with(myRangeButtons){
                                            radiobuttonControls.add({staticLabel:"Document", checkedState:true});
                                            radiobuttonControls.add({staticLabel:"Selected Story"});
                                            if(app.selection[0].contents != ""){
                                                      radiobuttonControls.add({staticLabel:"Selection", checkedState:true});
              var myResult = myDialog.show();
              if(myResult == true){
                        switch(myRangeButtons.selectedButton){
                                  case 0:
                                            myObject = app.documents.item(0);
                                            break;
                                  case 1:
                                            myObject = app.selection[0].parentStory;
                                            break;
                                  case 2:
                                            myObject = app.selection[0];
                                            break;
                        myDialog.destroy();
                        myFindChangeByList(myObject);
              else{
                        myDialog.destroy();
    function myFindChangeByList(myObject){
              var myScriptFileName, myFindChangeFile, myFindChangeFileName, myScriptFile, myResult;
              var myFindChangeArray, myFindPreferences, myChangePreferences, myFindLimit, myStory;
              var myStartCharacter, myEndCharacter;
              var myFindChangeFile = myFindFile("/FindChangeSupport/FindChangeList.txt")
              if(myFindChangeFile != null){
                        myFindChangeFile = File(myFindChangeFile);
                        var myResult = myFindChangeFile.open("r", undefined, undefined);
                        if(myResult == true){
                                  //Loop through the find/change operations.
                                  do{
                                            myLine = myFindChangeFile.readln();
                                            //Ignore comment lines and blank lines.
                                            if((myLine.substring(0,4)=="text")||(myLine.substring(0,4)=="grep")|| (myLine.substring(0,5)=="glyph")){
                                                      myFindChangeArray = myLine.split("\t");
                                                      //The first field in the line is the findType string.
                                                      myFindType = myFindChangeArray[0];
                                                      //The second field in the line is the FindPreferences string.
                                                      myFindPreferences = myFindChangeArray[1];
                                                      //The second field in the line is the ChangePreferences string.
                                                      myChangePreferences = myFindChangeArray[2];
                                                      //The fourth field is the range--used only by text find/change.
                                                      myFindChangeOptions = myFindChangeArray[3];
                                                      switch(myFindType){
                                                                case "text":
                                                                          myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                                                          break;
                                                                case "grep":
                                                                          myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                                                          break;
                                                                case "glyph":
                                                                          myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                                                          break;
                                  } while(myFindChangeFile.eof == false);
                                  myFindChangeFile.close();
    function myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
              //Reset the find/change preferences before each search.
              app.changeTextPreferences = NothingEnum.nothing;
              app.findTextPreferences = NothingEnum.nothing;
              var myString = "app.findTextPreferences.properties = "+ myFindPreferences + ";";
              myString += "app.changeTextPreferences.properties = " + myChangePreferences + ";";
              myString += "app.findChangeTextOptions.properties = " + myFindChangeOptions + ";";
              app.doScript(myString, ScriptLanguage.javascript);
              myFoundItems = myObject.changeText();
              //Reset the find/change preferences after each search.
              app.changeTextPreferences = NothingEnum.nothing;
              app.findTextPreferences = NothingEnum.nothing;
    function myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
              //Reset the find/change grep preferences before each search.
              app.changeGrepPreferences = NothingEnum.nothing;
              app.findGrepPreferences = NothingEnum.nothing;
              var myString = "app.findGrepPreferences.properties = "+ myFindPreferences + ";";
              myString += "app.changeGrepPreferences.properties = " + myChangePreferences + ";";
              myString += "app.findChangeGrepOptions.properties = " + myFindChangeOptions + ";";
              app.doScript(myString, ScriptLanguage.javascript);
              var myFoundItems = myObject.changeGrep();
              //Reset the find/change grep preferences after each search.
              app.changeGrepPreferences = NothingEnum.nothing;
              app.findGrepPreferences = NothingEnum.nothing;
    function myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
              //Reset the find/change glyph preferences before each search.
              app.changeGlyphPreferences = NothingEnum.nothing;
              app.findGlyphPreferences = NothingEnum.nothing;
              var myString = "app.findGlyphPreferences.properties = "+ myFindPreferences + ";";
              myString += "app.changeGlyphPreferences.properties = " + myChangePreferences + ";";
              myString += "app.findChangeGlyphOptions.properties = " + myFindChangeOptions + ";";
              app.doScript(myString, ScriptLanguage.javascript);
              var myFoundItems = myObject.changeGlyph();
              //Reset the find/change glyph preferences after each search.
              app.changeGlyphPreferences = NothingEnum.nothing;
              app.findGlyphPreferences = NothingEnum.nothing;
    function myFindFile(myFilePath){
              var myScriptFile = myGetScriptPath();
              var myScriptFile = File(myScriptFile);
              var myScriptFolder = myScriptFile.path;
              myFilePath = myScriptFolder + myFilePath;
              if(File(myFilePath).exists == false){
                        //Display a dialog.
                        myFilePath = File.openDialog("Choose the file containing your find/change list");
              return myFilePath;
    function myGetScriptPath(){
              try{
                        myFile = app.activeScript;
              catch(myError){
                        myFile = myError.fileName;
              return myFile;
    This is a very useful and easy to maintain script which even people who cant write scripts (but know how to use regex) can do complex search replace mass replacements.
    Would love to find something like this for FrameMaker 12 (as i can't write scripts myself).
    regards
    daniel

    I have visited that site. The first item in the external link says: "You can also configure Firefox to automatically search for text when you type any characters outside of a text field. When typing in a text field these characters should show up in the text field and not trigger the Quick Find bar. "
    What I am looking for is the exact opposite. Once my first search is entered in the text box, and the info comes back, I want to start typing the next symbol, and have it automatically show up in the text box, not the Quick Find box. That is how it was working up until a couple of months ago.

  • How do i add an email button to an editable pdf

    how do i add an email button to an editable pdf

    Hi Rocco290,
    You will need Acrobat to add an email button to that PDF. Here are instructions from the Acrobat X Help: http://help.adobe.com/en_US/acrobat/X/pro/using/WSBB6EF75F-BC3D-4094-B787-FB76DAE1EBDC.w.h tml
    If you have a different version of Acrobat, you'll find a link to both the Acrobat 9 and Acrobat XI Help in the bottom-right corner of the page I've linked you to.
    Please let us know how it goes!
    Best,
    Sara

  • Add to favorites button

    I would like to have an add to favorites button on my flash
    website but it just won't work. I have copied the code from this
    website
    http://www.actionscript.org/resources/articles/24/1/Bookmark-to-IE/Page1.html
    into a new flash movie but when I put it into internet explorer 7
    it won't do anything. but the button on the website above does
    work. so I downloaded the fla from the site above, put it into
    flash 8 and then exported it and guess what it didn't work. this is
    the code I am using.
    on (release) {getURL
    ("javascript:window.external.AddFavorite('
    http://www.actionscript.org/','ActionScript.org
    Flash Resources');");
    is there a setting in flash I need to change so that it can
    'talk' to internet explorer, because all websites that have
    tutorials for add to favorites buttons use the same code, but it
    won't work on my computers.
    thanks for any help
    trigger2160

    it's not a flash issue. it's a browser (and possibly pop-up
    blocker) issue.
    flash can cause any javascript function to execute (though
    you'd be better served to use the externalinterface class rather
    than getURL). you need to find a javascript function that works
    with the browsers that want.

  • How to add a custom button on Application Toolbar for ME21N, ME22N & ME23N

    Hi Experts,
    I am new to this forum. I hope someone will help me.
    My Requirement is as :
    I want to add a new custom button on Application Toolbar for ME21N, ME22N & ME23N.
    There are already standard buttons in this toolbar which is Document Overview On, Hold, Personal Settings etc.
    So after the 'personal settings' button i want add a new button and want to write a code which will open one custom screen.
    I am not able to find any exit for this....
    Please help...
    Thanks....

    Hey Buddies
    Try below BADI : ME_PROCESS_PO_CUST
    and check with required methods.
    1)PROCESS_ITEM
    2)CHECK
    3)POST
    Regards,
    Pranav

  • Using Grep to find/replace

    I'm trying to find out how to use GREP in find/replace to chage the formatting of some text that comes in from a spreadsheet.
    I worked out the GREP query "~b(\d\d)~b", which finds a paragraph return, followed by two digits, followed by another paragraph return
    and then it is replaced by "\t $1~b", which is a tab, the two found digits and a para return.
    What i need to do is to amend the query to find ANY number of digits, (which may be comma delimited: eg 23, 36, 48 ,50), and then replace with a tab + found text.
    I suppose what I'm looking for is a way for the query to find "any text between two paragraph returns, no matter what tthe length", but I don't know how to do this.All the Wildcard options seem to find just one exampler (one digit, one character etc)

    And you came so far
    The operators for repeat are ? (zero or once), * (zero or more) and + (once or more). You can also specify exact numbers: {at least,up to}.
    All of these operators are "greedy" by default -- they will match as much as possible. To match as least as possible (which I'm sure you'll come up against, sooner or later), add another ? after the repeat expression.
    So this will find one digit, then optionally another (which will always be included):
    \d\d?
    and this one digit, then zero or as much as ten million million zillion:
    \d\d*
    which is functionally the same as
    \d+
    And this will find between 3 and 8 digits but will forced to use the shortest possible match:
    \d{3,8}?
    That said: A quick & dirty solution for your actual problem is to find any amount of digits, spaces, and comma's:
    ~b[\d, ]+~b
    (we need the plus here because otherwise it would also match an empty line). The [..] brackets an Inclusive list --- it will match any of the single codes inside.
    A more complicated but 'neater' way is to search very specifically only for number, comma, space, number sequences -- it's neater because that way malformed lines (comma without a space) will be skipped!
    (It also introduces another code -- the parentheses operators. Look them up in a good GREP reference --lost of people are enthousiastic about Peter Kahrel's O'Reilly title, because it's about using GREP in InDesign.)
    ~b\d+(, \d+)*~b

  • Is there a way to Find & Replace within a selection?

    I looked in the User Guide, but I didn't find any information on how to Find & Replace just within selected text. I can see how to do it for the entire document or do it one instance at a time. Is there a trick I'm missing, or is this a missing feature?

    Hey Chuck,
    I opened Pages and used its help menu and came up with this. It does not specifically mention anything about choosing just 1 paragraph or text box, but I hope it helps you none the less.
    +Finding and Replacing Text+
    +You can find every instance of a word or phrase in your document, and optionally change it to something else.+
    +Here are ways to find and replace text:+
    +Choose Edit > Find > Find, click Simple or Advanced to set up find/replace criteria, and then click a button to conduct find/replace operations.+
    +Simple: In the Find field, type the text you want to find, and type any text you want to replace it with in the Replace field.+
    +Advanced: In addition to typing Find and Replace text, you can set up additional find/replace criteria.+
    +Replace All: Automatically conducts the find/replace operation without your review.+
    +Replace: Replaces the current selection with the replacement text.+
    +Replace & Find: Replaces the current selection with the replacement text and immediately finds the next occurrence of the Find text.+
    +Next or Previous: Finds the next or previous occurrence of the Find text.+
    +Use the other commands on the Edit > Find submenu.+
    +Find Next or Find Previous: Finds the next or previous occurrence of the current Find text.+
    +Use Selection for Find: Finds the next occurrence of the selected text.+
    +Jump to Selection: Displays the selected text when it’s not currently in view.+
    Adam

  • [JS CS3] Add shortcutKey to Button?

    I wrote a script with a UIdialog asking for replacing several things or not. It works fine but I'm not able to add a shortkey to my "replace"-button?
    Did anyone know what I've forgot or done wrong?
    var myDialog = new Window('dialog', 'Search and Replace', undefined, {maximizeButton:false, minimizeButton:false});
    with(myDialog){
        with(add('group')){
            myReplaceButton = add('button', undefined, "Replace", {name:'ok'});
            myReplaceButton.shortcutKey = "F3";
            myReplaceButton.onClick = function(){ myDialog.close(1) };
            myReplaceButton.onShortcutKey = function(){ myDialog.close(1) };
            myCloseButton = add('button', undefined, "Cancel", {name:'cancel'});
            myCloseButton.onClick = function(){ myDialog.close(2) };
    Regards
    H.

    Are you sure? ...
    I copied your original script, added 'myDialog.show()' at the bottom. Hotkey "F3" didn't work. Changed it to 'r', and it worked. I'm on CS4, and some ScriptUI features changed just a bit, so I tried the same in CS3. It worked there as well. Really.
    The hotkey, by the way, is plain 'r', not with alt or shift or control down as well (or option or command -- okay, that's a joke). Add this alerts
    myReplaceButton.onClick = function(){ myDialog.close(1); alert ("okayed"); };
    myReplaceButton.onShortcutKey = function(){ myDialog.close(1); ; alert ("okayed by r"); };
    myCloseButton.onClick = function(){ myDialog.close(2); alert ("cancelled"); };
    and you will able to see which event occurred.

Maybe you are looking for

  • C3-00 = Problem with Communities

    Hello, ich have a problem with Comunities. I can`t log in to my Facebook Profile. The e-mail adress and passwort are correct. I see de Facebook mask and the next second a mistake. I have the same problem with Snaptu. Can somebody help me? Sorry for m

  • Why does ad blocker not work?

    this will be complicated.... my anti virus software, avast also notifies users that software is not up to date. when i updated that software i also got unwanted sh*t without my knowledge. those items include my PC back up and arcadeplayer. arcade pla

  • Stand-alone client - lookup problem

    I have a stand-alone Java client application (ContactClient) that I want to use to access an EJB called Contact. I am using J2EE, deploying with deploytool. The EJB has a JNDI name of "MyContact", and the Client reference is "ejb/TheContact". The rel

  • How to call C functions from native functions?

    Hi, I want to call a C function from a JNICALL? i wrote somthin like this: #include "ParamInput1.h" #include <jni.h> #include <stdio.h> #include "testPhase1.h" JNIEXPORT void JNICALL Java_ParamInput1_phase1(JNIEnv *env,                jobject obj,   

  • Convert Selection For iPod--Video Problems

    I've got video in iTunes, that's not the problem. I've checked, iTunes and QuickTime are both up-to-date. When I try and sync the videos to my 80gig iPod, it tells me that they can not be synced because they are not the right format. They're all .mp4