AppleScript Movie

Shutter Encoderからffmpegの取り出し

ダウンロード - mov2mp4arm.zip


#!/bin/bash
#com.cocolog-nifty.quicktimer.icefloe
#ユーザードメインの $HOME/binにインストールする
########################################
### 設定項目
STR_URL="https://www.shutterencoder.com/Shutter%20Encoder%2017.9%20Apple%20Silicon.pkg"

########################################
###管理者インストールしているか?チェック
USER_WHOAMI=$(/usr/bin/whoami)
/bin/echo "実行ユーザーは:$USER_WHOAMI"
###実行しているユーザー名
CONSOLE_USER=$(/bin/echo "show State:/Users/ConsoleUser" | /usr/sbin/scutil | /usr/bin/awk '/Name :/ { print $3 }')
/bin/echo "コンソールユーザー:$CONSOLE_USER"
###ログイン名ユーザー名※Visual Studio Codeの出力パネルではrootになる設定がある
LOGIN_NAME=$(/usr/bin/logname)
/bin/echo "ログイン名:$LOGIN_NAME"
###UID
USER_NAME=$(/usr/bin/id -un)
/bin/echo "ユーザー名:$USER_NAME"
###SUDOUSER
/bin/echo "SUDO_USER: $SUDO_USER"
########################################
##OS
PLIST_PATH="/System/Library/CoreServices/SystemVersion.plist"
STR_OS_VER=$(/usr/bin/defaults read "$PLIST_PATH" ProductVersion)
/bin/echo "OS VERSION :" "$STR_OS_VER"
STR_MAJOR_VERSION="${STR_OS_VER%%.*}"
/bin/echo "STR_MAJOR_VERSION :" "$STR_MAJOR_VERSION"
STR_MINOR_VERSION="${STR_OS_VER#*.}"
/bin/echo "STR_MINOR_VERSION :" "$STR_MINOR_VERSION"

############################################################
###旧バージョンをゴミ箱に
/bin/mkdir -p "/Users/$CONSOLE_USER/bin/"
# binは不可視にする
/usr/bin/chflags hidden "/Users/$CONSOLE_USER/bin"
/usr/bin/SetFile -a V "/Users/$CONSOLE_USER/bin"
#
USER_TRASH_DIR=$(/usr/bin/mktemp -d "$HOME/.Trash/FFMPEG.XXXXXXXX")
/bin/mkdir -p "/Users/$CONSOLE_USER/bin/ffmpeg.arm"
/bin/mv "/Users/$CONSOLE_USER/bin/ffmpeg.arm" "$USER_TRASH_DIR"

###ダウンロードSTR_URL
USER_TEMP_DIR=$(/usr/bin/mktemp -d)
/bin/echo "起動時に削除されるディレクトリ:" "$USER_TEMP_DIR"
if ! /usr/bin/curl -L -o "$USER_TEMP_DIR/install.pkg" "$STR_URL" --connect-timeout 20; then
/bin/echo "ファイルのダウンロードに失敗しました HTTP1.1で再トライします"
  if ! /usr/bin/curl -L -o "$USER_TEMP_DIR/install.pkg" "$STR_URL" --http1.1 --connect-timeout 20; then
/bin/echo "ファイルのダウンロードに失敗しました"
exit 1
  fi
fi
###########################
/usr/sbin/pkgutil --expand "$USER_TEMP_DIR/install.pkg" "$USER_TEMP_DIR/Expand"

###########################
/usr/bin/ditto -xz  "$USER_TEMP_DIR/Expand/com.paulpacifico.shutterencoder.pkg/Payload" "$USER_TEMP_DIR/Extract"
 
###########################
/usr/bin/ditto "$USER_TEMP_DIR/Extract/Shutter Encoder.app/Contents/Resources/Library" "/Users/$CONSOLE_USER/bin/ffmpeg.arm"

exit 0

|

[bluray]VLCのブルーレイ再生ライブラリのインストール(3.0.20対応)


【スクリプトエディタで開く】|

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions
property refMe : a reference to current application

####ARM版では動作しないので留意 VLC インテル版
###set strUrlVlcArm to "https://vlc.letterboxdelivery.org/vlc/3.0.17.3/macosx/vlc-3.0.17.3-arm64.dmg"
##set strUrlVlcIntel to "https://vlc.letterboxdelivery.org/vlc/3.0.17.3/macosx/vlc-3.0.17.3-intel64.dmg"
set strUrlVlcIntel to "https://free.nchc.org.tw/vlc/vlc/3.0.20/macosx/vlc-3.0.20-intel64.dmg"
###AACライブラリ
set strUrlLibaacs to "https://vlc-bluray.whoknowsmy.name/files/mac/libaacs.dylib"
##キーDB
set strUrlKeydb to "http://fvonline-db.bplaced.net/export/keydb_jpn.zip"


#########################################
###ユーザーアプリケーションフォルダを作る
set appFileManager to refMe's NSFileManager's defaultManager()
set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSApplicationDirectory) inDomains:(refMe's NSUserDomainMask))
set ocidApplicationDirPathURL to ocidURLsArray's firstObject()
set ocidAppDirPathURL to ocidApplicationDirPathURL's URLByAppendingPathComponent:("Movies/VLC_intel")
set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
# 777-->511 755-->493 700-->448 766-->502
ocidAttrDict's setValue:(448) forKey:(refMe's NSFilePosixPermissions)
set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidAppDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
if (item 1 of listBoolMakeDir) is false then
log "フォルダ作成でエラーしました"
return "フォルダ作成でエラーしました"
end if
#########################################
###ユーザーaacs Cachesフォルダを作る
set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSCachesDirectory) inDomains:(refMe's NSUserDomainMask))
set ocidCachesDirPathURL to ocidURLsArray's firstObject()
set ocidAacsCachesPathURL to ocidCachesDirPathURL's URLByAppendingPathComponent:"aacs"
set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
# 777-->511 755-->493 700-->448 766-->502
ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidAacsCachesPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
if (item 1 of listBoolMakeDir) is false then
log "フォルダ作成でエラーしました"
return "フォルダ作成でエラーしました"
end if
#########################################
###ユーザーbluray Cachesフォルダを作る
set ocidBlurayCachesPathURL to ocidCachesDirPathURL's URLByAppendingPathComponent:"bluray"
set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
# 777-->511 755-->493 700-->448 766-->502
ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidBlurayCachesPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
if (item 1 of listBoolMakeDir) is false then
log "フォルダ作成でエラーしました"
return "フォルダ作成でエラーしました"
end if
#########################################
###初期設定フォルダを作る
set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSLibraryDirectory) inDomains:(refMe's NSUserDomainMask))
set ocidLibraryDirPathURL to ocidURLsArray's firstObject()
set ocidPreferencesDirPathURL to ocidLibraryDirPathURL's URLByAppendingPathComponent:("Preferences/aacs")
set strPreferencesDirPath to ocidPreferencesDirPathURL's |path| as text
set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
# 777-->511 755-->493 700-->448 766-->502
ocidAttrDict's setValue:(448) forKey:(refMe's NSFilePosixPermissions)
set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidPreferencesDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
if (item 1 of listBoolMakeDir) is false then
log "フォルダ作成でエラーしました"
return "フォルダ作成でエラーしました"
end if
#########################################
####ダウンロードフォルダ
set ocidTempDirURL to appFileManager's temporaryDirectory()
set ocidUUID to refMe's NSUUID's alloc()'s init()
set ocidUUIDString to ocidUUID's UUIDString
set ocidSaveDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(ocidUUIDString) isDirectory:true
set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
# 777-->511 755-->493 700-->448 766-->502
ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
if (item 1 of listBoolMakeDir) is false then
log "フォルダ作成でエラーしました"
return "フォルダ作成でエラーしました"
end if
set strSaveDir to ocidSaveDirPathURL's |path| as text
#########################################
###vlcファイルのダウンロード
set objSysInfo to system info
set strCpuType to (CPU type of objSysInfo) as text
set strVlcSaveFilePath to (strSaveDir & "/vlc.dmg") as text
if strCpuType contains "Intel" then
  set strCommandText to "/usr/bin/curl -k \"" & strUrlVlcIntel & "\" -o \"" & strVlcSaveFilePath & "\" --connect-timeout 120" as text
