Guest User

Untitled

a guest
Apr 25th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment