• 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: AppleScript examples for Xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript examples for Xcode


  • Subject: Re: AppleScript examples for Xcode
  • From: Philip Aker <email@hidden>
  • Date: Thu, 13 May 2004 10:32:29 -0700

On Thursday, May 13, 2004, at 07:56 US/Pacific, Steve Nicholson wrote:

Can anyone point me to some AppleScript examples for inserting text into Xcode editor windows?

Choose "Show Older Release Notes" from Xcode's Help menu and then choose the second Customization item in the Bookmarks popup.



Basically what I want to do is pop up a dialog, enter a couple fields, and insert text based on those fields (e.g. to save typing when creating a bunch of NSLocalizedStrings). I'm just starting to look at AppleScript, so some examples will really help me get going.

Look in the example projects for AppleScript Studio to see how it deals with nibs. Otherwise, if you can get by with one text field at a time, there is a standard call:


try
display dialog "What do you want for lunch?" default answer "No bananas"
set res to text returned of result
tell application "Xcode"
activate
set contents of selection of front source document to res
end tell
end try



Philip Aker http://www.aker.ca _______________________________________________ xcode-users mailing list | email@hidden Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users Do not post admin requests to the list. They will be ignored.


References: 
 >AppleScript examples for Xcode (From: Steve Nicholson <email@hidden>)

  • Prev by Date: should I care about these Console messages?
  • Next by Date: Re: NSMatrix & NSTextCell <-- Interface Builder
  • Previous by thread: AppleScript examples for Xcode
  • Next by thread: should I care about these Console messages?
  • Index(es):
    • Date
    • Thread