else
  set strCommandText to "/usr/bin/curl -l \"" & strUrlVlcIntel & "\" -o \"" & strVlcSaveFilePath & "\" --connect-timeout 120" as text
end if
###コマンド実行
log "VLCダウンロード開始"
do shell script strCommandText
log "VLCダウンロード終了"

#########################################
###libaacs.dylibファイルのダウンロード
set strAacsSaveFilePath to (strSaveDir & "/libaacs.dylib.bin") as text
set strCommandText to "/usr/bin/curl -k \"" & strUrlLibaacs & "\" -o \"" & strAacsSaveFilePath & "\" --connect-timeout 120" as text
###コマンド実行
log "libaacs.dylibダウンロード開始"
do shell script strCommandText
log "libaacs.dylibダウンロード終了"

#########################################
###keydb_jpnファイルのダウンロード
set strKeySaveFilePath to (strSaveDir & "/keydb_jpn.zip") as text
set strCommandText to "/usr/bin/curl -k \"" & strUrlKeydb & "\" -o \"" & strKeySaveFilePath & "\" --connect-timeout 480" as text
###コマンド実行
log "keydb_jpn.zipダウンロード開始"
try
do shell script strCommandText
on error
  set strUrlKeydb to "https://force4u.cocolog-nifty.com/skywalker/files/keydb_jpn.zip"
  set strCommandText to "/usr/bin/curl -k \"" & strUrlKeydb & "\" -o \"" & strKeySaveFilePath & "\" --connect-timeout 480" as text
do shell script strCommandText
end try
log "keydb_jpn.zipダウンロード終了"


#########################################
###ユーザーアプリケーションフォルダにVLC.appがあればゴミ箱へ入れる
set ocidVclPathURL to ocidAppDirPathURL's URLByAppendingPathComponent:"VLC.app"
set strVclAppPath to ocidVclPathURL's |path| as text
##ゴミ箱に入れる
set boolGoToTrash to appFileManager's trashItemAtURL:(ocidVclPathURL) resultingItemURL:(ocidVclPathURL) |error|:(reference)
#########################################
###VLCをコピー
try
  set strCommandText to ("/usr/bin/hdiutil attach \"" & strVlcSaveFilePath & "\" -noverify -nobrowse -noautoopen\n") as text
do shell script strCommandText
on error
log "attachでエラーになりました"
return
end try
try
  set theComandText to ("/usr/bin/ditto \"/Volumes/VLC media player/VLC.app\" \"" & strVclAppPath & "\"") as text
do shell script theComandText
on error
log "dittoでエラーになりました"
return
end try
try
  set theComandText to ("/usr/bin/hdiutil detach \"Volumes/VLC media player\" -force") as text
do shell script theComandText
on error
log "detachでエラーになりました"
return
end try
#########################################
###libaacs.dylibを指定の場所にコピー
set ocidAacsSavePathURL to ocidVclPathURL's URLByAppendingPathComponent:"Contents/MacOS/lib/libaacs.dylib"
set strAacsSavePath to ocidAacsSavePathURL's |path| as text
try
  set theComandText to ("/usr/bin/ditto \"" & strAacsSaveFilePath & "\" \"" & strAacsSavePath & "\"") as text
do shell script theComandText
on error
log "libaacs.dylib dittoでエラーになりました"
return
end try
#########################################
### keydb.cfg まずは解凍してからコピー
try
  set theComandText to ("/usr/bin/unzip \"" & strKeySaveFilePath & "\" -d \"" & strSaveDir & "\"") as text
do shell script theComandText
on error
log "unzipでエラーになりました"
return
end try
set strUnzipPath to (strSaveDir & "/keydb.cfg") as text
try
  set theComandText to ("/usr/bin/ditto \"" & strUnzipPath & "\" \"" & strPreferencesDirPath & "/keydb.cfg\"") as text
  
do shell script theComandText
on error
log "keydb.cfg dittoでエラーになりました"
return
end try

