Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. on open these_items
  2. repeat with i from 1 to the count of these_items
  3. set this_item to item i of these_items
  4. set the item_info to info for this_item without size
  5. set theName to name of item_info
  6. try
  7. set theExtension to the name extension of item_info
  8. on error
  9. set theExtension to ""
  10. end try
  11.  
  12. if theName contains "thumb" then
  13. tell application "VLC"
  14. activate
  15. open this_item
  16. end tell
  17. else if theExtension contains "jpeg" then
  18. tell application "Preview"
  19. activate
  20. open this_item
  21. end tell
  22. else
  23. -- open with system default app
  24. tell application "Finder" to open this_item
  25. end if
  26. end repeat
  27. end open
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement