• 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
Script Debugger 5: Duplicate Selection Handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Script Debugger 5: Duplicate Selection Handler


  • Subject: Script Debugger 5: Duplicate Selection Handler
  • From: Christopher Stone <email@hidden>
  • Date: Tue, 11 Sep 2012 00:32:34 -0500

Hey Folks,

I just noticed that SD 5 has the ability to get/set the selection-range, and this makes a feature I've wanted for a long time possible - duplicate selection.

Unfortunately the selection-object is not line-aware, so some other desirable things cannot be done such as select-line-of-selection - but this is nice nevertheless.  (Thanks Mark!)

The handler currently has no built-in intelligence, but it's only 10 minutes old.  :)

We'll see if it evolves.

--
Best Regards,
Chris

------------------------------------------
on duplicateSelection()
  tell application "Script Debugger"
    tell document 1
      tell selection
        set _text to its contents
        if _text ≠ "" then
          set _range to its character range
          set its contents to _text & _text
          set its character range to _range
        end if
      end tell
    end tell
  end tell
end duplicateSelection
------------------------------------------
duplicateSelection()

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Script Debugger 5: Duplicate Selection Handler
      • From: Shane Stanley <email@hidden>
    • Re: Script Debugger 5: Duplicate Selection Handler
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: selecting a calendar in iCal on Lion? [ to export selected calendars to an ICS file ]
  • Next by Date: Script Debugger Substitutions
  • Previous by thread: ATPM Desktop Picture Archive Reporter
  • Next by thread: Re: Script Debugger 5: Duplicate Selection Handler
  • Index(es):
    • Date
    • Thread