#########################################
#アトリビュートをリセット
set theComandText to ("xattr -rc \"" & strVclAppPath & "\"") as text
do shell script theComandText
#########################################
#インストール先を表示
set ocidAppPathURL to ocidAppDirPathURL's URLByAppendingPathComponent:("VLC.app")
set ocidAppPath to ocidAppPathURL's |path|
set ocidContainerDirPath to ocidAppDirPathURL's |path|
set appSharedWorkspace to refMe's NSWorkspace's sharedWorkspace()
set boolDone to appSharedWorkspace's selectFile:(ocidAppPath) inFileViewerRootedAtPath:(ocidContainerDirPath)
set boolDone to appSharedWorkspace's openURL:(ocidAppPathURL)
if (boolDone as boolean) is false then
  #ファイルを開く
  set aliasSaveFilePath to (ocidAppDirPathURL's absoluteURL()) as alias
  tell application "Finder"
open file aliasSaveFilePath
  end tell
end if




|

mp4にチャプターを追加する

QuickTimeでのこの設定部分です
Screen_1_20240105163501

クイックルックでもチャプターは有効です
Screen_2_20240105163701



準備
1:解凍用7zzバイナリをインストール
2:ffmpegバイナリをインストール
3:DaVinci Resolveをインストール


作成
基本:FFMETADATA1
1:字幕を使ってチャプタを指定する
2:字幕データをTTMLで書き出す
3:TTMLから各種チャプター用データを作成する
3−1:Youtube用チャプター用データを作成する
3−2:FFMPEG用チャプター用データを作成する


準備
1:解凍用7zzバイナリをインストール
AppleScript
https://quicktimer.cocolog-nifty.com/icefloe/2024/01/post-01fee7.html
Bash
https://quicktimer.cocolog-nifty.com/icefloe/2023/11/post-c5ab17.html
2:ffmpegバイナリをインストール
AppleScript
https://quicktimer.cocolog-nifty.com/icefloe/2024/01/post-1ce12f.html
Bash
https://quicktimer.cocolog-nifty.com/icefloe/2023/12/post-c0e627.html
3:DaVinci Resolveをインストール
DaVinci Resolve公式サイトから
https://www.blackmagicdesign.com/support/family/davinci-resolve-and-fusion
Apple App Store
https://apps.apple.com/jp/app/davinci-resolve/id571213070?mt=12


作成
字幕トラックでチャプターの位置と内容を指定して
出来上がった字幕データをTTMLに書き出し
TTMLファイルをFFMETADATA1データに変換する方法で設定します

基本:FFMETADATA1
https://quicktimer.cocolog-nifty.com/icefloe/2023/10/post-3f2621.html
1:字幕を使ってチャプタを指定する
https://quicktimer.cocolog-nifty.com/icefloe/2024/01/post-b3c054.html
2:字幕データをTTMLで書き出す
[DaVinci Resolve]字幕データをTTMLで書き出す
https://quicktimer.cocolog-nifty.com/icefloe/2023/09/post-e6d806.html
3:チャプター用データを作成する
3−1:Youtube用チャプター用データを作成する
[TTML]TTMLからYoutube用のチャプターテキストを作成する(修正版)
https://quicktimer.cocolog-nifty.com/icefloe/2023/10/post-6042c5.html
3−2:FFMPEG用チャプター用データを作成する
TTMLからチャプター付与用のFFMETADATA1を作成する(Bash対応)
https://quicktimer.cocolog-nifty.com/icefloe/2023/09/post-e3a2ce.html

|

[DaVinci Resolve]字幕を使ってチャプタを指定する

字幕トラックを作成して Ffmetadata11
すでに字幕がある場合は チャプター用として別に字幕トラックを作成します (複数字幕を同じトラックではなく別の字幕トラックにするのがポイント) Ffmetadata12
チャプターは タイミングだけ指定しても機能としては動作します Ffmetadata13
チャプタ設定用のには スタートフレームとエンドフレーム番号が必要ですので
[CHAPTER]
TIMEBASE=1/16 
START=0   
END=480   
title=1:最初の30秒

このように設定するのが『ベター』です Ffmetadata14
詳しくは パネルで設定となります タイミングと内容が必要なだけですので フォントや位置指定等は配慮不要です
Ffmetadata15
字幕のON OFF 字幕は常に1つ選択ですので 書き出し時には『どの』字幕を書き出すのか?を意識する必要があります 3_20240105162701
4_20240105162701
5_20240105162701

|

[QuickTime]イメージシーケンス(複数画像)からムービーを作成する

ファイルメニューから読み込みます Screen2_20240108164101
一般的なGIFアニメでは 1秒間に16フレーム か 8フレームが多いが QuickTimeでは最低でも24/秒フレームなので どうしても動作が『速く』なるので Gifターゲットにする場合はフレーム数の計算が容易な25か50が個人的にはおすすめ Screen_1_20240108164101

|

[DaVinci Resolve]CrystalDriver.kext

[Extensions]CrystalDriver.kext
https://quicktimer.cocolog-nifty.com/icefloe/2022/07/post-2ffce3.html
OS再インストール時にメッセージが出たのでメモ
20231203-231124

機能拡張がブロックされました
"Blackmagic Design Inc"によって署名された新しい機能拡張を読み込もうとしました。これらの機能拡張はデベロッパによるアップデートが必要です。

/Library/Extensions/CrystalDriver.kext
これの事
システムレポートで読み込み可能になっていればOK
Screen_4

|

[DaVinci Resolve]字幕データをTTMLで書き出す

1_20240105162701

すでに字幕がある場合は
チャプター用として別に字幕トラックを作成します
(複数字幕を同じトラックではなく別の字幕トラックにするのがポイント)
2_20240105162701

字幕のON OFF 字幕は常に1つ選択
3_20240105162701


4_20240105162701


5_20240105162701

|

[AVAssetExportSession]ビデオ変換

ムービーファイルを変換します
OS12以降ならTSも書き出せます



#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use framework "Foundation"
use framework "AVFoundation"
use scripting additions

property refMe : a reference to current application
property refNSString : a reference to refMe's NSString
property refNSURL : a reference to refMe's NSURL
property refNSArray : a reference to refMe's NSArray
property refNSDate : a reference to refMe's NSDate
property refNSCalendar : a reference to refMe's NSCalendar
property refNSTimeZone : a reference to refMe's NSTimeZone
property refNSDateFormatter : a reference to refMe's NSDateFormatter
property refNSMutableDictionary : a reference to refMe's NSMutableDictionary

property refAVAsset : a reference to refMe's AVAsset
property refAVAssetExportSession : a reference to refMe's AVAssetExportSession
set objFileManager to refMe's NSFileManager's defaultManager()

###############################
#####ダイアログ
################################
tell application "Finder"
set aliasDefaultLocation to (path to desktop folder from user domain) as alias
end tell
####UTIリスト PDFのみ
set listUTI to {"public.movie"}

####ダイアログを出す
set listFilePath to (choose file with prompt "ムービーファイルを選んでください" default location (aliasDefaultLocation) of type listUTI with invisibles, showing package contents and multiple selections allowed) as list

###############################
#####出力メディアフォーマット関連
################################

set listChooseType to {"LowQuality", "MediumQuality", "HighestQuality", "HEVCHighestQuality", "HEVCHighestQualityWithAlpha", "640x480", "960x540", "1280x720", "1920x1080", "3840x2160", "HEVC1920x1080", "HEVC3840x2160", "HEVC1920x1080WithAlpha", "HEVC3840x2160WithAlpha", "HEVC7680x4320", "AppleM4V480pSD", "AppleM4V720pHD", "AppleM4V1080pHD", "AppleM4ViPod", "AppleM4VAppleTV", "AppleM4VCellular", "AppleM4VWiFi", "AppleProRes422LPCM", "AppleProRes4444LPCM", "Passthrough", "AppleM4A"} as list
try
set objResponse to (choose from list listChooseType with title "出力形式" with prompt "フォーマットを選んでください" default items (item 3 of listChooseType) OK button name "OK" cancel button name "キャンセル" with multiple selections allowed without empty selection allowed)
on error
log "エラーしました"
return
end try
if objResponse is false then
log "キャンセルしました"
return
end if
set objResponse to objResponse as text
set strPresetName to ("AVAssetExportPreset" & objResponse) as text
####出力形式番号にする
set ocidPresetArray to (refNSArray's arrayWithArray:listChooseType)
set numChooseListNo to (ocidPresetArray's indexOfObject:(objResponse as text)) as integer
set numChooseListNo to numChooseListNo + 1 as integer

###############################
#####書き出しに必要なテンポラリーの指定
################################

###書き出し途中の添付ファイルの書き出し先
set strTmpPath to ("/private/tmp/AVAssetExportSession") as text
set ocidTmpPath to (refNSString's stringWithString:strTmpPath)
set ocidFullTmpPath to ocidTmpPath's stringByStandardizingPath()
set ocidFullTmpPathURL to (refNSURL's alloc()'s initFileURLWithPath:ocidFullTmpPath isDirectory:true)
####TMPフォルダを作成
(objFileManager's createDirectoryAtURL:ocidFullTmpPathURL withIntermediateDirectories:true attributes:(missing value) |error|:(missing value))

###############################
#####本処理
################################

repeat with objFilePath in listFilePath

###############################
#####入力ファイル関連
################################
set aliasFilePath to objFilePath as alias
set strFilePath to POSIX path of aliasFilePath as text
####パステキスト
set ocidFilePath to (refNSString's stringWithString:strFilePath)
####コンテナディレクトリ
set ocidContainerPath to ocidFilePath's stringByDeletingLastPathComponent()
####ファイル名
set ocidFileName to ocidFilePath's lastPathComponent()
###ベースファイル名
set ocidBaseFileName to ocidFileName's stringByDeletingPathExtension()
###拡張子
set ocidFileExetension to ocidFileName's pathExtension()
####ドキュメントのパスをNSURL
set ocidFullPathURL to (refNSURL's fileURLWithPath:ocidFilePath)
####コンテナURL
set ocidContainerDirPathURL to ocidFullPathURL's URLByDeletingLastPathComponent()
###コンテナのエイリアス
set aliasContainerDirPath to ocidContainerDirPathURL as alias

###############################
#####出力ファイル関連
################################
###出力
set strDateNO to doGetDateNo("yyyyMMdd_hhmmss") as text
###ファイル名+日付時間+拡張子
if (objResponse as text) is "AppleM4A" then
set strExportFileName to ("" & ocidBaseFileName & "_" & strDateNO & ".m4a") as text
else
set strExportFileName to ("" & ocidBaseFileName & "_" & strDateNO & ".mov") as text
end if
####開いたファイルの同一階層
set strContainerDirPath to (POSIX path of aliasContainerDirPath) as text
###そこにファイル名
set strDistFilePath to (strContainerDirPath & strExportFileName) as text
###ストリングに
set ocidDistFilePath to (refNSString's stringWithString:strDistFilePath)
###NSURL
set ocidFullDistPathURL to (refNSURL's fileURLWithPath:ocidDistFilePath)


###############################
#####AV処理
################################

log "######AVAsset"
set ocidReadAsset to (refAVAsset's assetWithURL:ocidFullPathURL)
log className() of ocidReadAsset as text

set ocidReadAssetDuration to ocidReadAsset's duration()
log ocidReadAssetDuration
log "######AVAssetTrack"
set ocidReadAssetTrackArray to ocidReadAsset's tracks()
set numCntTrackNo to (count of ocidReadAssetTrackArray) as integer
log "トラック数は: " & numCntTrackNo
set numCntTrak to numCntTrackNo - 1
repeat numCntTrackNo times
log "--------"
set ocidTrack to (ocidReadAssetTrackArray's objectAtIndex:numCntTrak)
log className() of ocidTrack as text
set strTrackID to ocidTrack's trackID() as text
set strMediaType to ocidTrack's mediaType() as text
if strMediaType is "vide" then
log "MediaType: vide ビデオトラック:トラックID" & strTrackID
else if strMediaType is "soun" then
log "MediaType: soun サウンドトラック:トラックID" & strTrackID
else
log "MediaType: " & strMediaType
log "TrackID: " & strTrackID
end if
log (ocidTrack's formatDescriptions()'s objectAtIndex:0)
-->NSCFType
log ocidTrack's isPlayable()
log ocidTrack's isDecodable()
log ocidTrack's isEnabled()
log ocidTrack's isSelfContained()
log ocidTrack's totalSampleDataLength()
##log ocidTrack's hasMediaCharacteristic()
log "->"
set ocidAssetTrackTimeRange to ocidTrack's timeRange()
log ocidAssetTrackTimeRange
set ocidAssetTrackTimeScale to ocidTrack's naturalTimeScale()
log ocidAssetTrackTimeScale
set ocidAssetTrackNaturalSize to ocidTrack's naturalSize()
log ocidAssetTrackNaturalSize
set ocidCMTimeFrameDura to ocidTrack's minFrameDuration()
log ocidCMTimeFrameDura as record
log "-->"
log ocidTrack's nominalFrameRate() as number

log ocidTrack's requiresFrameReordering() as boolean
log ocidTrack's metadata() as list
log ocidTrack's commonMetadata() as list
log ocidTrack's availableMetadataFormats() as list
log ocidTrack's segments() as list
log ocidTrack's availableTrackAssociationTypes() as list
log "--->"
log ocidTrack's preferredTransform()
log ocidTrack's preferredVolume()
log ocidTrack's estimatedDataRate()
log ocidTrack's languageCode() as text
log ocidTrack's extendedLanguageTag()
log ocidTrack's hasAudioSampleDependencies()
set numCntTrak to numCntTrak - 1

end repeat

log strPresetName as text

(*
AVAssetExportPresetLowQuality
AVAssetExportPresetMediumQuality
AVAssetExportPresetHighestQuality
AVAssetExportPresetHEVCHighestQuality
AVAssetExportPresetHEVCHighestQualityWithAlpha

AVAssetExportPreset640x480
AVAssetExportPreset960x540
AVAssetExportPreset1280x720
AVAssetExportPreset1920x1080
AVAssetExportPreset3840x2160

AVAssetExportPresetHEVC1920x1080
AVAssetExportPresetHEVC3840x2160
AVAssetExportPresetHEVC1920x1080WithAlpha
AVAssetExportPresetHEVC3840x2160WithAlpha
AVAssetExportPresetHEVC7680x4320

AVAssetExportPresetAppleM4V480pSD
AVAssetExportPresetAppleM4V720pHD
AVAssetExportPresetAppleM4V1080pHD
AVAssetExportPresetAppleM4ViPod
AVAssetExportPresetAppleM4VAppleTV
AVAssetExportPresetAppleM4VCellular
AVAssetExportPresetAppleM4VWiFi

AVAssetExportPresetAppleProRes422LPCM
AVAssetExportPresetAppleProRes4444LPCM

AVAssetExportPresetPassthrough
AVAssetExportPresetAppleM4A
*)

###############################
#####書き出しセッション
################################
###初期化
set ocidExSession to (refAVAssetExportSession's alloc()'s initWithAsset:ocidReadAsset presetName:strPresetName)
####音声のみの分岐
if (objResponse as text) is "AppleM4A" then
(ocidExSession's setOutputFileType:(refMe's AVFileTypeAppleM4A))
else
(ocidExSession's setOutputFileType:(refMe's AVFileTypeQuickTimeMovie))
end if
(*
AVFileTypeAC3
AVFileTypeAIFC
AVFileTypeAIFF
AVFileTypeAMR
AVFileTypeEnhancedAC3
AVFileTypeSunAU
AVFileTypeMPEGLayer3
AVFileTypeCoreAudioFormat
AVFileTypeAppleM4A
AVFileTypeWAVE

AVFileTypeDNG
AVFileTypeHEIC
AVFileTypeHEIF
AVFileTypeJPEG
AVFileTypeAVCI
AVFileTypeTIFF


AVFileTypeAppleM4V
AVFileType3GPP
AVFileType3GPP2
AVFileTypeQuickTimeMovie
AVFileTypeMPEG4

AVFileTypeSCC
AVFileTypeAppleiTT
*)
(ocidExSession's setTimeRange:ocidAssetTrackTimeRange)
#ocidExSession's setFileLengthLimit:(missing value)
(ocidExSession's setShouldOptimizeForNetworkUse:false)
(ocidExSession's setCanPerformMultiplePassesOverSourceMediaData:true)
(ocidExSession's setDirectoryForTemporaryFiles:ocidFullTmpPathURL)
####出力先ファイル指定
(ocidExSession's setOutputURL:ocidFullDistPathURL)
(ocidExSession's exportAsynchronouslyWithCompletionHandler:(missing value))
###############################
#####出力
################################
log "########################################"
set numStatusNo to ocidExSession's status()
log "status:\t" & numStatusNo
(*
AVAssetExportSessionStatusUnknown:0
AVAssetExportSessionStatusWaiting:1
AVAssetExportSessionStatusExporting:2
AVAssetExportSessionStatusCompleted:3
AVAssetExportSessionStatusFailed:4
AVAssetExportSessionStatusCancelled:5
*)
set progress total steps to 1
set progress completed steps to 0
set progress description to "書出"

repeat
set numProgress to ocidExSession's progress()
set numProgressPer to numProgress * 100 as integer
set progress additional description to "状況:" & numProgressPer & "%"
set progress completed steps to numProgress
set numStatusNo to ocidExSession's status()
if numStatusNo > 2 then
exit repeat
end if
delay 1
end repeat
log "status:\t" & numStatusNo

set ocidReadAsset to ""
set objFileManager to ""
set ocidExSession to ""

set ocidReadAsset to ""
set objFileManager to ""
set ocidExSession to ""
end repeat


to doGetDateNo(strDateFormat)
####日付情報の取得
set ocidDate to refNSDate's |date|()
###日付のフォーマットを定義
set ocidNSDateFormatter to refNSDateFormatter's alloc()'s init()
ocidNSDateFormatter's setLocale:(refMe's NSLocale's localeWithLocaleIdentifier:"ja_JP_POSIX")
ocidNSDateFormatter's setDateFormat:strDateFormat
set ocidDateAndTime to ocidNSDateFormatter's stringFromDate:ocidDate
set strDateAndTime to ocidDateAndTime as text
return strDateAndTime
end doGetDateNo

|

[CURL]CRLとしてコピーしたURLをURLとヘッダーに分離する

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions



property refMe : a reference to current application
property refNSString : a reference to refMe's NSString
property refNSMutableString : a reference to refMe's NSMutableString
property refNSUTF8StringEncoding : a reference to refMe's NSUTF8StringEncoding


property refNSCharacterSet : a reference to refMe's NSCharacterSet
property refNSRegularExpressionSearch : a reference to refMe's NSRegularExpressionSearch

property refNSNotFound : a reference to 9.22337203685477E+18 + 5807

set objFileManager to refMe's NSFileManager's defaultManager()

###クリックボードの中のURLを取得
tell application "Finder"
set strCURL2URL to the clipboard as text
end tell




###初期化 空の可変テキストを作成
set ocidNSMutableString to refNSMutableString's alloc()'s initWithCapacity:0
log className() of ocidNSMutableString as text
###可変テキスト
set ocidNSMutableString to refNSMutableString's stringWithString:strCURL2URL
log ocidNSMutableString as text
log className() of ocidNSMutableString as text
#########################
###↑文字数を数える
set numCntNSMutableString to ocidNSMutableString's |length|()
###↑文字数全部でレンジにする
set ocidNsRange to {location:0, |length|:numCntNSMutableString}
log class of ocidNsRange
log ocidNsRange as record
###改行除去
ocidNSMutableString's replaceOccurrencesOfString:("\r") withString:("") options:(refNSRegularExpressionSearch) range:ocidNsRange
log ocidNSMutableString as text
log className() of ocidNSMutableString as text

#########################
###↑文字数を数える
set numCntNSMutableString to ocidNSMutableString's |length|()
###↑文字数全部でレンジにする
set ocidNsRange to {location:0, |length|:numCntNSMutableString}
log class of ocidNsRange
log ocidNsRange as record
###改行除去
ocidNSMutableString's replaceOccurrencesOfString:("\n") withString:("") options:(refNSRegularExpressionSearch) range:ocidNsRange
log ocidNSMutableString as text
log className() of ocidNSMutableString as text


#########################
###↑文字数を数える
set numCntNSMutableString to ocidNSMutableString's |length|()
###↑文字数全部でレンジにする
set ocidNsRange to {location:0, |length|:numCntNSMutableString}
log class of ocidNsRange
log ocidNsRange as record
###バックスラッシュ除去
ocidNSMutableString's replaceOccurrencesOfString:("\\\\") withString:("") options:(refNSRegularExpressionSearch) range:ocidNsRange
log ocidNSMutableString as text
log className() of ocidNSMutableString as text


#########################
###↑文字数を数える
set numCntNSMutableString to ocidNSMutableString's |length|()
###↑文字数全部でレンジにする
set ocidNsRange to {location:0, |length|:numCntNSMutableString}
log class of ocidNsRange
log ocidNsRange as record
###curl除去
ocidNSMutableString's replaceOccurrencesOfString:("curl ") withString:("") options:0 range:ocidNsRange
log ocidNSMutableString as text
log className() of ocidNSMutableString as text



#########################
###区切り文字を定義
set ocidNSCFCharacterSet to refNSCharacterSet's characterSetWithCharactersInString:" "
log className() of ocidNSCFCharacterSet as text
###置き換え文字でArray=リスト化
set ocidNsArrayList to ocidNSMutableString's componentsSeparatedByCharactersInSet:ocidNSCFCharacterSet
log ocidNsArrayList as list
log className() of ocidNsArrayList as text
########################
####URL部分を取り出す
###初期化 空の可変テキストを作成
set ocidUrlText to refNSMutableString's alloc()'s initWithCapacity:0
set ocidUrlText to refNSMutableString's stringWithString:(ocidNsArrayList's objectAtIndex:0)


########################
####Arrayをテキストに戻す
#########################
###↑文字数を数える
set numCntNSMutableString to ocidNSMutableString's |length|()
###↑文字数全部でレンジにする
set ocidNsRange to {location:0, |length|:numCntNSMutableString}
log class of ocidNsRange
log ocidNsRange as record
###URL部分を取り除く
ocidNSMutableString's replaceOccurrencesOfString:(ocidUrlText) withString:("") options:0 range:ocidNsRange
set ocidHeaderText to ocidNSMutableString
###########################################
log ocidUrlText as text
log ocidHeaderText as text

|

[VLC]ブルーレイ再生用コンポーネントインストール

手動で行う場合
VLCをダウンロード
自分のMacのディスクにコピー
VLCを起動
一旦VLCを終了させる
コンポーネントをコピーする
VLCを起動-->こでれ完了です。
留意事項
ARM版は対応していません。インテル用を使います
-->この記事書いている時点ではARM版では利用できません。



#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions

######ログ表示
doLogView()

property objMe : a reference to current application
property objNSString : a reference to objMe's NSString
property objNSURL : a reference to objMe's NSURL
property objNSDate : a reference to objMe's NSDate
property objNSMutableString : a reference to objMe's NSMutableString

property objNSNotFound : a reference to 9.22337203685477E+18 + 5807

set objFileManager to objMe's NSFileManager's defaultManager()
####ARM版では動作しないので留意
###set strUrlVlcArm to "https://vlc.letterboxdelivery.org/vlc/3.0.17.3/macosx/vlc-3.0.17.3-arm64.dmg"
set strUrlVlcIntel to "https://vlc.letterboxdelivery.org/vlc/3.0.17.3/macosx/vlc-3.0.17.3-intel64.dmg"
###インテル版をインストールするために同じにする
set strUrlVlcArm to strUrlVlcIntel as text
set strUrlLibaacs to "https://vlc-bluray.whoknowsmy.name/files/mac/libaacs.dylib"

set strUrlKeydb to "http://fvonline-db.bplaced.net/export/keydb_jpn.zip"

#########################################

###ユーザーアプリケーションフォルダを作る
set ocidUserApplicationsPathList to (objFileManager's URLsForDirectory:(objMe's NSApplicationDirectory) inDomains:(objMe's NSUserDomainMask))
log ocidUserApplicationsPathList as list
log className() of ocidUserApplicationsPathList as text

set ocidUserApplicationsPath to ocidUserApplicationsPathList's objectAtIndex:0
log ocidUserApplicationsPath as list
log className() of ocidUserApplicationsPath as text

set boolMakeNewFolder to (objFileManager's createDirectoryAtURL:ocidUserApplicationsPath withIntermediateDirectories:true attributes:(missing value) |error|:(missing value))

if boolMakeNewFolder is false then
log "フォルダ作成でエラーしました"
error "" number -128
return
end if

###ユーザーaacs Cachesフォルダを作る
set ocidUserCachesList to (objFileManager's URLsForDirectory:(objMe's NSCachesDirectory) inDomains:(objMe's NSUserDomainMask))
log ocidUserCachesList as list
log className() of ocidUserCachesList as text


set ocidUserCachesPath to ocidUserCachesList's objectAtIndex:0
log ocidUserCachesPath as list
log className() of ocidUserCachesPath as text


set ocidUserAacsCachesPath to ocidUserCachesPath's URLByAppendingPathComponent:"aacs"
log ocidUserAacsCachesPath as list
log className() of ocidUserAacsCachesPath as text



set boolMakeNewFolder to (objFileManager's createDirectoryAtURL:ocidUserAacsCachesPath withIntermediateDirectories:true attributes:(missing value) |error|:(missing value))

if boolMakeNewFolder is false then
log "フォルダ作成でエラーしました"
error "" number -128
return
end if


###ユーザーbluray Cachesフォルダを作る
set ocidUserCachesList to (objFileManager's URLsForDirectory:(objMe's NSCachesDirectory) inDomains:(objMe's NSUserDomainMask))
log ocidUserCachesList as list
log className() of ocidUserCachesList as text


set ocidUserCachesPath to ocidUserCachesList's objectAtIndex:0
log ocidUserCachesPath as list
log className() of ocidUserCachesPath as text


set ocidUserBlurayCachesPath to ocidUserCachesPath's URLByAppendingPathComponent:"bluray"
log ocidUserBlurayCachesPath as list
log className() of ocidUserBlurayCachesPath as text


set boolMakeNewFolder to (objFileManager's createDirectoryAtURL:ocidUserBlurayCachesPath withIntermediateDirectories:true attributes:(missing value) |error|:(missing value))

if boolMakeNewFolder is false then
log "フォルダ作成でエラーしました"
error "" number -128
return
end if

###ユーザーaacs Preferenceフォルダを作る
set strPrefPath to "~/Library/Preferences/"
set ocidPrefPath to objNSString's stringWithString:strPrefPath
log ocidPrefPath as text
log className() of ocidPrefPath as text

set ocidPOSIXpath to ocidPrefPath's stringByStandardizingPath
log ocidPOSIXpath as text
log className() of ocidPOSIXpath as text

set ocidPreferencesPath to objNSURL's fileURLWithPath:ocidPOSIXpath
log ocidPreferencesPath as text
log className() of ocidPreferencesPath as text


set ocidUserAacsPreferencePath to ocidPreferencesPath's URLByAppendingPathComponent:"aacs"
log ocidUserAacsPreferencePath as list
log className() of ocidUserAacsPreferencePath as text


set strUserAacsPreferenceRelativePath to (ocidUserAacsPreferencePath's relativePath) as text
log strUserAacsPreferenceRelativePath as text


set boolMakeNewFolder to (objFileManager's createDirectoryAtURL:ocidUserAacsPreferencePath withIntermediateDirectories:true attributes:(missing value) |error|:(missing value))

if boolMakeNewFolder is false then
log "フォルダ作成でエラーしました"
error "" number -128
return
end if


#########################################
####ダウンロードフォルダ
###日付取得
###フォーマットは<http://nsdateformatter.com>参照
set strDateFormat to "yyyyMMddhhmmss" as text
set ocidForMatter to objMe's NSDateFormatter's alloc()'s init()
ocidForMatter's setLocale:(objMe's NSLocale's localeWithLocaleIdentifier:"ja_JP_POSIX")
ocidForMatter's setDateFormat:(strDateFormat)
set strDateText to (ocidForMatter's stringFromDate:(current date)) as text
####作成するダウンロードフォルダのパス
set strTmpDirPath to ("/tmp/" & strDateText & "") as text
set objTmpDirPath to objNSString's stringWithString:strTmpDirPath
###フォルダを作る
set boolMakeNewFolder to (objFileManager's createDirectoryAtPath:objTmpDirPath withIntermediateDirectories:true attributes:(missing value) |error|:(missing value))

if boolMakeNewFolder is false then
log "フォルダ作成でエラーしました"
error "" number -128
return
end if
#########################################
###vlcファイルのダウンロード
set objSysInfo to system info
set strCpuType to (CPU type of objSysInfo) as text

if strCpuType contains "Intel" then
set strCommandText to "/usr/bin/curl -k '" & strUrlVlcIntel & "' -o '" & strTmpDirPath & "/vlc.dmg' --connect-timeout 20" as text
else
set strCommandText to "/usr/bin/curl -k '" & strUrlVlcIntel & "' -o '" & strTmpDirPath & "/vlc.dmg' --connect-timeout 20" as text
end if

###コマンド実行
log "VLCダウンロード開始"
do shell script strCommandText
log "VLCダウンロード終了"
###libaacs.dylibファイルのダウンロード
set strCommandText to "/usr/bin/curl -k '" & strUrlLibaacs & "' -o '" & strTmpDirPath & "/libaacs.dylib.bin' --connect-timeout 20" as text
###コマンド実行
log "libaacs.dylibダウンロード開始"
do shell script strCommandText
log "libaacs.dylibダウンロード終了"
###必要ファイルのダウンロード
set strCommandText to "/usr/bin/curl -k '" & strUrlKeydb & "' -o '" & strTmpDirPath & "/keydb_jpn.zip' --connect-timeout 20" as text
###コマンド実行
log "keydb_jpn.zipダウンロード開始"
do shell script strCommandText
log "keydb_jpn.zipダウンロード終了"
#########################################
###ユーザーアプリケーションフォルダにVLC.appがあればゴミ箱へ入れる
set ocidVclPath to ocidUserApplicationsPath's URLByAppendingPathComponent:"VLC.app"
log ocidVclPath as list
log className() of ocidVclPath as text
####ゴミ箱に入れる
set boolGoToTrash to objFileManager's trashItemAtURL:ocidVclPath resultingItemURL:(missing value) |error|:("")
#####ディスクをマウント
try
set strCommandText to ("/usr/bin/hdiutil attach '" & strTmpDirPath & "/vlc.dmg' -noverify -nobrowse -noautoopen\n") as text
do shell script strCommandText
on error
log "attachでエラーになりました"
return
end try
try
set theComandText to ("/usr/bin/ditto '/Volumes/VLC media player/VLC.app' $HOME/Applications/VLC.app") as text
do shell script theComandText
on error
log "dittoでエラーになりました"
return
end try
try
set theComandText to ("/usr/bin/hdiutil detach \"Volumes/VLC media player\" -force") as text
do shell script theComandText
on error
log "detachでエラーになりました"
return
end try

set strUserName to objMe's NSUserName() as text

try
set theComandText to ("defaults write com.apple.dock persistent-apps -array-add \"<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>//Users/" & strUserName & "/Applications/VLC.app/</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>\"") as text
do shell script theComandText
on error
log "defaults writeでエラーになりました"
return
end try

#########################################
set theComandText to ("/bin/echo $HOME/Applications/VLC.app") as text
set strAppFilePath to (do shell script theComandText) as text

tell application "Finder"
set aliasAppFilePath to POSIX file strAppFilePath as alias
open aliasAppFilePath
end tell


tell application "VLC"
launch
activate
repeat
activate
if frontmost is false then
delay 1
else if frontmost is true then
exit repeat
else
delay 5
exit repeat
end if
end repeat
end tell


tell application "VLC"
activate
quit
end tell


#########################################
try
set theComandText to ("/usr/bin/ditto '" & strTmpDirPath & "/libaacs.dylib.bin' $HOME/Applications/VLC.app/Contents/MacOS/lib/libaacs.dylib") as text

do shell script theComandText
on error
log "libaacs.dylib dittoでエラーになりました"
return
end try
#########################################
set strCommandText to "/usr/bin/curl -k '" & strUrlKeydb & "' -o '" & strTmpDirPath & "/keydb_jpn.zip' --connect-timeout 20" as text


try
set theComandText to ("/usr/bin/unzip \"" & strTmpDirPath & "/keydb_jpn.zip\" -d \"" & strTmpDirPath & "\"") as text
do shell script theComandText
on error
log "unzipでエラーになりました"
return
end try

try
set theComandText to ("/usr/bin/ditto '" & strTmpDirPath & "/keydb.cfg' '" & strUserAacsPreferenceRelativePath & "/keydb.cfg'") as text

do shell script theComandText
on error
log "libaacs.dylib dittoでエラーになりました"
return
end try

#########################################

set theComandText to ("xattr -rc $HOME/Applications/VLC.app") as text
do shell script theComandText



###Dock再起動
set strCommandText to "/usr/bin/killall Dock" as text
do shell script strCommandText


display notification "処理終了" with title "処理が終了" subtitle "処理が終了しました" sound name "Sonumi"
log ">>>>>>>>>>>>処理終了<<<<<<<<<<<<<<<"
return ">>>>>>>>>>>>処理終了<<<<<<<<<<<<<<<"


#########################ログ表示
to doLogView()

tell application "System Events"
set listAppList to title of (every process where background only is false)
end tell
repeat with objAppList in listAppList
set strAppList to objAppList as text
if strAppList is "スクリプトエディタ" then
tell application "Script Editor"
if frontmost is true then
try
tell application "System Events" to click menu item "ログを表示" of menu "表示" of menu bar item "表示" of menu bar 1 of application process "Script Editor"
end try
end if
end tell
end if
end repeat

end doLogView
#########################

|

その他のカテゴリー

Acrobat Acrobat Annotation Acrobat Dialog Acrobat Form Acrobat JS Acrobat Open Acrobat Plugin Acrobat python Acrobat Reader Acrobat Sequ Acrobat Stamps Admin Admin Account Admin Apachectl Admin configCode Admin Device Management Admin LaunchServices Admin Locationd Admin loginitem Admin Maintenance Admin Permission Admin Pkg Admin Power Management Admin Printer Admin SetUp Admin SMB Admin System Information Admin Tools Admin Users Admin Volumes Adobe Apple AppleScript AppleScript Guide AppleScript Accessibility AppleScript AppKit AppleScript Applications AppleScript AppStore AppleScript Archive AppleScript Attributes AppleScript Automator AppleScript AVAsset AppleScript AVconvert AppleScript AVFoundation AppleScript AVURLAsset AppleScript BackUp AppleScript Barcode AppleScript Bash AppleScript Basic AppleScript Basic Path AppleScript Bluetooth AppleScript BOX AppleScript Browser AppleScript Calendar AppleScript CD/DVD AppleScript Choose AppleScript Chrome AppleScript CIImage AppleScript CloudStorage AppleScript Color AppleScript com.apple.LaunchServices.OpenWith AppleScript Console AppleScript Contacts AppleScript CotEditor AppleScript CURL AppleScript current application AppleScript Date&Time AppleScript delimiters AppleScript Desktop AppleScript Device AppleScript Disk AppleScript do shell script AppleScript Dock AppleScript DropBox AppleScript eMail AppleScript Encode Decode AppleScript Error AppleScript EXIFData AppleScript ffmpeg AppleScript File AppleScript Finder AppleScript Firefox AppleScript Folder AppleScript Fonts AppleScript GIF AppleScript HTML AppleScript Icon AppleScript Illustrator AppleScript Image Events AppleScript Image2PDF AppleScript ImageOptim Applescript iWork AppleScript Javascript AppleScript Jedit AppleScript Json AppleScript Label AppleScript List AppleScript locationd AppleScript LRC AppleScript LSSharedFileList AppleScript m3u8 AppleScript MakePDF AppleScript Map AppleScript Math AppleScript Microsoft AppleScript Microsoft Edge AppleScript Microsoft Excel AppleScript Mobileconfig AppleScript Mouse AppleScript Movie AppleScript Music AppleScript NetWork AppleScript Notes AppleScript NSArray AppleScript NSBitmapImageRep AppleScript NSBundle AppleScript NSCFBoolean AppleScript NSCharacterSet AppleScript NSColor AppleScript NSColorList AppleScript NSData AppleScript NSDictionary AppleScript NSError AppleScript NSEvent AppleScript NSFileAttributes AppleScript NSFileManager AppleScript NSFont AppleScript NSFontManager AppleScript NSImage AppleScript NSIndex AppleScript NSKeyedArchiver AppleScript NSKeyedUnarchiver AppleScript NSLocale AppleScript NSMutableArray AppleScript NSMutableDictionary AppleScript NSMutableString AppleScript NSNotFound AppleScript NSNumber AppleScript NSOpenPanel AppleScript NSPasteboard AppleScript NSPDFImageRep AppleScript NSpoint AppleScript NSPredicate AppleScript NSRange AppleScript NSRegularExpression AppleScript NSRunningApplication AppleScript NSScreen AppleScript NSSize AppleScript NSString AppleScript NSStringCompareOptions AppleScript NSTask AppleScript NSTimeZone AppleScript NSURL AppleScript NSURL File AppleScript NSURLBookmark AppleScript NSURLComponents AppleScript NSURLResourceKey AppleScript NSUserDefaults AppleScript NSUUID AppleScript NSView AppleScript NSWorkspace AppleScript Numbers AppleScript OAuth AppleScript ObjC AppleScript OneDrive AppleScript Osax AppleScript PDF AppleScript PDFAnnotationWidget AppleScript PDFContext AppleScript PDFDisplayBox AppleScript PDFDocumentPermissions AppleScript PDFKit AppleScript PDFnUP AppleScript PDFOutline AppleScript Photos AppleScript Photoshop AppleScript Plist System Events AppleScript PostScript AppleScript prefPane AppleScript Preview AppleScript Python AppleScript QR AppleScript QR Decode AppleScript QuickLook AppleScript QuickTime AppleScript record AppleScript Regular Expression AppleScript Reminders AppleScript ReName AppleScript Repeat AppleScript RTF AppleScript Safari AppleScript SaveFile AppleScript ScreenCapture AppleScript ScreenSaver AppleScript Script Editor AppleScript Script Menu AppleScript Shortcuts AppleScript Shortcuts Events AppleScript Sort AppleScript Sound AppleScript Spotlight AppleScript SRT AppleScript StandardAdditions AppleScript stringByApplyingTransform AppleScript System Events AppleScript System Settings AppleScript TemporaryItems AppleScript Terminal AppleScript Text AppleScript Text CSV AppleScript Text TSV AppleScript TextEdit AppleScript Translate AppleScript Trash AppleScript Twitter AppleScript UI AppleScript Unit Conversion AppleScript UTType AppleScript valueForKeyPath AppleScript Video AppleScript VisionKit AppleScript Visual Studio Code AppleScript webarchive AppleScript webp AppleScript Wifi AppleScript XML AppleScript XML EPUB AppleScript XML OPML AppleScript XML Plist AppleScript XML RSS AppleScript XML SVG AppleScript XML TTML AppleScript XML webloc AppleScript YouTube AppleScript Zero Suppress Applications Barcode OnLine Tools CityCode Design iPhone List Logs lsappinfo Memo Music perl PlistBuddy pluginkit postalcode ReadMe SF Symbols character id SF Symbols Entity sips Skype Slack sqlite TCC Tools Typography Video Wacom zoom