dannyg AppleScript unwanted prompt after replace command
Sep 29, 2009; 00:36
dannyg
AppleScript unwanted prompt after replace command
I've had a script doing fine here for years until I did a double upgrade of BBEdit (from 7.x to the current version) and Leopard to Snow Leopard. I don't know which upgrade is causing the issue I'm having, and the fact that I can't view the BBEdit dictionary in Snow Leopard's Script Editor limits my exploration.
The issue is that my script opens a local file and then invokes the replace command (with options returning results) so that I can get a count of the instances of a particular string within the document. Here is a sample:
set deletedData to replace "frobnitz" using "frobnitz" searching in {text 1 of text window "log.1"} ¬ options {starting at top:true, returning results:true}
After each such replace command, the script now halts while a BBEdit dialog appears, asking whether to save before continuing. I perform multiple replaces within the same document and get a dialog for each replace command invocation (i.e., it's not happening upon closing the document). Is there some newer, extra parameter I can send to bypass this dialog? Or perhaps there is a more recent command that lets me get the counts I need. Could the whole thing be caused by my using a . 1 filename extension within Snow Leopard's heavier reliance on extensions and their associations with apps?
Oddly, I use the replace command later in the script with .html documents opened via FTP (albeit without returning results), and no dialogs crop up.
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "support@barebones.com" rather than posting to the group. -~----------~----~----~----~------~----~------~--~-
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!