• 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
Scripting BBEdit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting BBEdit


  • Subject: Scripting BBEdit
  • From: Peter Mathiessen <email@hidden>
  • Date: Wed, 06 Dec 2000 14:59:55 +0100

Hi,

I have a couple of thousand files that I need to make some changes to. I
need to make a script that deletes a certain line in each html-file.

The problem is that my script deletes the whole line, not just a part of it
that I want it to do.

The html-file

<TR>
<TD><H2>This line should remain and not be deleted</H2>This line should
be deleted</TD>
</TR>



The script:

tell application "BBEdit" to activate
set searchFolder to "Macintosh HD:remove text:"
set myList to list folder alias searchFolder without invisibles
repeat with myFilename in every item in myList
set myFile to alias (searchFolder & myFilename)
tell application "BBEdit"
open myFile
Go To Line 2
Select Current Line
Delete Selection
end tell
end repeat

Any thoughts?


  • Follow-Ups:
    • Re: Scripting BBEdit
      • From: "Serge Belleudy-d'Espinose" <email@hidden>
References: 
 >Re: path to me (From: Frank Watzl <email@hidden>)

  • Prev by Date: Re: Counting files in folders fails
  • Next by Date: Re: Scripting BBEdit
  • Previous by thread: Re: path to me
  • Next by thread: Re: Scripting BBEdit
  • Index(es):
    • Date
    • Thread