• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Script problems with BBEdit 6.5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Script problems with BBEdit 6.5


  • Subject: Script problems with BBEdit 6.5
  • From: Craig Nansen <email@hidden>
  • Date: Tue, 4 Dec 2001 18:57:02 -0600

This script works just great for me in BBEdit 5.1. I get all kinds of errors when I try to use it with my newly installed BBEdit 6.5. Even the simple "go to line 1" and "replace Every Occurrence" give errors. Where do I find the major changes in scripting BBEdit 6.5?

tell application "BBEdit 5.1"
activate

--start at top and step through file
go to line 1
replace Every Occurrence searching for "http://"; using "\\rhttp://"; with grep
remove line breaks
go to line 1
replace Every Occurrence searching for "\\r(http:.+\\r)\\r" using "\\1" with grep

--start at top and step through file
go to line 1
set done to false
repeat until done
--Pattern for single lines ending with colon and return
set seek_pattern to "^[A-Z 0-9 . ' ( ) -]+:?\\r" as string
find seek_pattern with grep
if result is true then
change case Lower Case with selection only
change case Capitalize Words with selection only
--Remove colon in selection after fixing capitalization
replace Every Occurrence searching for ":\\r" using "\\r" with selection only and grep
else
set done to true
end if
end repeat
end tell


  • Follow-Ups:
    • Re: Script problems with BBEdit 6.5
      • From: Rob Jorgensen <email@hidden>
    • Re: Script problems with BBEdit 6.5
      • From: Shane Stanley <email@hidden>
  • Prev by Date: scripting horizontal guides in Quark
  • Next by Date: Re: Script problems with BBEdit 6.5
  • Previous by thread: Re: scripting horizontal guides in Quark
  • Next by thread: Re: Script problems with BBEdit 6.5
  • Index(es):
    • Date
    • Thread