• 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: Select Current Line (was Duplicate Selection Handler)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Script Debugger 5: Select Current Line (was Duplicate Selection Handler)


  • Subject: Script Debugger 5: Select Current Line (was Duplicate Selection Handler)
  • From: Christopher Stone <email@hidden>
  • Date: Wed, 12 Sep 2012 15:15:05 -0500

Hey Folks,

Here's a streamlined version of the script altered to not require the handler.  It does still require the Satimage.osax though.

I should have started a new thread....

--
Best Regards,
Chris

----------------------------------------------------------------------------
# Select Current Line
----------------------------------------------------------------------------
tell application "Script Debugger"
  tell document 1
    set {x1, null} to character range of selection
    tell (get source text)
      if x1 = 1 then -- Before first character:
        set SRC to "ˆ" & it
      else if x1 > (get its length) then -- After last character:
        set SRC to it & "ˆ"
      else -- Normal:
        set SRC to text 1 thru (x1 - 1) & "ˆ" & text x1 thru -1
      end if
    end tell
    set fRec to find text "^(.*?)(?:ˆ)(.*?)$" in SRC using "\\1\\2" with regexp
    set selection to {((matchPos of fRec) + 1), (matchLen of fRec)}
  end tell
end tell
----------------------------------------------------------------------------

 _______________________________________________
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: Select Current Line (was Duplicate Selection Handler)
      • From: Stan Cleveland <email@hidden>
References: 
 >Script Debugger 5: Duplicate Selection Handler (From: Christopher Stone <email@hidden>)
 >Re: Script Debugger 5: Duplicate Selection Handler (From: Shane Stanley <email@hidden>)
 >Re: Script Debugger 5: Duplicate Selection Handler (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Script Debugger 5: Duplicate Selection Handler
  • Next by Date: Re: Script Debugger 5: Select Current Line (was Duplicate Selection Handler)
  • Previous by thread: Re: Script Debugger 5: Duplicate Selection Handler
  • Next by thread: Re: Script Debugger 5: Select Current Line (was Duplicate Selection Handler)
  • Index(es):
    • Date
    • Thread