
larryp22136904
Participant
larryp22136904
Participant
Activity
‎Nov 24, 2024
03:46 PM
Thanks for your reply, Frans. I appreciate it. Someone else on here mentioned that maybe Adobe forgot about the Index, when they fixed an issue with a return at the end. Might have been the ToC. Larry
... View more
‎Nov 21, 2024
01:15 AM
Thanks, Peter. Yes, you're probably right. Perhaps Abode forgot about the index. I just discovered it myself, and I think it's pretty cool. Saves time from changing page numbers manually. Even with the pesky return at the bottom. Thank for taking the time to respond.
... View more
‎Nov 17, 2024
07:31 AM
Thanks. You're right. It seems like the developers could fix this I tried everything I know. No worked. And it's just as easy to simply delete the return than go through the process of using a Find/Change or even a script with a shortcut key.
... View more
‎Nov 16, 2024
10:16 AM
Hello: I created an index and everything works great with one exception. When InDesgin creates or updates my index, it creates it with a return at the end of the index. Hidden characters turns on so you can see what I mean. I've tried several things to get InDesign to create the index without the return, but nothing seems to work. I know I can create a GREP code s+/r, to delete the return in Find/Change, or even write a script to delete the return. But that adds an additional step for designers to perform. Probably just easier to manually delete the return. I's there a way/method to get InDesign to NOT add the return when the index is created. Maybe I'm doing something wrong when I create the index, but when I watch videos about InDesign indexing, all the videos also show/have the return at the end too. So maybe that is just the way InDesign creates its indexes. I would like to get your feedback and suggestions if there is a way to get InDesign to create the index without that pesky return at the bottom. Thanks. Larry
... View more
‎Mar 22, 2024
12:30 PM
Thanks, again, Robert. I appreciate your help. That worked. I didn't know about the search for "place" to help with placing items. So that will help me in the future too. Thanks for taking the time to respond back. Much appreicated. Larry
... View more
‎Mar 22, 2024
08:52 AM
Thanks, Robert: That opens the dialog box but it doesn't place the text file I'm going for. I think there should be a way to designate a specific folder to place from using the "Place..." menu item fuction. I've tried several different methods, but none seem to work. I can get text to import and go into the document using: var dir = Folder("/\\10.10.1.9/Copydesk/Horoscope_Files_Originals\\/"); var files = dir.openDlg('This is always the same folder?','',true); //This will open the folder at the location specified in the previous line if(files && files.length > 0) //We need to check if the user did select and did not cancel the dialog placedItem = myPage.place(files[0]); But this creates a new text box in the doc. I can make this though delete the old text box first, then place the new one and run the rest of that script. Thanks for your help and feedback. Larry
... View more
‎Mar 21, 2024
08:47 AM
7 Upvotes
Hello: I've written a script to format the Horoscope for our newspaper. But when I run it, the place feature opens the last folder InDesign used, as it normally does. But I want it to open a specific directory. I've tried several versions of place, but none seem to work. (The script deletes the text we don't need, formats the other text, and saves the finished text box as a snippet in a directory. We use TownNews for pagination, so we can auto import the snippet when needed.) I did get the script to work if I use the Folder feature, but it places the new text file over the current text file on the document. Of course, I can make the script delete the current text box and then place. But I would like to have the script "place..." and open a specifiic directory. I've tried everything I know of to get the "Place..." to open a specific directory, but no luck. Here is a copy of the script. I would appreciate any feedback/help anyone can offfer. Thanks. Larry var allPgs = app.activeDocument.pages; for(var pCnt = 0; pCnt < allPgs.length; pCnt++) var pg = allPgs[pCnt]; var masItms = pg.masterPageItems; app.menuActions.itemByName('Place...').invoke(); app.findTextPreferences = app.changeTextPreferences = null; main(); function main() { if (app.layoutWindows.length == 0) return; if (app.selection.length != 1 || !app.selection[0].hasOwnProperty('changeGrep')) { alert('Please select only one textframe or text range!'); return; } var changeObject = app.selection[0].parentStory; if (changeObject.hasOwnProperty('characters') && changeObject.characters.length == 0) return; var doc = app.documents[0]; var style; var options = app.findChangeGrepOptions.properties; app.findGrepPreferences = NothingEnum.NOTHING; app.changeGrepPreferences = NothingEnum.NOTHING; // Query [[8Horoscope_Find_From_Beginning_To_ARIES]] -- If you delete this comment you break the update function try { app.findChangeGrepOptions.properties = ({includeFootnotes:true, kanaSensitive:true, widthSensitive:true}); app.findGrepPreferences.properties = ({findWhat:"(\\A.+\\r.+\\r.+\\r.+\\r.+\\r.+\\r.+\\r.+\\r(?=ARIES))|(\\A.+\\r.+\\r.+\\r.+\\r.+\\r.+\\r.+\\r.+\\r.+\\r(?=ARIES))"}); app.changeGrepPreferences.properties = ({}); changeObject.changeGrep(); } catch (e) {alert(e + ' at line ' + e.line)} app.findGrepPreferences = NothingEnum.NOTHING; app.changeGrepPreferences = NothingEnum.NOTHING; // Query [[6Horoscope_Find_Delete_Bottom]] -- If you delete this comment you break the update function try { app.findChangeGrepOptions.properties = ({includeFootnotes:true, kanaSensitive:true, widthSensitive:true}); app.findGrepPreferences.properties = ({findWhat:"(\\rFOR\\sTODAY\\’S\\sBIRTHDAY.+\\r.+\\r.+\\r.+\\r.+)|(\\rFOR\\sTODAY\\’S\\sBIRTHDAY.+\\r.+\\r.+\\r.+\\r.+\\r.+)|(\\rFOR\\sTODAY\\’S\\sBIRTHDAY.+\\r.+\\r.+\\r.+\\r.+\\r.+\\r.+)|(\\rFOR\\sTODAY\\’S\\sBIRTHDAY.+\\r.+\\r.+\\r.+\\r.+\\r.+\\r.+)"}); app.changeGrepPreferences.properties = ({}); changeObject.changeGrep(); } catch (e) {alert(e + ' at line ' + e.line)} app.findGrepPreferences = NothingEnum.NOTHING; app.changeGrepPreferences = NothingEnum.NOTHING; // Query [[7Horoscope_Find_Change_Signs_To_Bold]] -- If you delete this comment you break the update function try { app.findChangeGrepOptions.properties = ({includeFootnotes:true, kanaSensitive:true, widthSensitive:true}); app.findGrepPreferences.properties = ({findWhat:"ARIES\\r.+\\r|TAURUS\\r.+\\r|GEMINI\\r.+\\r|CANCER\\r.+\\r|LEO\\r.+\\r|VIRGO\\r.+\\r|LIBRA\\r.+|SCORPIO\\r.+\\r|SAGITTARIUS\\r.+\\r|(?#)CAPRICORN\\r.+\\r|AQUARIUS\\r.+\\r|PISCES\\r.+\\r"}); app.changeGrepPreferences.properties = ({appliedFont:"News Gothic T", fontStyle:"Bold"}); changeObject.changeGrep(); } catch (e) {alert(e + ' at line ' + e.line)} app.findGrepPreferences = NothingEnum.NOTHING; app.changeGrepPreferences = NothingEnum.NOTHING; // Query [[9Horoscope_Delete_Return_At_Bottom]] -- If you delete this comment you break the update function try { app.findChangeGrepOptions.properties = ({includeFootnotes:true, kanaSensitive:true, widthSensitive:true}); app.findGrepPreferences.properties = ({findWhat:"\\Z\\r"}); app.changeGrepPreferences.properties = ({}); changeObject.changeGrep(); } catch (e) {alert(e + ' at line ' + e.line)} app.findChangeGrepOptions.properties = options; app.findGrepPreferences = NothingEnum.NOTHING; app.changeGrepPreferences = NothingEnum.NOTHING; // Query [[Horoscope_NEW_Delate_Text_After_Pisces_0422]] -- If you delete this comment you break the update function try { app.findChangeGrepOptions.properties = ({includeFootnotes:true, kanaSensitive:true, widthSensitive:true}); app.findGrepPreferences.properties = ({findWhat:"\\rFOR TODAY’S BIRTHDAY\\r.+\\rBirthdate of:.+\\r.+\\r.+"}); app.changeGrepPreferences.properties = ({}); changeObject.changeGrep(); } catch (e) {alert(e + ' at line ' + e.line)} app.findChangeGrepOptions.properties = options; app.findGrepPreferences = NothingEnum.NOTHING; app.changeGrepPreferences = NothingEnum.NOTHING; }; function getStyleByString(docOrGroup, string, property) { if (string == '[No character style]') return docOrGroup[property][0]; if (string == '[No paragraph style]') return docOrGroup[property][0]; if (string == 'NormalParagraphStyle') return docOrGroup[property][1]; stringResult = string.match (/^(.*?[^\\]):(.*)$/); var styleName = (stringResult) ? stringResult[1] : string; styleName = styleName.replace (/\\:/g, ':'); remainingString = (stringResult) ? stringResult[2] : ''; var newProperty = (stringResult) ? property.replace(/s$/, '') + 'Groups' : property; var styleOrGroup = docOrGroup[newProperty].itemByName(styleName); if (remainingString.length > 0 && styleOrGroup.isValid) styleOrGroup = getStyleByString (styleOrGroup, remainingString, property); return styleOrGroup; }; var dir = Folder("/\\10.10.1.15/tcms/tcms_purged/mdjonline_com/autoflow\\/"); var myFile = dir.saveDlg('This is always the same folder?','',false); //var myFile = File.saveDialog(); // if (!myFile) return; if (!myFile.toString().match(/\.idms$/)) myFile = File(myFile + ".idms"); if (app.selection.length > 1){ var myObj = app.activeWindow.activePage.groups.add(app.selection); myObj.exportFile(ExportFormat.INDESIGN_SNIPPET, myFile, false); myObj.ungroup(); } else{ app.selection[0].exportFile(ExportFormat.INDESIGN_SNIPPET, myFile, false); }
... View more
‎Mar 14, 2022
03:10 PM
Thanks Brian: That worked great..... Fabulous.....I appreicate everyone's help on this. I was trying different configuations and getting nowhere. I appricate everyone taking the time to help me out. Many thanks. Larry
... View more
‎Mar 14, 2022
01:37 PM
Thanks, Uwe: That worked. Fantastic. I couldn't figure out what I had wrong in the text. one other question. This object style is in a folder inside the Object Style folder. Is there a way to make the script "look" inside another folder. It's called Advertising, if that helps any. Thanks again for your help. Larry
... View more
‎Mar 12, 2022
02:34 PM
Thanks, Manan and brianp311. I changed the line, but I'm still getting an error message (screen shot below). I've tried moving the line around, thinking perhaps I have it out of order. But that doesn't work either. I think I'm missing something else, but I can't figure it out. I appreciate you taking the time to help me out. Larry
... View more
‎Mar 11, 2022
05:07 PM
Hello: I'm trying to appy an object style to a faux ad. The style places the ad were is should be positioned on the page. But I keep getting an error when I run the script, so I'm sure I have some sytax issues, but I don't know how to correct the issue. I would appreicate any help anyone can offer. Here is what I have so far. Thanks var mySelection = app.selection[0]; app.selection[0]appliedObjectStyle(app.activeDocument.objectStyles("FR Top Ad"),true); app.menuActions.itemByName('Bring to Front').invoke(); var myObj = app.selection[0]; myObj.rotationAngle = -5;
... View more
‎Aug 28, 2020
09:07 AM
Hi, Brianp311: I tried the script you sent, but I'm getting the same message as before. I tried all the post here with the same results. I select the item(s) I want to add, run the script and the message below pops up. I even remade another library called Test1....and got the same message after it inititally created the library for me. It simply isn't adding any other items because the library is open. I appreciate you helping me out. Larry
... View more
‎Aug 27, 2020
04:41 PM
I can get the items to add to an existing Library, but only if it's closed. Once I open it, other items I want to add give me this message. Any help would be appreciated. Thanks. Larry
... View more
‎Apr 27, 2020
10:13 AM
Hello: brianp311 Here is a link from the site that we use. We have to enter the days of the week, month manually. And then manully key-in the numbers from that day's lotto. It's a manual process from start to finish.... I appreicate any help you can offer. https://www.galottery.com/en-us/winning-numbers.html Larry
... View more
‎Apr 27, 2020
10:08 AM
Hello: Loic Aigon: We have to copy/paste from a website, and enter the days of the week, month manually. I appreciate any help you can offer. Larry
... View more
‎Apr 23, 2020
04:54 PM
1 Upvote
Hello: I have a manual process of entering the lottery winning numbers each day, but it would be great if there was a script that would allow me to pick or enter different fields to make the process a little easier. I've written several scripts before, with the help of the Scripting Community here, but I don't know even where or how to start something like this. I appreciate any help or guidance anyone can offer. Here is the before and after screen shots if that helps at all. Thanks, Larry
... View more
‎Jan 01, 2020
12:37 PM
Thanks, Rob: This is great...It worked. I've been trying, unsuccesfully, for several days to get my script to work, trying different configurations, and none worked. I appreciate you helping me out. Thanks again, Larry
... View more
‎Dec 31, 2019
04:57 PM
Wow! That worked. Thanks so much, Manan. I've been banging my head against the wall trying to figure this out. Thanks again. Larry
... View more
‎Dec 31, 2019
04:04 PM
Hello: I get a number of photos that need to be mug shot size, and I'm new to scripting. I have this but when I run it, nothing happens, so I know I've got something wrong. But I'm at a loss of what to do to correct the issue. I've tried several different syntex, but I get error messages when I change things. Any help would be appreicated. Thanks, Larry var mySelection = app.selection; mySelection = mySelection.geometricBounds = ["0.7303 in", "1.0889 in"];
... View more
‎Apr 03, 2019
04:23 PM
Great idea....and I didn't think of using a paragraph style..... That may be a a good way to identify the cutlline or caption.... I'll work on that.... Thanks again.
... View more
‎Apr 03, 2019
04:08 PM
Thanks, Panda: I think you're right...I should be able to work with this....maybe alter it a little. But it gives me a good starting point. Thanks so much for helping me out. Larry
... View more
‎Apr 03, 2019
04:07 PM
Thanks, Bob....it helps...and yes, I meant import the text onto the page. We use TownNews.com with their Total Content Management System, TCMS, and it has the stories loaded in the system online and we pull the stories from there. Trying to figure a way to have an event handler run my script for captions once it sees the story (1) has a picture, and (2) is from the Associated Press.... Thanks so much for taking the time to help me out. Great information. Larry
... View more
‎Apr 01, 2019
03:57 PM
I could use some help with extending the capability of the script below. I would like to have the script run automatically when I flow in a story containing photo(s) from AP, Associated Press. The script does everything I need it to do, except run automatically when a story is flowed onto the page. Maybe an event handler could do this, but I'm unfamiliar with writing an event handler. Thanks for any help/advice you can offer. Larry var allPgs = app.activeDocument.pages; for(var pCnt = 0; pCnt < allPgs.length; pCnt++) var pg = allPgs[pCnt]; var masItms = pg.masterPageItems; app.menuActions.itemByName('Generate Static Caption').invoke(); var masItms = pg.masterPageItems; app.menuActions.itemByName('First Object Above').invoke(); var frame = app.selection[0]; frame.textWrapPreferences.textWrapMode = TextWrapModes.BOUNDING_BOX_TEXT_WRAP frame.textWrapPreferences.textWrapOffset = [0, "0.0139 in", "0.125 in", "0.0139 in"]; app.findGrepPreferences = app.changeGrepPreferences = null; app.findGrepPreferences.findWhat = "\\(AP Photo\\/"; app.changeGrepPreferences.changeTo = "/ AP-" app.activeDocument.changeGrep(); app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing; app.findTextPreferences.findWhat = ", File"; app.findTextPreferences.appliedFont = app.fonts.item("News Gothic T"); app.findTextPreferences.fontStyle = "Medium"; app.changeTextPreferences.appliedFont = app.fonts.item("News Gothic T"); app.changeTextPreferences.fontStyle = "Medium"; app.changeTextPreferences.changeTo = " "; app.activeDocument.changeText(); app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing; app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing; app.findTextPreferences.findWhat = ")"; app.findTextPreferences.appliedFont = app.fonts.item("News Gothic T"); app.findTextPreferences.fontStyle = "Medium"; app.findTextPreferences.pointSize = 8; app.changeTextPreferences.pointSize = 8; app.changeTextPreferences.appliedFont = app.fonts.item("News Gothic T"); app.changeTextPreferences.fontStyle = "Medium"; app.changeTextPreferences.changeTo = " "; app.activeDocument.changeText(); app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
... View more
‎Feb 07, 2019
05:00 PM
I got it figured out.....but thanks for reading my note and offering help. Larry
... View more
‎Feb 07, 2019
11:11 AM
I could use some help with the script below. I'm trying to get different outlines (.idms files) to place on different pages of a tabloid. I got the first set of outlines to place correctly, but I'm having trouble placing the second set and so on. I've tried changing the pages.item( ) number, and changing the geometricBounds, but the 2nd set always goes to the same place of the first set of outlines. I have a total of 6 different outlines to go to separate placements, but once I get the 2nd set to go correctly, I should be able to get the others to follow suit. If this makes sense. Thanks for any help and/or advice. Larry var myDocument = app.activeDocument, myPage = myDocument.pages.item(1); myStory = myPage.place(File("/H/Outline_Templates/Rome_Record_Pages_2_and_3.idms")); geometricBounds = ["65p11.928", "5.3782in"] var myDocument = app.activeDocument, myPage = myDocument.pages.item(2); myStory = myPage.place(File("/H/Outline_Templates/Rome_Record_Pages_4_and_5.idms")); geometricBounds = ["0p0.348", "5.3924in"]
... View more
‎Jan 21, 2019
09:54 AM
Wow...that's all me then....sorry... Yes, it's fine now....I feel so dumb....thanks for pointing that out... Larry
... View more
‎Jan 21, 2019
09:24 AM
I've tried it again and I still get the same message that it can't find it. Not sure why. But thanks for your help. I really appreciate the feedback and help from you (Vinny38) and winterm too. So nice for you guys to take the time to help me out. Larry
... View more
‎Jan 18, 2019
04:42 PM
Thanks, winterm: Yes...that works for the simple double words... And you're right. I have no idea how to tackle this with such a large variation of titles. I wish there was a way to just strip out the coding that Google stared using.... I have a script that formats everything, and it use to work great until Google started putting that extra stuff in...and it doesn't even show up until you copy/paste. Thanks for your help. Larry
... View more
‎Jan 18, 2019
02:14 PM
Hi, Vinny: I can't get this (?<=Showtimes for )(.+)(\1) to work.... Tried it several different ways, with changes the "space" around, but i always get that "Can not find match message. How can you I use back-references (\n) Unfamiliar with that.... Thanks for your help.. Larry
... View more
‎Jan 17, 2019
05:00 PM
Hello: I have a issue with movies times (something Google must have added to their codes) because when I copy/paste movie times from Google to format for newspapers, it added a line that read: Showtimes for (then the name of the movie) and there is a duplicate of the title next to this line. If you search for movie times in your area and copy/paste into InDesign, you'll see what I mean. I have a script that formats the titles and times, but now it still has the "Showtimes for....stuff in the text. And I'm trying, unsuccessfully, to delete to "Showtimes for and one of the duplicate titles. So far, I have tried this: (\b\w+)( \1)+\b It will find duplicates, but only one-word duplicates. I've got this too. But it finds everything in between and I can't figure out how to isolate the text that I want to delete. (?<=Showtimes for)(.+?)(?=\d\d+) I need to search for entire titles that have different words and word counts. Here is a sample: Showtimes for A Dog’s Way Home A Dog’s Way Home 12:35pm 5:00pm 7:45pm Showtimes for Mary Poppins Returns Mary Poppins Returns 12:35pm 3:35pm 6:45pm Showtimes for Bumblebee Bumblebee 1:15pm 4:20pm 7:20pm Showtimes for Spider-Man: Into the Spider-Verse Spider-Man: Into the Spider-Verse 12:40pm 4:15pm 7:10pm Thanks for any help. Sorry for the long text. Larry
... View more