• 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: Script to open file in Xcode at specific line number?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script to open file in Xcode at specific line number?


  • Subject: Re: Script to open file in Xcode at specific line number?
  • From: Rick Altherr <email@hidden>
  • Date: Thu, 7 Sep 2006 10:51:14 -0700

This is completely unsupported, but seems to work if the file is already open:

tell application "Xcode"
	try
		set doc to first document whose path is "file"
		set selection to paragraph (line number) of contents of doc
	end try
end tell

--
Rick Altherr
Architecture and Performance Group
email@hidden


On Sep 7, 2006, at 8:09 AM, Lieven Dekeyser wrote:

Hi,

I'd like to make some of my scripts compatible with Xcode, and I
haven't found a solution to open a text file at a specific line number
yet. BBEdit and TextWrangler include the 'edit' command, to which the
line number can be passed (edit +20 someSourceFile.c). Is there an
equivalent in Xcode, or is there an AppleScript command I can use to
accomplish this?

Thanks,

--Lieven
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Script to open file in Xcode at specific line number? (From: "Lieven Dekeyser" <email@hidden>)

  • Prev by Date: Re: warning: control reaches end of non-void function when using @synchronized
  • Next by Date: Re: Re: warning: control reaches end of non-void function when using @synchronized
  • Previous by thread: Re: Script to open file in Xcode at specific line number?
  • Next by thread: warning: control reaches end of non-void function when using @synchronized
  • Index(es):
    • Date
    • Thread