• 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
Edit a Safari <textarea> in BBEdit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Edit a Safari <textarea> in BBEdit


  • Subject: Edit a Safari <textarea> in BBEdit
  • From: Justin French <email@hidden>
  • Date: Fri, 25 Jun 2004 12:10:54 +1000

Hi all, VERY new to applescript, but I'm hoping it can help here.

I'd like a script (or more likely two scripts, one for Safari, and one for BBEdit) which allow me to...

1. have safari open
2. trigger a script which copy the selected text of the front window's currently selected textarea (or the entire textarea contents if no text selected) to the clipboard
3. activate BBEdit, create a new document, paste the text from the textarea in
4. edit by hand as required
5. trigger another script (or ideally, just hit "save") which copies the text from BBEdit, activates Safari, and replaces the text in the previously mentioned textarea

Even better than that would be a contextual menu plug-in for Safari, but there doesn't seem to be any such beast, or even an API to write one.

Before you say "would you like fries with that?", I *have* already done some research, but something like...
set mySelection to (do JavaScript "getSelection()" in document 1) as string
doesn't get selections from textareas, and I'd actually prefer not to have to *select* the text by default.


I'm guessing what I need here is a greater understanding of JavaScript, not applescript, but I'd be interested in any pointers along the way if possible!


TIA
---
Justin French
http://indent.com.au
_______________________________________________
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: Edit a Safari <textarea> in BBEdit
      • From: Martin Orpen <email@hidden>
  • Prev by Date: Re: Second-Time conversion
  • Next by Date: Re: Second-Time conversion
  • Previous by thread: Re: removing a resource fork?
  • Next by thread: Re: Edit a Safari <textarea> in BBEdit
  • Index(es):
    • Date
    • Thread