Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'osx/cocoa'
- include OSX
- OSX.require_framework 'ScriptingBridge'
- finder = SBApplication.applicationWithBundleIdentifier_ "com.apple.finder"
- fileURL = NSURL.URLWithString_ finder.selection.get[0].URL
- system "echo #{fileURL.path} | pbcopy"
Add Comment
Please, Sign In to add comment