ムービー系の拡張子からFile Format UTIを取得する v3

AppleScript名:ムービー系の拡張子からFile Format UTIを取得する v3
— Created 2016-10-24 by Takaaki Naganoya
— Modified 2016-10-25 by Shane Stanley
— 2016 Piyomaru Software
use AppleScript version "2.4"
use framework "Foundation"
use framework "AVFoundation"
use scripting additions
use BridgePlus : script "BridgePlus" –https://www.macosxautomation.com/applescript/apps/BridgePlus.html

set aRes to retFileFormatUTI("mov") of me
–>   "com.apple.quicktime-movie"

set aRes to retFileFormatUTI("mp4") of me
–>   "public.mpeg-4"

set aRes to retFileFormatUTI("m4v") of me
–>   "com.apple.m4v-video"

set aRes to retFileFormatUTI("m4a") of me
–>   "com.apple.m4a-audio"

set aRes to retFileFormatUTI("3gp") of me
–>   "public.3gpp"

set aRes to retFileFormatUTI("3gp2") of me
–>   "public.3gpp2"

set aRes to retFileFormatUTI("caf") of me
–>   "com.apple.coreaudio-format"

set aRes to retFileFormatUTI("wav") of me
–>   "com.microsoft.waveform-audio"

set aRes to retFileFormatUTI("aif") of me
–>   "public.aifc-audio"

set aRes to retFileFormatUTI("aifc") of me
–>   "public.aifc-audio"

set aRes to retFileFormatUTI("amr") of me
–>   "org.3gpp.adaptive-multi-rate-audio"

set aRes to retFileFormatUTI("mp3") of me
–>   "public.mp3"

set aRes to retFileFormatUTI("au") of me
–>   "public.au-audio"

set aRes to retFileFormatUTI("ac3") of me
–>   "public.ac3-audio"

on retFileFormatUTI(aExt as string)
  load framework
  
return (current application’s SMSForder’s UTIForExtension:aExt) as string
end retFileFormatUTI

★Click Here to Open This Script 

Please follow and like us:

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です