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

Re: TextEdit


  • Subject: Re: TextEdit
  • From: John Delacour <email@hidden>
  • Date: Fri, 9 May 2003 15:05:07 +0100
  • Mac-eudora-version: 6.0a16

At 1:25 pm +0100 9/5/03, Simon Manning wrote:

I have tried using TextEdit but it doesnt support "Cut" as a valid event. What good is a text editor that doesn't support elementary text operations?

Well 'cut' is not a standard event at all and is quite redundant. It exists in BBEdit and Tex-Edit Plus simply because these are recordable.


What is missing in cocoa apps is the verb 'select' and the selection-object. With these you would be able to do whatever you want. 'cut' and 'copy' are just clutter.

Here's the routine in STE and other proper applications:


tell application "Scriptable Text Editor"
tell document 1
select the second word
set s to contents of selection
tell me to set the clipboard to s
(* tell me is needed for STE for the global clipboard *)
set the selection to ""
end tell
end tell

TextEdit is missing most things as regards scriptability but 'cut' is not one of those things and I hope not to see 'cut' anywhere.

JD
_______________________________________________
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.

References: 
 >TextEdit (From: Simon Manning <email@hidden>)

  • Prev by Date: the clipboard as unicode text NOT
  • Next by Date: Order of operations
  • Previous by thread: TextEdit
  • Next by thread: Re: Frontmost document
  • Index(es):
    • Date
    • Thread