Advertisement
Guest User

Untitled

a guest
Sep 15th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on open someDroppedAliases
  2.     set theAlias to first item of someDroppedAliases
  3.     tell application "Finder"
  4.         set filename to name of theAlias
  5.         set ParentFolder to container of theAlias
  6.         set the item_count to the number of items in the ParentFolder
  7.         set parentFolderAlias to ParentFolder as alias
  8.     end tell
  9.     set parentFolderPath to POSIX path of parentFolderAlias
  10.     set ausgabe to do shell script "mkvinfo " & quoted form of POSIX path of someDroppedAliases
  11.     if ausgabe contains "Content compression" then
  12.        
  13.         do shell script "mkvmerge -o " & quoted form of parentFolderPath & "clean_" & quoted form of filename & " --compression 1:none " & quoted form of POSIX path of someDroppedAliases
  14.        
  15.         tell application "GrowlHelperApp"
  16.             set the allNotificationsList to ¬
  17.                 {"Reparieren"}
  18.            
  19.             set the defaultNotificationsList to ¬
  20.                 {"Reparieren"}
  21.            
  22.             register as application ¬
  23.                 "Growl AppleScript Sample" all notifications allNotificationsList ¬
  24.                 default notifications defaultNotificationsList ¬
  25.                 icon of application "Mkvtoolnix"
  26.            
  27.             --  Send a Notification...
  28.             notify with name ¬
  29.                 "Reparieren" title ¬
  30.                 filename description ¬
  31.                 "Kompression erfolgreich entfernt." application name "Growl AppleScript Sample"
  32.         end tell
  33.     else
  34.         tell application "GrowlHelperApp"
  35.             set the allNotificationsList to ¬
  36.                 {"Nichts zu reparieren"}
  37.            
  38.             set the defaultNotificationsList to ¬
  39.                 {"Nichts zu reparieren"}
  40.            
  41.             register as application ¬
  42.                 "Growl AppleScript Sample" all notifications allNotificationsList ¬
  43.                 default notifications defaultNotificationsList ¬
  44.                 icon of application "Mkvtoolnix"
  45.            
  46.             --  Send a Notification...
  47.             notify with name ¬
  48.                 "Nichts zu reparieren" title ¬
  49.                 filename description ¬
  50.                 "Keine Kompression vorhanden" application name "Growl AppleScript Sample"
  51.         end tell
  52.     end if
  53. end open
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement