
extendersGame
Community Beginner
extendersGame
Community Beginner
Activity
‎Aug 17, 2017
07:33 AM
Thank you for the links and suggestion. I'll see about looking into it. I will of course, continue to also pursue this particular bug as there isn't any reason InDesign shouldn't be able to do this.
... View more
‎Aug 15, 2017
10:18 AM
Hello Laubender, The script I gave as an example is just a condensed version of the script designed to only incorporate parts of the script needed to make the bug show up. My actual script generates book length documents who's content differ by user and saves them to an out folder. I don't need to make 100,000 at a time, that was just a number I gave it to try to reach before crashing. My actual script tends to reach between 40 and 1500 completed books but since this lower bound is potentially lower then the amount of orders I can receive in a couple hours space, I can't trust it to be left alone building over night. The normal script goes about 20 seconds between open() calls but I can add in some sleep time if you think it will help. I am using a PC so setting up a restart cycle might be a challenge though I can probably cobble something together if I have to. I have never heard of Indesign server, I will look into it though solving the problem under the current set up would be preferable. Thanks for your time and suggestions! -Thomas
... View more
‎Aug 09, 2017
02:28 PM
I have tried uninstalling InDesign with no change. On a related note, I'm not sure how to set estk back to opening with cc 2017 by default over older versions so if you happen to know, I would appreciate the tip. I'll be away till Tuesday but if I get any other suggestions, Ill try them then and report back here with the results. Thanks again for all the suggestions so far.
... View more
‎Aug 09, 2017
12:11 PM
I have not and the fact that the same thing happens on other computers I have tried hints to me that its not an installation problem but I can certainly try it if you think it might help. Also if anyone else is so inclined to run the test, I would appreciate knowing if it works for them.
... View more
‎Aug 09, 2017
11:25 AM
unfortunately that doesn't seem to have helped. The whole program is crashing again. But thanks for the suggestion!
... View more
‎Aug 09, 2017
09:59 AM
Yet another update: I tried to restart the program with open wrapped in a try catch only to get the same error and a couple blank tabs. clicking on one resulted in the entire program crashing. This one generated much more crash log data if its needed.
... View more
‎Aug 09, 2017
09:44 AM
I should add, it left behind a few un-closed documents. the first one closed right away, the second one appears to be refusing to let me close it before saving it, the last one which it had been working on at the time of crash hung for a minute but then allowed me to close it prompt free.
... View more
‎Aug 09, 2017
09:39 AM
Testing it, it got about 12000 in and then crashed but this time it crashed as an exception reported to ESTK. Not a very helpful one mind you: "Uncaught exception". but that does seem to be progress.
... View more
‎Aug 08, 2017
02:08 PM
1 Upvote
So I was writing a script that batch builds specialized books from a list of order files when I ran into an odd issue with InDesign crashing, (no exception is reported when run through ExtendScript toolkit, the program just crashes complete with a windows popup of "Adobe InDesign CC 2017 has stopped working" ) After an extensive debugging process, I determined that the crash always happens at app.open() Further testing showed that it does not matter if its opened as a copy, or which template it is, just that it is opened many times in the same script. I proceeded to test on several computers with windows 7 and 10, varying hardware, and varying versions of InDesign CC 2017 all with the same results save one that offered this error report: Problem signature: Problem Event Name: APPCRASH Application Name: InDesign.exe Application Version: 12.0.0.81 Application Timestamp: 57f545c7 Fault Module Name: DV_WidgetBin.dll Fault Module Version: 12.0.0.81 Fault Module Timestamp: 57f54502 Exception Code: c0000005 Exception Offset: 000000000003b755 OS Version: 6.1.7601.2.1.0.256.48 Locale ID: 1033 Additional Information 1: 937c Additional Information 2: 937cd28da0d9cc614dbe2c8fd27dd239 Additional Information 3: 2bc1 Additional Information 4: 2bc19be4be45607293e6e95449d7f364 I have compressed the code down to 8 lines with the same result. If you want to test it, you will also need an indt file with the name blank in the same directory. This can be as simple as a 1 blank page template #target "Indesign" var directoryRoot = (new File($.fileName)).parent; var template = File(directoryRoot + "/blank.indt"); for (var m = 0; m < 100000; m++) // arbitrarily high number it never reaches { var doc = app.open(template, true, OpenOptions.OPEN_COPY); // The program crashes on this line app.activeDocument.close(SaveOptions.NO); } This version tends to run for about an hour on my machines and the original batch script tended to make between 40 and 1500 books before crashing. I could not find any similar reports in the forums but if anyone knows a solution I would really appreciate it as this bug is rather debilitating to my planned work flow.
... View more
‎Aug 04, 2017
10:46 AM
I believe he is referring to running a command line command along the lines of: start "" photoshop.exe PathToScript\ScriptName.jsx which will launch the file without a prompt.
... View more
‎Jul 11, 2017
02:00 PM
So to consolidate advice/suggestions, something like this should be ideal for our goals right? if (String.prototype.trim == null) String.prototype.trim = function () {return this.replace(/(^[\s\n\r\t\x0B]+)|([\s\n\r\t\x0B]+$)/g, '')}; Loic, I noticed you used Array.prototype instead of String.prototype. Any particular reason? will giving Array a trim function also give it to String? Is there even a reason for arrays in general to use the trim function?
... View more
‎Jul 10, 2017
01:37 PM
I have yet to master filling an Indesign template with an xml file myself but if you're just looking to add another element to a pre loaded xml object, wouldn't it work to just implicitly add the element and save the value? app.activeDocument.xmlElements[0].xmlElements.item = "Hi"; (Assuming I understand your structure correctly as I'm not really sure why you would have nested elements both named "xmlElements")
... View more
‎Jul 10, 2017
09:39 AM
If you want the code to run on multiple arbitrary xml files, the first thing you will need to do is store an array of file objects corresponding to the files you want processed. This can be done with an .opendlg selecting for all the xml files you want to run. var FilePath = new File("thePathToYourUnprocessedXMLfilesFolder"); var xmlArray = FilePath.openDlg("Choose the XML FEED file(s)","*.xml",true); If you want to eliminate the need for a person to manually select the files, you can also tell the program to just run everything it finds in a given folder: var theXMLFolder = Folder("pathToFolder"); var xmlArray = theXMLFolder.getFiles(); // The variable is now an array of path objects for the folder contents Once you have an array of the xml files you want to run, you will need to nest your code in a for loop: for(var arrayIndex = 0; arrayIndex < xmlArray.length; arrayIndex++){ // Do stuff with the xml data // If it's a lot of files, you might want to automatically save/close the document after you are finished with it } Just call all your code inside that loop replacing the static file path with: File (xmlArray[arrayIndex]) Good practice bonus: I recommend also checking that the path object is an instance of a file with an xml extension so that if someone drops a folder or a text document in your hot folder, the system just ignores it. There is no property built in for the later check but this prototype placed at the top of your script should do the trick: // Add a file object command to display the file extension if (File.prototype.fileExt == null) File.prototype.fileExt = function(){return this.name.replace(/^.*\./,'')}; so the for loop code should now look something like this: for(var arrayIndex = 0; arrayIndex < xmlArray.length; arrayIndex++) { if (xmlArray[arrayIndex] instanceof File) // Ignore folders { if(xmlArray[arrayIndex].fileExt () == "xml") // Ignore files that are not xml files { // Do stuff with the xml data // If it's a lot of files, you might want to automatically save/close the document after you are finished with it } } } This answer is probably too late for you but hope it helps someone in the long run.
... View more
‎Jul 07, 2017
02:11 PM
Launching it via the "open with" options seems to avoid the pop up. So the command line equivalent: start "" photoshop.exe PathToScript\ScriptName.jsx should do the trick. (worked for me at least) In addition, for those trying to call it via a separate program, you can set up a .bat file with the command and target that rather then the .jsx file itself. (Depending on where that .bat file is located, you may have to make some changes to "internet options" or you'll be substituting one pop up about untrustworthy scripts for another).
... View more