MACSCRPT Archives

November 2012

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bill Steele <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 13 Nov 2012 21:15:53 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
I have a script that goes through a humungous test file looking for stuff.  Simple version:

set keywords to {"foo","bar","Fred"}
set thePieces to splittext bigFile using "whatever"
repeat with onePiece in thePieces
	repeat with oneWord in keywords
		if onePiece contains oneWord
			(do some stuff with it)
		end if
	end repeat
end repeat

This worked fine until I upgraded to Mountain Lion, and then it started to hang up about halfway through --at different places at different times, with the same file.

To find out what was happening I put in some display dialogs,and that fixed it.  Replaced the dialogs with one-second delays,and that works too. Seems Applescript Editor needs to stop and think about some things, or maybe clean out some memory when it's doing arrays.

Any ideas what's happening?



Bill Steele
[log in to unmask]

ATOM RSS1 RSS2