Guest User

Untitled

a guest
Jan 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. require 'osx/cocoa'
  2.  
  3. include OSX
  4. OSX.require_framework 'ScriptingBridge'
  5.  
  6. finder = SBApplication.applicationWithBundleIdentifier_ "com.apple.finder"
  7. fileURL = NSURL.URLWithString_ finder.selection.get[0].URL
  8. system "echo #{fileURL.path} | pbcopy"
Add Comment
Please, Sign In to add comment