FindChangeByList and associated text files

I'm trying to convert from CS2 to CS5 and need to update all my text files that run with the FindChangeByList script. I did not write these files, but has been involved in the decision to use our process so that my knowledge of them is minimal. Unfortunately, no one left to my company doesn't have any knowledge of them is to me to dig and to update. I was able to determine the majority of the conversion, but am stuck on the last "column.

An example of our existing script looks like this:

{"findText:" "^ t"}     {changeText: "^ t"} all the
{findText: "' ^ t ^ t '"}     {changeText: "^ t"} all the
{"findText:" "^ p"}     {changeText: "^ p"} all the
{findText: "' ^ t ^ p '"}     {changeText: "^ p"} all the
{findText: "" ^ p ^ t ' "}     {changeText: "^ p"} all the
{"RechercherTexte:" "-"}     {' changeText: "^ =" "} all the
{"RechercherTexte:"-""}     {' changeText: "^ =" "} all the
{findText: ' AM ^ p '}     {' changeText: ' am ^ p ""} once
{findText: "PM ^ p '}     {changeText: ' h ^ p "" '} once
{findText: ' AM ^ t '}     {' changeText: ' am ^ t ""} once
{findText: "PM ^ t '}     {changeText: ' h ^ t "" "} once

I'm converting it to this:

text {"findWhat:" ^ t ""} {"changeTo:" "^ t"} {}

text {findWhat: "^ t ^ t"} {changeTo: "" ^ t ""} {}

text {"findWhat:" ^ p ""} {"changeTo:" ' ^ p '} {}

text {findWhat: "^ t ^ p"} {changeTo: "" ^ p ""} {}

text {findWhat: "^ p ^ t"} {changeTo: "" ^ p ""} {}

text {"findWhat:"-""} {"changeTo: ' ^ = ' '} {}

text {"findWhat: '-' '} {' changeTo: ' ^ = ' '} {}

text {findWhat: ' AM ^ p "" '} {' changeTo: ' ' am ^ p '} {}

text {findWhat: ' PM ^ p "" '} {changeTo: ' h ^ p '} {}

text {findWhat: ' AM ^ t "" "} {" changeTo: ' ' am ^ t '} {}

text {findWhat: ' PM ^ t "" "} {changeTo: ' h ^ t '} {}

I know I'm supposed to enter text in the direction of caseSensitive:true, wholeWOrd:false, etc. Is there a quick way to determine if it is said once, it should be changed to say {} and if everything says to use {}, or can I go line by line to determine what should be the appropriate label?

These are lines of the version of CS4 FindChangeByList - CS5 could have an updated version (even if the command find/replace has not changed):

text {"findWhat: '-' '} {changeTo:" ^ = "} {includeMasterPages:true, includeHiddenLayers:true, includeFootnotes:true, wholeWord:false} search all space-dash-space and replace it with an en dash.

grep {"findWhat:" + ""} {"changeTo: ' ' '} {includeMasterPages:true, includeHiddenLayers:true, includeFootnotes:true, wholeWord:false} find all double spaces and replace them with single spaces.

It looks like you can change all with an advanced text editor (Textpad on the PC), TextWrangler on Mac - no TextEdit or Notepad using a couple of find/changes.
The 'all' / 'once' stuff are more necessary because it was for change, for example, 3 spaces on 2, then 2-1, until no 2 places have been found. With GREP, you can do that, "in one go"-as in, the search for '+' - two spaces as well as a more - and replace it with a space. Even with several tabs (rating of GREP is '\t', not "^ t").
A little more 'better' ways, use GREP:
rather than {findText: ' AM ^ p "" '} {' changeText: ' "am ^ p"} once
Use grep {findWhat: "AM$"} {changeTo: 'am'} {includeMasterPages:true, includeHiddenLayers:true, includeFootnotes:true, wholeWord:false}
rather than {findText: "^ t ^ p"} {changeText: "^ p"} all the
use grep {findWhat: "\t+$"} {"changeTo: ' '} {(.. includeFootnotes etc.) }
Look in your CS5 FindChangeList.txt for more examples.
Important: between 'grep' / 'text' and the following ' {' and between the two ""} ' / ' {', and after the last one, there should be a single TAB - not one or several spaces.} Seems that the script can not yet grok that, even though people have been frustrated by her to the first version.

Tags: InDesign

Similar Questions

  • Transfer of blackBerry Smartphones and edit text files

    Hiya-

    I take a lot of notes, on my PC when I and on my Storm when I'm not.  I would like to be able to transfer text files from my PC to my Storm and be able to open it to make changes.

    I have access to more often figuratively media card out and can I transfer text files from the PC to the storm ok, but I can't see them in Notepad.  To access I have to go to the media, click on the button of the mobile phone menu, select Explorer and then access it (it is somewhat counter-intuitive and cumbersome, it would be better if the file tree is easily accessible at the top level and all files were available).  When I open the file, it does not resemble those of notebook, I can't change it, and I don't see where these MemoPad files to move it.  I thought they would be in the Documents folder.

    Are the files in Notepad, a different format of .txt files?

    In addition, to move files MemoPad of the storm to the PC, like discovery in the storm, I don't see the notebook files to move.

    Thank you.

    Hello!

    Buffer positions correspond to the Notes in Outlook (electronic yellow sticky notes). They are therefore also application data - which are usually hidden from direct view of the storm... and the file format is probably owners. Indeed, the BB OS does not work like Windows Explorer... There are things that are simply hidden away and is not accessible.

    I'm on BES - and I can create a block-Memo on the storm or a Note item in Outlook and they all have two OTA sync to another. If you are not on BES, I don't know if the DM software can synchronize them or not (sorry...).

  • Deploy multiple virtual machines from one model to the help of customization of the OS and a text file for hostname and IP

    Hi all

    Not sure if this has already been answered, I did a search on the forums, but couldn't find an answer to what I'm looking for.

    I want to fully automate the deployment of multiple VMs of a model using a customization file, but also to retrieve the host names and IP addresses from a text file / spreadsheet.

    for example:

    I need to deploy a test environment of 30 virtual machines using the template file and customizing TestVM. I have a spreadsheet with the VM host names and IP addresses. The process now is to manually enter the host name and IP when the customization file invites to do while deploying them in each virtual machine. The customization file takes care of the rest (license key, admin password, add to the domain etc.) can I automate entry of the name of host and IP addresses in reading from a text file?

    Thanks in advance!

    Take a look on the deployment, customization and modification of virtual machines to a csv file

    There are many more examples of this community on the same subject,

  • High Score Table: writing a Simple with Flash and PHP text file

    I'm having a problem getting Flash to work with PHP that I need Flash to read and write to a text file on a server to store data simple name partition for a games Hi score table. I can read the text file in Flash fairly easily, but I also have to write to the file when a new high score is reached, so I need to use PHP to do that. Can I send data from flash to php by POST file, but so far it does not. The PHP file is confirmed that the work that I added an echo in the file that displays a message to verify that the server is running PHP - files were also uploaded to a remote server so I could test them correctly. Flash code is as follows:

    FileWriter php

    var myLV = new LoadVars();

    sendData() {} function

    //sets variable 'hsdata' to send to php

    myLV.hsdata = myText;

    myLV.send ("hiscores.php");

    }

    I believe that it sends the variable "myText" in the php file in a variable called 'hsdata' I want the php file to write to a text file. The mytext variable is just a long chain that has all of the partitions and the names in the scores. OK, XML would be best way to do it, but for the speed, I want to just get the basic features of work, so store a shot of simple text is sufficient for now. The PHP code that reads the Flash variable "hsdata" and wrote for the "scores.txt" text file is due to:

    <? PHP

    sets the variable to the data posted from flash

    $flashdata = $_POST ['hsdata'];

    File Manager opens the file and clears all content with arg w

    $fh = fopen ("scores.txt", "w");

    Adds data to the file

    fwrite ($fh, $flashdata);

    closes the file

    fclose ($fh);

    echo "php file works;

    ? >

    Any help with this would be greatly appreciated - once I get php to write text files simple I should be ok. Thank you.

    var outLV = new LoadVars();

    var inLV = new LoadVars();

    sendData() {} function

    outLV.hsdata = 'Hello from Flash';

    outLV.sendAndLoad ("http://www.mysite.com/hiscores/test23.php", inLV,"POST");

    }

    inLV.onLoad = {function (success)}

    If (success) {}

    sets the dynamic text box to show the variable sent by php

    statusTxt.text = this.phpmess;

    } else {}

    statusTxt.text = 'No Data Received';

    }

    };

    It works well and function of inLV.onLoad of the reports it receives data, but does not display the variable received from PHP. The PHP file is like this:

    <>

    $mytxt = $_POST ['hsdata'];

    $myfile = "test23.txt";

    $fh = fopen ($myfile, 'w');

    Adds data to the file

    fwrite ($fh, $mytxt);

    closes the file

    fclose ($fh);

    $mess = "Hello there php ';

    echo "phpmess =". "." $mess;

    ?>

  • [LIKE, CS4] Import and export text file that contains the tag: encoding problem

    Hello

    I have a script that exports a text selection into a temporary folder (Unicode) text file with label. This file is then loaded in a variable AS and transformed line-by-line for some changes to the text. Subsequently a new text file with the modified content is written.

    Up to CS2 (and 10.4 PPC) this script worked like a charm. He stopped working with the new system and Intel. Meanwhile, I discovered that it must have something to do with encoding problems. «Everything in the old writing with ' as a unicode text "forced a mistake (since AS 2 each text is processed as UTF - 16), so I changed these lines to ' as text '.»

    In addition, I realized, that InDesign exports to tag text Unicode like UTF-16 (little endian), but importing tagged text to UTF-16BE (big-endian). "As variables and" write iconv ' command uses MACROMAN, so I added a few conversions with ""and it worked.

    Unfortunately the last conversion of MACROMA in UTF-16BE converts all spaces in the output string en normal spaces.

    I am therefore a little at my end of the problem. Can someone help me please?

    See you soon

    Tobias

    [InDesign 6.0.4 with AppleScript on Mac OS v2.0.1 X 10.5.8, Intel]

    A code for the relevant parts:

    Export as referenced text selection:

    on TMPexportTaggedText(myFileName, myText, myEncoding)
        tell application "Adobe InDesign CS4"
            tell tagged text export preferences
                if myEncoding = "ascii" or myEncoding = 1 then
                    set character set to ASCII
                else if myEncoding = "ansi" or myEncoding = 2 then
                    set character set to ansi
                else if myEncoding = "unicode" or myEncoding = 3 then
                    set character set to unicode
                else if myEncoding = "jis" or myEncoding = 4 then
                    set character set to shift JIS
                else if myEncoding = "gb" or myEncoding = 5 then
                    set character set to GB18030
                else if myEncoding = "ks" or myEncoding = 6 then
                    set character set to KSC5601
                else
                    set character set to ansi
                end if
                set tag form to abbreviated
            end tell
            export myText format tagged text to (myFileName) without showing options
        end tell
        tell application "Finder"
            try
                do shell script "iconv -f UTF-16LE -t UTF-16 " & (POSIX path of myFileName) & " > " & (POSIX path of myFileName) & "1"
                set myFileName to myFileName & "1"
            end try
        end tell
    end TMPexportTaggedText
     
    

    Line and placement in InDesign (circleLines not the textual changes and throw a string with):

    set theOutput to my circleLines(IN_File & "1", myOptions)
        
    if theOutput ≠ "" then
      tell application "Finder"
        open for access file (OUT_File & "1") with write permission
        write (theOutput) to file (OUT_File & "1")
        close access file (OUT_File & "1")
        try
           do shell script "iconv -f MACROMAN -t UTF-16BE " & (POSIX path of (OUT_File & "1")) & " > " & (POSIX path of OUT_File)
           do shell script "cat " & (POSIX path of OUT_File) & " | tr '\\n' '\\r'"
        end try
      end tell
    end if
        
    place (OUT_File) on curSel without showing options
    
     
    

    The string output with

        write (theOutput) to file (OUT_File & "1") as unicode text
    
    an error of InDesign (bodychecking).

    The problem is not as long as ID's export is little-endian - someone ' one has not heard of Intel chips - but it does not add a byte order mark. If you add a BOM, the problem should go away. Here's how you can add a Bill adapted to an exported file to tag:

    the fileRef value (open for access file "Macintosh HD:Users:shane:Desktop: Untitled - 16.txt" with write permission)

    the value of x to read fileRef

    Set x to character id {711, 731} & x - add THE BOM

    write x to fileRef starting with 0

    FileRef close access

    Then you can read it using "text Unicode", and it should also cross-platform very well.

    And stop putting your file read/write inside blocks Finder - is not the business of the Finder.

  • ASDoc and associated .as files

    I'm trying to generate documentation using asdoc, for a Flash project that includes classes designed for active links to library. However, asdoc leaves with errors on these classes, and it is obvious that the problem is what appears to the compiler as 'undeclared properties', which are actually part of the assets in the library.

    An error in the example is: "error: access of undefined property mBack.»

    where mBack is actually a background MovieClip defined within the library fla files using the class.

    Does anyone have an ideas to work around the problem?

    For anyone interested, I found a solution. In the IDE, you must change the ActionScript of Flash publishing settings for NOT "Automatically declare stage instances." You can add explicit statements in the class .as file, which makes happy asdoc.

  • How to load the date and time from text file to oracle using sqlloader table

    Hi friends

    I need you to show me what I miss loading date and time text file in a table oracle using sqlloader

    It's my data in this way (c:\external\my_data.txt)
    7369,SMITH,17-NOV-81,09:14:04,CLERK,20
    7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
    7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
    7566,JONES,02-APR-81,09:24:10,MANAGER,20
    7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30
    my table in the database emp2
    create table emp2 (empno number,
                      ename varchar2(20),
                      hiredate date,
                      etime date,
                      ejob varchar2(20),
                      deptno number);
    the code for the control in this path (c:\external\ctrl.ctl) file
    load data
     infile 'C:\external\my_data.txt'
     into table emp2
     fields terminated by ','
     (empno, ename, hiredate, etime, ejob, deptno)
    This is the error:
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Commit point reached - logical record count 5
    
    C:\>
    any help that I enjoyed

    Thank you

    Published by: user10947262 on May 31, 2010 09:47

    load data
    INFILE 'C:\external\my_data.txt '.
    in the table emp2
    fields completed by «,»
    (empno, ename, hiredate, etime, Elysa, deptno)

    Try

    load data
     infile 'C:\external\my_data.txt'
     into table emp2
     fields terminated by ','
     (empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
    

    This is the error:

    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Commit point reached - logical record count 5
    
    C:\>
    

    This isn't a mistake, you can see errors in the log file and bad.

  • USB for my iPhone, so it can read a text file

    Hi, I would like to be able to connect a standard USB to my iPhone, so it can read a text file from USB, any suggestions on cable/apps? Thank you, Tony

    Hello. In fact, you can use any USB adapter to connect your iPhone to the computer and transfer text files. Apple recommends the adapter like this http://www.apple.com/shop/product/MD820AM/A/lightning-to-micro-usb-adapter

  • Control the Structure of the event with text file

    I'm new relativaly in LabVIEW (experience only about 2 weeks). I am currently control a stepper motor using a structure of the event. Similar to the sample code given by LIFA, I entered my settings how the engine not move away, then press a button on the windows before, and it works this way. I also have other equipment that works as well in LabVIEW, as a transnational step; all components operate individually.

    Now, I'm trying to make the more automated system and to ensure that all the different equipment work in the same code. So, I tried to implement a structure of the event using a text as an input file to try to control events. The text file has a table 1 d of numbers going down vertically (only the line numbers change). So, I used a table of index function to take the numbers one by one, use a loop (while loop in this example) to go to the bottom of the column of numbers. However, the event not register the change, even if the indicator shows the value is changing.

    Attached, it's my test code and the text file that I use to try to control the structure of the event. Please let me know what I am doing wrong. Thank you.

    Oh, now I understand what you tried to say. I'm using a loop and a case structure to activate different events with the entries in the table. I thought case structures and event were the same, but you taught me the event structures are used just for the façade stuff. Thank you all!

  • Read a utf-8 text file

    Hi, until now, I used the default encoding for reading and writing text files, but I discovered it causes question marks trying to read or write the non-English characters, so I'm trying to change my code to use:

    inputstramreader and OutputStreamWriter inputreader and outputwriter, I have used before.

    However, I discovered the onlyworks linereader with InputStreamand not with inputstreamreader.

    also bufferedread is not available in api.

    It looks something like this:

    View linereader takes inputstream and not inputstreamreader.

              fc = (FileConnection) Connector.open(targetFolder + "file.txt", Connector.READ_WRITE);
                InputStream is = fc.openInputStream();
                InputStreamReader reader = new InputStreamReader(is, "UTF-8");
                String line = null;
                LineReader lineReader = new LineReader(is);
                try
                {
                    lineReader.readLine();  // skip header line
                    line = new String(lineReader.readLine());   // get line from file
                }
    

    so the question is, I have to manually write a function to read a line in the file? or is it an another workaround?

    You need to specify the encoding of the byte array and do not rely on the default encoding when you create a string to a byte array.

    Use this:

    line = new String(lineReader.readLine(), "UTF-8"));
    
  • How to read a text file in JDE

    Hello

    I'm developing an application where Ineed to read the whole part and a text file content.  Can someone give me some help which API orprocedure that I use.

    Thank you & best regards

    Anjan

    Just to be complete, you can package a file to your application and read it as explained in the following article.  I always use this mechanism sometimes, but I think that the SD card as suggested in the link provided by rafo is probably the way to go...

    How - to add plain text or binary files to an application
    Article number: DB-00148

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800620/How_To _...

  • How to concatenate strings with the lines of a text file

    Hello
    I tried concatenate strings with the lines of a text file, but something is wrong with my code and I belive is the agruments I use in the cycle for. If anyone can help me I will appreciate it very much.
    My code is:
    [code]@echo off
    the value "input=C:\Users\123\Desktop\List.txt".
    for /f "usebackq tokens = *" % in (' input % ') do)
    the value 'str1 = C:\some directory\ ".
    the value ' str2 = %% ~ F '.
    the value "str3 = .pdf".
    the value "str4 = str1% str2% str3%.
    echo.%STR4%
    ) [/ code]
    and the text file is something like:
    121122 [code]
    122233
    123344
    124455 [/ code]
    But I get only one wrong answer and I have to run it like 3 times to get a real result and it is a mistake, the first two are empty spaces and gives the third one as the last line of the text file but repeated n times, where n is the number of lines in the text file.
    Result:
    [code] C:\Users\123\Desktop>concatenate.bat
    C:\Users\123\Desktop>concatenate.bat
    C:\Users\123\Desktop>concatenate.bat
    C:\some directory\124455.pdf
    C:\some directory\124455.pdf
    C:\some directory\124455.pdf
    C:\some directory\124455.pdf
    C:\some directory\124455.pdf
    C:\Users\123\Desktop>[/code]
    So if anyone has an idea about what is wrong please let me know.
    Concerning
    -Victor-

    Hi Victor,

    This forum is dedicated to the support of the Office of consumer Windows (fonts, colors, personal settings).  Since your question is about programming and usually outside the context of most of the customers, I suggest you post your question in the forums as http://msdn.microsoft.com - the Microsoft network to users will be more adapted to help you in your quest.
  • Support of Photoshop for Nikon D750 and. NEF files

    When will be Photoshop and Bridge updated to support the Nikon D750 and associated .nef files? I am running 2014.2.1 x 64. Thank you very much.

    Adobe Photoshop Camera Raw 8.7 CC Release Candidate | support files raw digital camera - Adobe Labs

    This release candidate ACR will be. Bridge CC itself doesn't have an update as far as I know.

    Gene

  • Downloads slipped and fell from the download window of Firefox in Outlook email show text file location.

    I have a user who normally can drag the Firefox download window files in an e-mail message in Outlook and creates this file as an attachment in the e-mail message. However, in recent times, the moved .pdf or other record shows only upward as a location of text file as:

    \\file:%downloads%\randomfile.PDF

    It is not a link, it's just text.

    I tried to do a repair of Microsoft Outlook.
    I uninstalled and reinstalled Firefox 19.
    I tried dragging items from the Office to the e-mail and it works fine.
    I can't drag and drop downloads to the desktop window.

    I just wanted to add that this user is using Windows XP Pro.

    I just tried to back off at 18 and it works very well.

    As for your question Xtinch, I tried to disable all addons in Outlook and Firefox and the problem still occurs. At this point I'm very convinced that it is a bug in Firefox, 19-20.

  • I'm doing a script that takes a list of e-mail from a text file and then allow me to select a save as a string. I found some ways to get the path of the file, but I'm in check by pulling the list

    I found some ways to get the path of the file, but I am defeated by pulling the list from that. the function of the path get gives me the path as "Macintosh Users:: Documents: extractedb.txt (myUsername).

    What I can't understand is how to get a dialog box to display a list that represents the content in the text file, I need to change the contents of the text file, I need the box to show me what I chose and I want to save my selection as a single string.
    e '.

    example of extractedb.txt information:

    [email protected]

    [email protected]

    [email protected]

    * has a random number of emails as well *.

    I want this is to pull those emails from the text file and turn them into a list so I can get to be a selection in my dialog box.

    Any help would be great = D

    Assuming you have a text file with your example e-mail addresses, the following AppleScript will read this file in a list (mf_List) and then use this list as input to choose among the list. Because multiple selection is allowed (control button), the output is sent to a list (sel_addr). We check if the Cancel button was pressed by testing for false and if this condition is met, we the script error.  Based on a single or multiple list item content of the list, display accordingly.

    game of mf to ((path to the folder as text) & "mail_list.txt")

    the value mf_List to {}

    the value sel_addr to {}

    the value mf_List to paragraphs of (read file mf)

    the value sel_addr to (choose from the list mf_List with title ¬

    ('Mail list' with multiple selections allowed without empty selection allowed)

    If sel_addr is equal to false then

    Error number-128

    return

    end if

    If length of sel_addr is equal to 1 then

    sel_addr display dialog box as text

    on the other

    the value Point to the text of TID to AppleScript delimiters

    the value Point text in AppleScript return delimiters

    display the dialog box elements of sel_addr in the text

    the value Text of point AppleScript delimiters to TID

    end if

    return

Maybe you are looking for