Skip to content

Instantly share code, notes, and snippets.

@jon
Created February 11, 2010 00:30
Show Gist options
  • Save jon/301031 to your computer and use it in GitHub Desktop.
Save jon/301031 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'osx/cocoa'
include OSX
require_framework 'ScriptingBridge'
Xcode = SBApplication.applicationWithBundleIdentifier 'com.apple.Xcode'
Xcode.sourceDocuments.get.each { |d|
d.closeSaving_savingIn(('ask '.unpack('N').first), nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment