Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Script to print Found strings on an InDesign page #92926
    Tim Guymon
    Member

    Kai–

    Thank you very, very much! This is just what I needed! Is there any way I can send you some money for this?–I would like to; this is invaluable information!

    One comment: I should have mentioned this, but the document itself is formatted, and each page has its own text frame. How would it work if the final two lines merely added foundlist to the current page?–I could then easily clip out the list and put it wherever I wanted.

    Thanks again!

    Regards,
    Tim

    in reply to: Script to print Found strings on an InDesign page #92924
    Tim Guymon
    Member

    Kai–

    Here is the script:

    var find = [
    // Old Testament
    “(Genesis|Gen.?)”,
    “(Exodus|Ex.?)”,
    “(Leviticus|Lev.?)”,
    “(Numbers|Num.?)”,
    “(Deuteronomy|Deut.?)”,
    “(Joshua|Josh.?)”,
    “(Judges|Jud.?)”,
    “(Ruth)”,
    “([12] (Samuel|Sam.?))”,
    “([12] (Kings|Kgs.?)”,
    “([12] (Chronicles|Chron.?)”,
    “(Ezra)”,
    “(Nehemiah|Neh.?)”,
    “(Esther)”,
    “(Job)”,
    “(Psalms|Ps.?)”,
    “(Proverbs|Prov.?)”,
    “(Ecclesiastes|Eccl.?)”,
    “(Song of Solomon)”,
    “(Isaiah|Isa.?)”,
    “(Jeremiah|Jer.?)”,
    “(Lamentations|Lam.?)”,
    “(Ezekiel|Ezek.?)”,
    “(Daniel|Dan.?)”,
    “(Hosea|Hos.?)”,
    “(Joel)”,
    “(Amos)”,
    “(Obadiah)”,
    “(Jonah)”,
    “(Micah)”,
    “(Nahum)”,
    “(Habakkuk)”,
    “(Zephaniah)”,
    “(Haggai)”,
    “(Zechariah)”,
    “(Malachi)”,
    // New Testament
    “(Matthew|Matt.?)”,
    “(Mark)”,
    “(Luke)”,
    “(John)”,
    “(Acts)”,
    “(Romans)”,
    “([12] Corinthians)”,
    “(Galatians)”,
    “(Ephesians)”,
    “(Phillippians)”,
    “(Colossians)”,
    “([12] Thessalonians)”,
    “([12] Timothy)”,
    “(Titus)”,
    “(Philemon)”,
    “(Hebrews)”,
    “(Proverbs)”,
    “(James)”,
    “([12] Peter)”,
    “([12] John)”,
    “(Jude)”,
    “(Revelations)”,
    // Book of Mormon
    “([1234] (Nephi|Ne?.?))”,
    “(Jacob|Jac.?)”,
    “(Enos)”,
    “(Jarom|Jar.?)”,
    “(Omni)”,
    “(Words of Mormon)”,
    “(Mosiah|Mos.?)”,
    “(Alma)”,
    “(Helaman|Hel.?)”,
    “(Mormon|Mor.?)”,
    “(Ether|Eth.?)”,
    “(Moroni|Mor.?)”,
    // Doctrine & Covenants
    “(Doctrine and Covenants|D&C)”,
    // Pearl of Great Price
    “(Moses)”,
    “(Abraham|Abr.?)”,
    “(Joseph Smith–Matthew|JS–M)”,
    “(Joseph Smith–History|JS–H)”,
    “(Articles of Faith)”,
    //Other books
    “(Documentary History of the Church|DHC)”,
    “(History of the Church|HC)”,
    ];
    //var prt = new Array(100);
    var ln = “”;
    app.findChangeGrepOptions = null;
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findChangeGrepOptions.includeFootnotes = true;
    for (var i = 0; i < find.length; i++)
    {
    ln = “(” + find[i] + ” d{1,3}[:–]d{1,3}([;–]d{1,3})?(, d{1,3})?(; d{1,3})?([:?]d{1,3})?)”;
    app.findGrepPreferences.findWhat = ln;
    app.changeGrepPreferences.fillColor = ‘C=0 M=100 Y=0 K=0’; //red
    app.changeGrepPreferences.changeTo = “$1”;
    app.activeDocument.changeGrep();
    // prt[i] = $1;
    }
    // for(var i = 0; i<find.length; i++)
    // alert(prt[i]);

    and a sample of a file:

    The collocation “refuse to be comforted,” as used here by Enoch, is abundantly attested throughout the Hebrew Bible. The Psalmist recalls, “In the day of my trouble I sought the Lord: my sore ran in the night, and ceased not: my soul refused to be comforted [m???nâ hinn???m napšî]” (Psalms 77:2 [MT 77:3]). Similarly, Jeremiah records the Babylonian destruction of Ramah in the tribal land of Benjamin, just north of Jerusalem at the time of the exile: “Thus saith the Lord; A voice was heard in Ramah, lamentation, and bitter weeping; Rahel [Rachel] weeping for her children refused to be comforted [m???nâ l?hinn???m] for her children, because they were not” (Jeremiah 31:15). Nearer the Noah story in Genesis, at the beginning of the Joseph cycle, we note Jacob’s making a similar declaration after his son Joseph’s apparent demise: “And all his sons and all his daughters rose up to comfort him [l?na??mô]; but he refused to be comforted [wa-y?m???n l?hitna??m]; and he said, For I will go down into the grave unto my son mourning. Thus his father wept for him” (Genesis 37:35).
    In the context of the narrative, Enoch’s declaration “I will refuse to be comforted” clearly anticipates the formal etiology subsequently proffered in Genesis 5:29/Moses 8:9: “And he called his name Noah, saying: This [son] shall comfort us [Hebrew y?na??m?nû] concerning our work and toil of our hands, because of the ground which the Lord hath cursed” (see further below). Enoch’s “refus[al] to be comforted” thus frames Noah’s story in an entirely new way and helps us understand the “comfort” which Lamech foresees (and which the Lord shows Enoch) Noah will bring. Noah and his posterity — specifically his descendant Jesus Christ — will eventually bring “comfort” and “rest” to the earth in a manner that vastly transcends the idea that the patriarch Noah would merely give “comfort” as a winemaker (see below). Noah’s seed would include the Messiah, who would atone so that “all they that mourn may

    Thanks for your help!

    Regards,
    Tim

    in reply to: Script to print Found strings on an InDesign page #92920
    Tim Guymon
    Member

    Hi, Kai,

    I appreciate from your reply that what I want is do-able; the problem is that I am a beginner. Although I have been shown enough to create a script that will find the strings I am looking for, I don’t know how to manipulate the “contents” of those findings other than to use “$1”–which doesn’t seem to work in the experiments I’ve tried. Can you show me a simple example of a script finding X string, then creating the textframe and writing that string on it? Thanks!

    Regards,
    Tim

    in reply to: Hot key or script control of Find/Change Panel? #90398
    Tim Guymon
    Member

    Thanks!

    in reply to: Hot key or script control of Find/Change Panel? #90396
    Tim Guymon
    Member

    I have MultiFindChange and used it blissfully with CC 2015, but when I updated to CC 2017, I was aghast to find MultiFindChange doesn’t work. I contacted Martinho, who was helpful, but when I mentioned that I have CC 2017 and asked if MFC works with it, I haven’t heard back. Maybe he’s in development.

    Regarding the 2nd part of your reply, the trouble is that my scripting skills aren’t to the point that I know how to use regular expressions in them. I’m pretty good at GREP–which is why I love the find/change panel–but after a couple of Lynda scripting courses, I’m only at the “use arrays to do find/changes” point. I guess it’ll take a few more Lynda courses to get to regular expressions.

    But BTW, what does KBSC mean (you’re dealing with a rank amateur here)–and if, I’m guessing, it means some sort of hot key, how do I assign such a thing?

    I’m much more the monkey-see, monkey-do sort of learner–can you send me to some examples of the use of regular expressions in scripts?

Viewing 5 posts - 1 through 5 (of 5 total)