Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Help with a BBEdit AppleScript

 
   Mac (Home) -> Apple Scripts RSS
Next:  create a file association with applescript  
Author Message
Lisa Cech

External


Since: Nov 14, 2006
Posts: 2



(Msg. 1) Posted: Tue Nov 14, 2006 9:04 am
Post subject: Help with a BBEdit AppleScript
Archived from groups: alt>comp>lang>applescript (more info?)

I need to insert Quark tags into a text file that is exported from a
classified ads application. I just can't seem to get the syntax right to
have a font tag <f"LegalNews-Bold> inserted at the beginning of the line
before the date tag. For example, here is what is in the export file:

@adinfo:<*C>Legal Notice
<*J>2006 ADV 0117780ÐJames E. Spitz, Administrator vs. Unknown
heirs-at-law, etc., et al.
Unknown heirs-at-law and next of kin of Charles J. Chatinski, the place
of residence of each being unknown, will take notice that on September
11, 2006, the undersigned, James E. Spitz, Administrator of the Estate
of Charles J. Chatinski, deceased, filed his complaint in the Probate
Court 1 Lakeside Avenue, Cleveland, Ohio 44113, of Cuyahoga County,
Ohio, alleging that said decedent died seized in fee simple of the
following described real estate, to-wit:
Situated in the City of Cleveland, County of Cuyahoga and State of Ohio
and known as being Sub Lot 102, in the Selker-Himmel Inc. Riverview
Subdivision No. 3, as shown by the recorded plat in Volume 99 of Maps,
Page 20 of Cuyahoga County Records, and being 40 feet front on the
Northerly side of Flamingo Avenue, S.W., and extending back of equal
width 114.50 feet, as appears by said plat, be the same more or less,
but subject to all legal highways.
Plaintiff alleges that it is for the best interest of the decedent's
estate to sell the entire interest in the property described.
Plaintiff demands and request that the entire interest in the real
estate be sold; that the rights and interests of the Defendant be
protected, and that Plaintiff be authorized to sell the described real
estate in accordance with the statutes, and for such other relief for
which he may be entitled.
The defendants named above are required to answer on or before the 5th
day of December, 2006.
JAMES E. SPITZ, ADMINISTRATOR OF THE ESTATE OF CHARLES J. CHATINSKI,
DECEASED.
By James E. Spitz, Attorney for Plaintiff.
Oct3-10-17-24-31Nov7, 2006<\b>

At the top, from "Legal Notice" through "et al." needs to be in a
different font. Not a problem to place the tag after every instance of
"@adinfo:". The problem is putting the tag to go back to the light font
at the end of the line. The attorney line near the end also needs to be
in the bold font. No problem, again, putting the tag before the date.
But placing a font tag on the previous line is the problem. Do I use an
insertion point command? This is as far as I've gotten:

tell application (path to frontmost application as string)
   repeat
      display dialog "Enter the newspaper date as it appears on the
date line of the newspaper (e.g., Oct11)" default answer "Date unknown"
      set this_date to "
" & the text returned of the result
      if this_date is not "" then exit repeat
   end repeat
end tell

tell application "BBEdit"
   activate
   replace "@adinfo:" using "@adinfo:<f\"LegalNews-Bold\">" searching
in
text 1 of text window 1 options {search mode:literal, starting at
top:true, wrap around:false, backwards:false, case sensitive:false,
match words:false, extend selection:false}

   replace this_date using "<f\"LegalNews-Light\">" & this_date
searching in text 1 of text window 1 options {search mode:literal,
starting at top:true, wrap around:false, backwards:false, case
sensitive:false, match words:false, extend selection:false}

end tell

Help, please!

--Lisa
Back to top
Login to vote
Display posts from previous:   
Related Topics:
"Insert" script for BBEdit 7.1 - Hello, I want to write a script for BBEdit 7.1 using the command "insert" from the "edit" menu. The purpose is to insert selected files in one open file. But when recording from the "record" menu doesn't give any result. Lo...

BBEdit -- "cut lines containing" - In BBEdit 5 there was a simple applescript command: cut lines containing "yo mama" the equivalent of which doesn't seem to exists for BBEdit 7. Anyone know of a command which accomplishes this?

update applescript - I am only now practiced enough in Applescript that some anomalies in the language are bugging me. In looking for work-arounds, one of the first documents I read was the Apple web page listing all the bugs in version 1.9.1. I have version 1.9.1 on os...

Please help with this applescript code - The line below is part of an Applescript macro that works fine for converting Appleworks documents to RTF format. Can anyone please tell me how I amend this line of code to save Appleworks documents in ASC (Ascii) text format. (ASC is one of the 'Save As...

New AppleScript features in 10.5 - On this page <http://www.apple.com/applescript/> (which is formatted in a very un-Apple manner) there's a list of the new features in AppleScript, with each on a clickable link. Some look interesting and I don't want to torpedo any fun discussio...
       Mac (Home) -> Apple Scripts All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact