I was testing the script that triggered my previous post with lots of line (~200,000 instead of ~500) and it failed (timeout).
The code that fails is this:
-- fill the data set with the contents of the documents
repeat with i from 1 to myNbofDocuments
set end of myRawData to paragraphs of document i
end repeat
There are only 2 documents so there clearly is an issue with the sheer number of paragraphs (lines) here.
What would be the best way to nicely handle such volumes ?
AppleScript can have problems with lists that big. Read directly from the files using ASObjC, and convert that to arrays. BridgePlus also has a paragraphsOfString: method for convenience.
Use Show Package Contents on the app in the Finder, and burrow down to the header file: /Contents/Library/Script Libraries/BridgePlus.scptd/Contents/Frameworks/BridgePlus.framework/Versions/A/Headers/SMSForder.h
That lists all the Objective-C methods in one place.