• 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
Re: [OT] Anti-Spam solution for web pages.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] Anti-Spam solution for web pages.


  • Subject: Re: [OT] Anti-Spam solution for web pages.
  • From: Jon Pugh <email@hidden>
  • Date: Fri, 17 Oct 2003 11:35:30 -0700

At 7:19 AM -0400 10/17/03, Gary Lists wrote:
> > Now make it a script that operates on the selection in BBEdit. ;)
>
>I'm pretty sure I have an AS that does that (downloaded.) I'll check the
>folder, Jon.

I modified Rachel's script to this:

tell application "BBEdit"
set newStr to ""
set selectedText to contents of selection
if selectedText as string is "" then
activate
display dialog "Please select some text in BBEdit"
else
set contents of selection to my parseString(selectedText)
end if
end tell

on parseString(oldStr)
set newStr to ""
repeat with aChr in characters of oldStr
set thisNum to ASCII number of aChr
set newStr to newStr & "&#" & thisNum & ";"
end repeat
return newStr
end parseString

Now I can use the parseString routine in other scripts, notably my Netter's Dinner RSVP page script which puts email addresses on a page. These days a lot of people don't want their email addresses posted, so this should provide some benefit.

Thanks.

Jon
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: [OT] Anti-Spam solution for web pages.
      • From: David Hood <email@hidden>
References: 
 >Re: [OT] Anti-Spam solution for web pages. (From: Gary Lists <email@hidden>)

  • Prev by Date: Re: speedup scripts redux
  • Next by Date: Re: X10 Commands
  • Previous by thread: Re: [OT] Anti-Spam solution for web pages.
  • Next by thread: Re: [OT] Anti-Spam solution for web pages.
  • Index(es):
    • Date
    • Thread