Scripting Xcode to open a source code file and go to a particular line number
Scripting Xcode to open a source code file and go to a particular line number
- Subject: Scripting Xcode to open a source code file and go to a particular line number
- From: Brooks Bell <email@hidden>
- Date: Sun, 26 Apr 2009 22:05:54 -0700
- Thread-topic: Scripting Xcode to open a source code file and go to a particular line number
I'm writing a Cocoa utility that scans crash logs. I have the source code
file name and line number of the crash and I'd like to open the file in
Xcode and scroll to the line in question.
At this point I'm doing it with SystemEvents:
tell application "Xcode"
activate
open "%@"
tell application "System Events"
keystroke "l" using {command down}
keystroke "%@"
keystroke return
end tell
end tell
(the %@ symbols get replaced before running with the file path and line
number).
Is there a better way to initiate Xcode's "go to line #" function?
_______________________________________________
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