daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Apr 25th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on run {input, parameters}
  2.     repeat with aFile in input
  3.         tell application "Finder"
  4.             try
  5.                 set origFile to original item of aFile
  6.                 set aWindow to make new Finder window
  7.                 set aWindow's target to origFile's parent
  8.                 select origFile
  9.             end try
  10.         end tell
  11.     end repeat
  12. end run
  13.    
  14. on new_tab()
  15.     tell application "System Events" to tell application process "Finder"
  16.         set frontmost to true
  17.         tell front menu bar to tell menu "File" to tell menu item "New Tab"
  18.             perform action "AXPress"
  19.         end tell
  20.     end tell
  21. end new_tab
  22.    
  23. set testFiles to {alias "Macintosh HD:Users:Smokestack:Downloads:2b40e289.gif alias", ¬
  24.     alias "Macintosh HD:Users:Smokestack:Downloads:image_20483_mirror.jpg alias"}
  25.  
  26. tell application "Finder"
  27.     if (folders open in new tabs of Finder preferences) is false then
  28.         set folders open in new tabs of Finder preferences to true
  29.     end if
  30.     repeat with i from 1 to count of testFiles
  31.         set thisItem to item i of testFiles
  32.         set origFile to original item of thisItem
  33.         reveal origFile
  34.         select origFile
  35.     end repeat
  36. end tell
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top