AppleScript QuickTime

[QuickTimePlayer]サブモニタにウィンドウに移動する(考え中)

OpenできるファイルのみOpenする

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

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#com.cocolog-nifty.quicktimer.icefloe
# 要 アクアセシビリティ 許可
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use framework "Foundation"
use framework "AppKIt"
use scripting additions
property refMe : a reference to current application

property strBundleID : "com.apple.QuickTimePlayerX"

on run
  ###対応UTIを取得
  set listUTI to doGetUTI()
  ###ダイアログ
  set aliasDefaultLocation to (path to desktop from user domain) as alias
  set strPromptText to "ファイルをえらんでください"
  set strMesText to "ファイルををえらんでください"
  try
    set listFilePath to (choose file strMesText with prompt strPromptText default location aliasDefaultLocation of type listUTI with multiple selections allowed, invisibles and showing package contents) as list
  on error
    log "エラーしました"
return "エラーしました"
  end try
open listFilePath
end run



on open listFilePath
  set listOpenFilePath to {} as list
  repeat with itemFilePath in listFilePath
    set aliasFilePath to itemFilePath as alias
    set objInfoFor to info for aliasFilePath
    ###ドロップされたファイルのUTI
    set strUTI to (type identifier of objInfoFor) as text
    ###アプリケーションの対応UTIを収集して
    set listUTI to doGetUTI()
    ###対象アプリケーションで開く事ができるファイルのみ別リストにする
    if listUTI contains strUTI then
      set end of listOpenFilePath to (aliasFilePath)
    end if
  end repeat
  
  
  ###スクリーン
  set ocidScreenArray to refMe's NSScreen's screens()
  set numCntScreen to ocidScreenArray's |count|()
  ###メインモニタ
  set ocidMainScreen to refMe's NSScreen's mainScreen()
  set ocidMainScreenName to ocidMainScreen's localizedName()
  set strMainScreenName to ocidMainScreenName as text
  
  if numCntScreen > 1 then
    ###サブモニタ
    set ocidSubMoniter to ocidScreenArray's lastObject()
    set ocidScreenName to ocidSubMoniter's localizedName()
    set strScreenName to ocidScreenName as text
    set strMenuName to ("" & strScreenName & "に移動") as text
  end if
  log strMainScreenName
  log strScreenName
  
  
  tell application id strBundleID
    set numCntWindow to (count of every window) as integer
    if numCntWindow ≥ 1 then
      tell every window
close saving no
      end tell
    end if
  end tell
  
  repeat with itemOpenFilePath in listOpenFilePath
    set aliasFilePath to itemOpenFilePath as alias
    tell application id strBundleID
      open file aliasFilePath
    end tell
    tell application "QuickTime Player"
      tell application "System Events"
tell front desktop
log display name as text
end tell
tell process "QuickTime Player"
set frontmost to true
tell menu bar 1
click menu bar item "ウインドウ"
delay 0.2
tell menu "ウインドウ"
click menu item strMenuName
delay 0.2
end tell
end tell
keystroke return
end tell
      end tell
    end tell
  end repeat
  
end open


to doGetUTI()
  ###アプリケーションのURLを取得
  ###NSバンドルをUTIから取得
  set ocidAppBundle to refMe's NSBundle's bundleWithIdentifier:(strBundleID)
  if ocidAppBundle = (missing value) then
    ###NSバンドル取得できなかった場合
    set appNSWorkspace to refMe's NSWorkspace's sharedWorkspace()
    set ocidAppPathURL to appNSWorkspace's URLForApplicationWithBundleIdentifier:(strBundleID)
  else
    set ocidAppPathURL to ocidAppBundle's bundleURL()
  end if
  ###Plistのパス
  set ocidPlistPathURL to ocidAppPathURL's URLByAppendingPathComponent:("Contents/Info.plist") isDirectory:false
  set ocidPlistDict to refMe's NSMutableDictionary's alloc()'s initWithContentsOfURL:(ocidPlistPathURL)
  set ocidDocTypeArray to ocidPlistDict's objectForKey:"CFBundleDocumentTypes"
  if ocidDocTypeArray = (missing value) then
    set strOutPutText to "missing value" as text
  else
    ####リストにする
    set listUTl to {} as list
    ###対応ドキュメントタイプをリストにしていく
    repeat with itemDocTypeArray in ocidDocTypeArray
      set listContentTypes to (itemDocTypeArray's objectForKey:"LSItemContentTypes")
      if listContentTypes = (missing value) then
###拡張子の指定のみの場合
set ocidExtension to (itemDocTypeArray's objectForKey:"CFBundleTypeExtensions")
set strClassName to ocidExtension's className() as text
repeat with itemExtension in ocidExtension
set strExtension to itemExtension as text
set ocidContentTypes to (refMe's UTType's typeWithFilenameExtension:(strExtension))
set strContentTypes to ocidContentTypes's identifier() as text
set strContentTypes to ("" & strContentTypes & "") as text
set end of listUTl to (strContentTypes)
end repeat
      else
repeat with itemContentTypes in listContentTypes
set strContentTypes to ("" & itemContentTypes & "") as text
set end of listUTl to (strContentTypes)
end repeat
      end if
    end repeat
  end if
return listUTl
end doGetUTI

|

[screencapture]画面キャプチャー QuickTimeウィンドウ

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

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use framework "Foundation"
use framework "AppKit"
use framework "Quartz"
use scripting additions

property refMe : a reference to current application
set appFileManager to refMe's NSFileManager's defaultManager()

set numMakeImage to 20 as integer

###起動
tell application "QuickTime Player" to launch

###起動確認 最大10秒
repeat 10 times
  tell application "QuickTime Player"
    set boolFrontMost to frontmost as boolean
    if boolFrontMost is false then
      activate
    else
      exit repeat
    end if
  end tell
end repeat

####ウィンドチェック
tell application "QuickTime Player"
  set numCntWindow to (count of every window) as integer
end tell
if numCntWindow = 0 then
  return "ウィンドウがありません"
end if

####ファイル名用に今の時間
tell application "QuickTime Player"
  tell front document
    set numSec to (current time) as integer
    set aliasFilePath to its file as alias
    set numFullSec to its duration as integer
    set listDimension to its natural dimensions as list
  end tell
  tell front window
    set listNewBounds to {0, 25, (item 1 of listDimension), (item 2 of listDimension)} as list
    set its bounds to listNewBounds
  end tell
end tell


####ファイル名用に今の時間
tell application "QuickTime Player"
  tell front window
    set numWindowID to its id as integer
  end tell
end tell

################################
##### パス関連
################################
###開いているファイル
set strFilePath to POSIX path of aliasFilePath as text
set ocidFilePathStr to refMe's NSString's stringWithString:strFilePath
set ocidFilePath to ocidFilePathStr's stringByStandardizingPath()
set ocidFilePathURL to refMe's NSURL's alloc()'s initFileURLWithPath:ocidFilePath isDirectory:false
set ocidFileName to ocidFilePathURL's lastPathComponent()
set strFileName to ocidFileName as text
####コンテナディレクトリ
set ocidContainerDirURL to ocidFilePathURL's URLByDeletingLastPathComponent()
set strSaveDirName to (strFileName & "._Images") as text
set ocidSaveDirPathURL to ocidContainerDirURL's URLByAppendingPathComponent:strSaveDirName isDirectory:true
set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:true attributes:(missing value) |error|:(reference)

################################
##### 本処理
################################
set numTimeInterval to (numFullSec / numMakeImage) as integer

set numSetTime to 60 as integer

###マウスカーソルを画面の外に
###移動させたい位置(左上が0x0
set ocidNSpoint to refMe's NSMakePoint(0, 0)

repeat numMakeImage times
  ####ファイル名
  set strSaveFileName to (strFileName & "." & numSetTime & ".tiff") as text
  set ocidSaveFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:strSaveFileName isDirectory:false
  set strSaveFilePath to ocidSaveFilePathURL's |path| as text
  ##キャプチャ前にカーソル位置を確認
  ###カーソルを画面外へ移動
  refMe's CGWarpMouseCursorPosition(ocidNSpoint)
  tell application "QuickTime Player"
    tell front document
      set current time to numSetTime
      delay 0.5
    end tell
  end tell
  set strCommandText to "/usr/sbin/screencapture -a -x -w -o -r -t tiff -T 0 -l " & numWindowID & " \"" & strSaveFilePath & "\"" as text
  do shell script strCommandText
  delay 0.5
  
  ###カウントアップ
  set numSetTime to numSetTime + numTimeInterval as integer
end repeat


|

[QuickTime]時間で切り出す

#!/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 refNSURL : a reference to refMe's NSURL

###ffmpeg へのパス
set strPathToFFMPEG to "echo $HOME/bin/ffmpeg/ffmpeg" as text
set strBinPath to (do shell script strPathToFFMPEG)


tell current application
activate
display alert "QuickTime Player" message "開始ポジションを選んでください" as informational giving up after 60
end tell

tell application "QuickTime Player"
set objMovieRef to a reference to the front document
set aliasFilePath to file of objMovieRef as alias
end tell



set strFilePath to (POSIX path of aliasFilePath) as text
####NSStringパスにします
set ocidFilePath to (refNSString's stringWithString:strFilePath)
###NSURLにしたら
set ocidFilePathURL to (refNSURL's alloc()'s initFileURLWithPath:ocidFilePath)
####ファイル名を取得
set ocidFileName to ocidFilePathURL's lastPathComponent()
-->(*NSPathStore2*)
####拡張子を取得
set ocidFileExtension to ocidFilePathURL's pathExtension()
-->(*NSPathStore2*)
####ファイル名から拡張子を取っていわゆるベースファイル名を取得
set ocidPrefixName to ocidFileName's stringByDeletingPathExtension
####コンテナディレクトリを取得
set ocidContainerDirURL to ocidFilePathURL's URLByDeletingLastPathComponent()
####AVAssetに格納して
set ocidReadAsset to (refMe's AVURLAsset's alloc()'s initWithURL:ocidFilePathURL options:(missing value))
####AVAssetのビデオトラックを取り出します
set ocidReadAssetArray to (ocidReadAsset's tracksWithMediaType:(refMe's AVMediaTypeVideo))
set ocidAssetVideoTrack to (ocidReadAssetArray's objectAtIndex:0)
###ビデオの縦横幅
set ocidBounds to ocidAssetVideoTrack's naturalSize()
set numDimensionsW to width of ocidBounds as integer
set numDimensionsH to height of ocidBounds as integer
set strDimensionsW to numDimensionsW as text
set strDimensionsH to numDimensionsH as text
####フレームレートFPS
set numFrameRate to (ocidAssetVideoTrack's nominalFrameRate()) as number

tell application "QuickTime Player"
set objMovieRef to a reference to the front document
set numDuration to the duration of objMovieRef
tell document 1
activate
properties
set numStartDuration to current time as number
set numStartTimeH to round of (numStartDuration / 3600) rounding down
set numStartTimeHH to numStartTimeH * 3600 as integer
if numStartTimeHH > 3600 then
set numStartTimeMM to numStartDuration - numStartTimeHH as number
else
set numStartTimeMM to numStartDuration as number
end if
--> numStartTimeHが時間
-->残りであるnumStartTimeMMが残りの秒数
set numStartTimeM to round of (numStartTimeMM / 60) rounding down
set numStartTimeSS to numStartTimeM * 60 as integer
set numStartTimeS to numStartTimeMM - numStartTimeSS as integer
end tell
end tell

####ゼロサプレス
set strStartTimeH to (text -2 through -1 of ("00" & numStartTimeH)) as text
set strStartTimeM to (text -2 through -1 of ("00" & numStartTimeM)) as text
set strStartTimeS to (text -2 through -1 of ("00" & numStartTimeS)) as text

set strStartTime to ("" & strStartTimeH & ":" & strStartTimeM & ":" & strStartTimeS & "") as text
set strStartTimeFileName to ("" & strStartTimeH & "_" & strStartTimeM & "_" & strStartTimeS & "") as text
log strStartTime



tell current application
activate
display alert "QuickTime Player" message "終了ポジションを選んでください" as informational giving up after 60
end tell

tell application "QuickTime Player"
set objMovieRef to a reference to the front document
set numDuration to the duration of objMovieRef
tell document 1
activate
properties
set numEndTimeDuration to current time as number
set numEndTimeH to round of (numEndTimeDuration / 3600) rounding down
set numEndTimeHH to numEndTimeH * 3600 as integer
if numStartTimeHH > 3600 then
set numEndTimeMM to numEndTimeDuration - numEndTimeHH as number
else
set numEndTimeMM to numEndTimeDuration as number
end if
--> numEndTimeHが時間
-->残りであるnumEndTimeMMが残りの秒数
set numEndTimeM to round of (numEndTimeMM / 60) rounding down
set numEndTimeSS to numEndTimeM * 60 as integer
set numEndTimeS to numEndTimeMM - numEndTimeSS as integer
end tell
end tell

####ゼロサプレス
set strEndTimeH to (text -2 through -1 of ("00" & numEndTimeH)) as text
set strEndTimeM to (text -2 through -1 of ("00" & numEndTimeM)) as text
set strEndTimeS to (text -2 through -1 of ("00" & numEndTimeS)) as text

set strEndTime to ("" & strEndTimeH & ":" & strEndTimeM & ":" & strEndTimeS & "") as text
set strEndTimeFileName to ("" & strEndTimeH & "_" & strEndTimeM & "_" & strEndTimeS & "") as text

log strStartTime
log strEndTime
log numFrameRate

set strNewFilePath to strFilePath & "." & strStartTimeFileName & "x" & strEndTimeFileName & ".mp4"



set strComandText to "'" & strBinPath & "' -i '" & strFilePath & "' -ss " & strStartTime & " -to " & strEndTime & " -vcodec libx264 -acodec copy '" & strNewFilePath & "'" as text


tell application "Terminal"
launch
activate
set objWindowID to (do script "\n\n")
delay 1
###コマンド実行
do script strComandText in objWindowID

do script "\n\n" in objWindowID
end tell

|

[QuickTime]current timeを時間表記にする

#!/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 refNSURL : a reference to refMe's NSURL


tell current application
activate
display alert "QuickTime Player" message "開始ポジションを選んでください" as informational giving up after 60
end tell

tell application "QuickTime Player"
set objMovieRef to a reference to the front document
set aliasFilePath to file of objMovieRef as alias
end tell



set strFilePath to (POSIX path of aliasFilePath) as text
####NSStringパスにします
set ocidFilePath to (refNSString's stringWithString:strFilePath)
###NSURLにしたら
set ocidFilePathURL to (refNSURL's alloc()'s initFileURLWithPath:ocidFilePath)
####ファイル名を取得
set ocidFileName to ocidFilePathURL's lastPathComponent()
-->(*NSPathStore2*)
####拡張子を取得
set ocidFileExtension to ocidFilePathURL's pathExtension()
-->(*NSPathStore2*)
####ファイル名から拡張子を取っていわゆるベースファイル名を取得
set ocidPrefixName to ocidFileName's stringByDeletingPathExtension
####コンテナディレクトリを取得
set ocidContainerDirURL to ocidFilePathURL's URLByDeletingLastPathComponent()
####AVAssetに格納して
set ocidReadAsset to (refMe's AVURLAsset's alloc()'s initWithURL:ocidFilePathURL options:(missing value))
####AVAssetのビデオトラックを取り出します
set ocidReadAssetArray to (ocidReadAsset's tracksWithMediaType:(refMe's AVMediaTypeVideo))
set ocidAssetVideoTrack to (ocidReadAssetArray's objectAtIndex:0)
###ビデオの縦横幅
set ocidBounds to ocidAssetVideoTrack's naturalSize()
set numDimensionsW to width of ocidBounds as integer
set numDimensionsH to height of ocidBounds as integer
set strDimensionsW to numDimensionsW as text
set strDimensionsH to numDimensionsH as text
####フレームレートFPS
set numFrameRate to (ocidAssetVideoTrack's nominalFrameRate()) as number

tell application "QuickTime Player"
set objMovieRef to a reference to the front document
set numDuration to the duration of objMovieRef
tell document 1
activate
properties
set numStartDuration to current time as number
set numStartTimeH to round of (numStartDuration / 3600) rounding down
set numStartTimeHH to numStartTimeH * 3600 as integer
if numStartTimeHH > 3600 then
set numStartTimeMM to numStartDuration - numStartTimeHH as number
else
set numStartTimeMM to numStartDuration as number
end if
--> numStartTimeHが時間
-->残りであるnumStartTimeMMが残りの秒数
set numStartTimeM to round of (numStartTimeMM / 60) rounding down
set numStartTimeSS to numStartTimeM * 60 as integer
set numStartTimeS to numStartTimeMM - numStartTimeSS as integer
end tell
end tell

####ゼロサプレス
set strStartTimeH to (text -2 through -1 of ("00" & numStartTimeH)) as text
set strStartTimeM to (text -2 through -1 of ("00" & numStartTimeM)) as text
set strStartTimeS to (text -2 through -1 of ("00" & numStartTimeS)) as text

set strStartTime to ("" & strStartTimeH & ":" & strStartTimeM & ":" & strStartTimeS & "") as text
set strStartTimeFileName to ("" & strStartTimeH & "_" & strStartTimeM & "_" & strStartTimeS & "") as text
log strStartTime



tell current application
activate
display alert "QuickTime Player" message "終了ポジションを選んでください" as informational giving up after 60
end tell

tell application "QuickTime Player"
set objMovieRef to a reference to the front document
set numDuration to the duration of objMovieRef
tell document 1
activate
properties
set numEndTimeDuration to current time as number
set numEndTimeH to round of (numEndTimeDuration / 3600) rounding down
set numEndTimeHH to numEndTimeH * 3600 as integer
if numStartTimeHH > 3600 then
set numEndTimeMM to numEndTimeDuration - numEndTimeHH as number
else
set numEndTimeMM to numEndTimeDuration as number
end if
--> numEndTimeHが時間
-->残りであるnumEndTimeMMが残りの秒数
set numEndTimeM to round of (numEndTimeMM / 60) rounding down
set numEndTimeSS to numEndTimeM * 60 as integer
set numEndTimeS to numEndTimeMM - numEndTimeSS as integer
end tell
end tell

####ゼロサプレス
set strEndTimeH to (text -2 through -1 of ("00" & numEndTimeH)) as text
set strEndTimeM to (text -2 through -1 of ("00" & numEndTimeM)) as text
set strEndTimeS to (text -2 through -1 of ("00" & numEndTimeS)) as text

set strEndTime to ("" & strEndTimeH & ":" & strEndTimeM & ":" & strEndTimeS & "") as text
set strEndTimeFileName to ("" & strEndTimeH & "_" & strEndTimeM & "_" & strEndTimeS & "") as text

log strStartTime
log strEndTime
log numFrameRate

|

[QuickTime]ビデオファイル名変更 横px 縦px FPS 追加

#!/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 refNSURL : a reference to refMe's NSURL
property refNSMutableString : a reference to refMe's NSMutableString
property refNSMutableArray : a reference to refMe's NSMutableArray


property refNSArray : a reference to refMe's NSArray
property refAVURLAsset : a reference to refMe's AVURLAsset
property refAVMediaTypeVideo : a reference to refMe's AVMediaTypeVideo



property listUTI : {"com.apple.quicktime-movie", "public.mpeg-4", "public.mpeg-2-transport-stream"}


on run
######ログ表示
doLogView()
####NSFileManager初期化
set objFileManager to refMe's NSFileManager's alloc()'s init()
log className() of objFileManager as text
####ダウンロードディレクトリ
set ocidUserDownloadsPath to (objFileManager's URLsForDirectory:(refMe's NSDownloadsDirectory) inDomains:(refMe's NSUserDomainMask))
log ocidUserDownloadsPath as list
log className() of ocidUserDownloadsPath as text
###ダウンロードディレクトリ
set ocidUserDownloadsPath to ocidUserDownloadsPath's objectAtIndex:0
log ocidUserDownloadsPath as text
log className() of ocidUserDownloadsPath as text
###
set aliasDefaultLocation to ocidUserDownloadsPath as alias
log aliasDefaultLocation as alias
log class of aliasDefaultLocation

###複数選択可能なダイアログを出す--> 戻り値はリストで格納されます
set listChooseFileAliasList to (choose file with prompt "ムービーファイルを選んでください" default location aliasDefaultLocation of type listUTI with invisibles and multiple selections allowed without showing package contents) as list
open listChooseFileAliasList

####NSFileManager解放
objFileManager's release()
end run


on open listChooseFileAliasList
####NSFileManager初期化
set objFileManager to refMe's NSFileManager's alloc()'s init()
log className() of objFileManager as text

repeat with objFile in listChooseFileAliasList
###UNIXパス
set aliasFilePath to objFile as alias
set strFilePath to POSIX path of objFile

##Make NSString
set ocidFilePath to (refNSString's stringWithString:strFilePath)
log ocidFilePath as text
log className() of ocidFilePath as text

if strFilePath contains "~" then
set ocidPosixPath to refNSString's stringByExpandingTildeInPath()
log ocidPosixPath as text
log className() of ocidPosixPath as text
end if
#####NSURL
set ocidURLPath to (refNSURL's fileURLWithPath:ocidFilePath)
log ocidURLPath as text
log ocidURLPath's className() as text
#####URLByDeletingLastPathComponent Dir
set ocidURLContainerDirPath to ocidURLPath's URLByDeletingLastPathComponent()
log ocidURLContainerDirPath as text
log className() of ocidURLContainerDirPath as text
#####URLByDeletingLastPathComponent Dir
set strURLContainerDirPath to ocidURLContainerDirPath's relativePath()
log strURLContainerDirPath as text
log className() of strURLContainerDirPath as text
#####lastPathComponent
set ocidFileName to ocidURLPath's lastPathComponent()
log ocidFileName as text
log className() of ocidFileName as text
#####pathExtension
set ocidPathExtension to ocidURLPath's pathExtension()
log ocidPathExtension as text
log className() of ocidPathExtension as text

########ファイル名からカンマを取る
######Arrayの初期化
set ocidMutableArray to (refNSMutableArray's alloc()'s initWithCapacity:0)
log ocidMutableArray as list
log className() of ocidMutableArray as text
###カンマを定義
set ocidNSCFCharacterSet to (refMe's NSCharacterSet's characterSetWithCharactersInString:".")
log className() of ocidNSCFCharacterSet as text
###ocidNSCFCharacterSetArray=リスト化
set ocidMutableArray to (ocidFileName's componentsSeparatedByCharactersInSet:ocidNSCFCharacterSet)
log ocidMutableArray as list
log className() of ocidMutableArray as text
###リストをテキストに
set ocidShortFileName to (ocidMutableArray's objectAtIndex:0)
log ocidShortFileName as text
log className() of ocidShortFileName as text


############確認用にログ出します
log "###Input"
log "Alias: " & aliasFilePath as text
log "POSIX: " & strFilePath as text
log "alias Container" & ocidURLContainerDirPath as text
log "POSIX Container" & strURLContainerDirPath as text
log "FileName: " & ocidFileName as text
log "Extension: " & ocidPathExtension as text
log "ShortFileName: " & ocidShortFileName as text


####AVURLAsset取得
set ocidAVURLAsset to (refAVURLAsset's alloc()'s initWithURL:ocidURLPath options:(missing value))
log className() of ocidAVURLAsset as text
####AVURLAssetのビデオ部分を取得
set ocidVideoAssetTrack to (ocidAVURLAsset's tracksWithMediaType:(refAVMediaTypeVideo))
log className() of ocidVideoAssetTrack as text
####取得したビデオトラック(Arrayで入るので)の最初のトラック
set ocidAsset to (ocidVideoAssetTrack's objectAtIndex:0)
log ocidAsset as list
log className() of ocidAsset as text
####サイズ
set ocidBounds to ocidAsset's naturalSize()
log ocidBounds as record
log class of ocidBounds as text

set numDimensionsW to width of ocidBounds as integer
set numDimensionsH to height of ocidBounds as integer
set strDimensionsW to numDimensionsW as text
set strDimensionsH to numDimensionsH as text
####フレームレートFPS
set ocidFrameRate to ocidAsset's nominalFrameRate()
log ocidFrameRate as real
log class of ocidFrameRate as text
####整数にしてテキスト化
##set strFPS to (ocidFrameRate as integer) as text
set strFPS to ocidFrameRate as text
###################小数点以下がある場合は2桁に整形
if strFPS contains "." then
####NSDecimalNumber
set ocidDecimalNumber to (refMe's NSDecimalNumber's decimalNumberWithString:strFPS)
log ocidDecimalNumber as text
log className() of ocidDecimalNumber as text

###NSNumberFormatterの初期化
set ocidNSNumberFormatter to refMe's NSNumberFormatter's alloc()'s init()
log ocidNSNumberFormatter
log className() of ocidNSNumberFormatter as text
###小数点以下2桁のフォーマット
(ocidNSNumberFormatter's setPositiveFormat:"##0.00")
####フォーマットを適応
set ocidDecimalNumber to (ocidNSNumberFormatter's stringFromNumber:ocidDecimalNumber)
log ocidDecimalNumber as text
log className() of ocidDecimalNumber as text
set strFPS to ocidDecimalNumber as text
ocidNSNumberFormatter's release()
end if
log "###VideoInfo"
log "W: " & strDimensionsW
log "H: " & strDimensionsH
log "FPS: " & strFPS


#####変更後のファイル名
set strNewFileName to ((ocidShortFileName as text) & "." & strDimensionsW & "x" & strDimensionsH & "." & strFPS & "fps.mov") as text
#####変更後のファイルパス
set strNewFilePath to ((strURLContainerDirPath as text) & "/" & strNewFileName) as text

log "###OutPut"
log "AliasOutPutDir: " & ocidURLContainerDirPath
log "NewFileName: " & strNewFileName
log "NewFilePath: " & strNewFilePath

#####保存先のdファイルパス
set ocidDistFilePath to (refNSString's stringWithString:strNewFilePath)
###ファイルパスに同名のファイルがあるか?
set boolFileExists to (objFileManager's fileExistsAtPath:ocidDistFilePath isDirectory:false)
log boolFileExists
###同名のファイルがある場合は1をつける
if boolFileExists is true then
#####変更後のファイル名
set strNewFileName to (strShortFileName & "." & strDimensionsW & "x" & strDimensionsH & "." & strFPS & "fps.1.mov") as text
#####変更後のファイルパス
set strNewFilePath to (strContainerDirPath & strNewFileName) as text
####リネーム後のファイルパスをNSString
set ocidDistFilePath to (refNSString's stringWithString:strNewFilePath)
end if

tell application "QuickTime Player"
####ファイルをオープンしてobjOpenDocに格納
set objOpenDoc to open file aliasFilePath
tell objOpenDoc
#####書き出し
##export the front document in (POSIX file strNewFilePath) using settings preset "1080p"
##export the front document in (POSIX file strNewFilePath) using settings preset "720p"
##export the front document in (POSIX file strNewFilePath) using settings preset "480p"
export objOpenDoc in (POSIX file strNewFilePath) using settings preset "4K"

##export the front document in (POSIX file strNewFilePath) using settings preset "Audio Only"
end tell
###ファイルを閉じる
close objOpenDoc
end tell

####解放
ocidAVURLAsset's release()
ocidVideoAssetTrack's release()
objFileManager's release()
end repeat

####NSFileManager解放
objFileManager's release()
end open





#########################ログ表示
on 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
tell application "Script Editor"
tell application "System Events"
tell process "Script Editor"
tell window 1
tell splitter group 1
tell splitter group 1
tell group 1
tell checkbox "返された値"
set boolValue to value as boolean
end tell
if boolValue is false then
click checkbox "返された値"
end if
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end if
end repeat

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

|

[QuickTime]書き出し (その2)FPS入り

#!/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 objMe : a reference to current application
property objNSString : a reference to objMe's NSString
property objNSURL : a reference to objMe's NSURL
property objNSArray : a reference to objMe's NSArray
property objAVURLAsset : a reference to objMe's AVURLAsset
property objAVMediaTypeVideo : a reference to objMe's AVMediaTypeVideo

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


property listUTI : {"com.apple.quicktime-movie", "public.mpeg-4", "public.mpeg-2-transport-stream"}



on run
######ログ表示
doLogView()
###選択ダイアログのデフォルトパス
tell application "Finder"
set aliasDefaultLocation to (path to desktop folder from user domain) as alias
log aliasDefaultLocation as alias
end tell
###複数選択可能なダイアログを出す--> 戻り値はリストで格納されます
set listChooseFile to (choose file with prompt "ムービーファイルを選んでください" default location aliasDefaultLocation of type listUTI with invisibles and multiple selections allowed without showing package contents) as list
log listChooseFile as list
open listChooseFile
end run


on open listChooseFile

log "DDD" & listChooseFile
###listChooseFileに入ってるエリアス分だけ繰り返す
repeat with objFile in listChooseFile
############まずは、ファイルパス関連を取得
###UNIXパス
set strFilePath to POSIX path of objFile as text
####ファイルエイリアス
set aliasFilePath to objFile as alias
####ファイルのコンテナ(ファイルのあるディレクトリ)のエイリアス
tell application "Finder"
set aliasContainerDirPath to container of aliasFilePath as alias
end tell
###ファイルのあるコンテナのユニックスパス
set strContainerDirPath to POSIX path of aliasContainerDirPath as text

############ファイル名と拡張子
tell application "Finder"
####ファイルINFOを取得
set objInfo to info for objFile
####ファイル名
set strFileName to name of objInfo as text
####拡張子名
set strExtension to name extension of objInfo as text
end tell
#####ファイル名から拡張子を取り除く(UNIXBasename)
set AppleScript's text item delimiters to "."
set listFileName to every text item of strFileName
set AppleScript's text item delimiters to ""
set numCntDot to (count of listFileName) as number
set strShortFileName to (item 1 of listFileName) as text

############確認用にログ出します
log "###Input"
log "Alias: " & aliasFilePath as text
log "POSIX: " & strFilePath as text
log "alias Container" & aliasContainerDirPath as text
log "POSIX Container" & strContainerDirPath as text
log "FileName: " & strFileName as text
log "Extension: " & strExtension as text
log "ShortFileName: " & strShortFileName as text
####################
##NSURL
set ocidNSURL to (objNSURL's fileURLWithPath:strFilePath)
log className() of ocidNSURL as text

####AVURLAsset取得
set ocidAVURLAsset to (objMe's AVURLAsset's alloc()'s initWithURL:ocidNSURL options:(missing value))
log className() of ocidAVURLAsset as text

####AVURLAssetのビデオ部分を取得
set ocidVideoAssetTrack to (ocidAVURLAsset's tracksWithMediaType:(objMe's AVMediaTypeVideo))
log className() of ocidVideoAssetTrack as text

####取得したビデオトラック(Arrayで入るので)の最初のトラック
set ocidAsset to (ocidVideoAssetTrack's objectAtIndex:0)
log ocidAsset as list
log className() of ocidAsset as text

####サイズ
set ocidBounds to ocidAsset's naturalSize()
log ocidBounds as record
log class of ocidBounds as text

set numDimensionsW to width of ocidBounds as integer
set numDimensionsH to height of ocidBounds as integer
set strDimensionsW to numDimensionsW as text
set strDimensionsH to numDimensionsH as text

####フレームレートFPS
set ocidFrameRate to ocidAsset's nominalFrameRate()
log ocidFrameRate as real
log class of ocidFrameRate as text

####整数にしてテキスト化
##set strFPS to (ocidFrameRate as integer) as text
set strFPS to ocidFrameRate as text
log strFPS

###################小数点以下がある場合は2桁に整形
if strFPS contains "." then
####NSDecimalNumber
set ocidDecimalNumber to (objMe's NSDecimalNumber's decimalNumberWithString:strFPS)
log ocidDecimalNumber as text
log className() of ocidDecimalNumber as text

###NSNumberFormatterの初期化
set ocidNSNumberFormatter to objMe's NSNumberFormatter's alloc()'s init()
log ocidNSNumberFormatter
log className() of ocidNSNumberFormatter as text
###小数点以下2桁のフォーマット
(ocidNSNumberFormatter's setPositiveFormat:"##0.00")
####フォーマットを適応
set ocidDecimalNumber to (ocidNSNumberFormatter's stringFromNumber:ocidDecimalNumber)
log ocidDecimalNumber as text
log className() of ocidDecimalNumber as text
set strFPS to ocidDecimalNumber as text
end if
###################

#####変更後のファイル名
set strNewFileName to (strShortFileName & "." & strDimensionsW & "x" & strDimensionsH & "." & strFPS & "fps.mov") as text
#####変更後のファイルパス
set strNewFilePath to (strContainerDirPath & strNewFileName) as text
log "###OutPut"
log "AliasOutPutDir: " & aliasContainerDirPath
log "NewFileName: " & strNewFileName
log "NewFilePath: " & strNewFilePath

####################同名のファイルの有無を確認
#####NSFileManager定義
set objFileManager to objMe's NSFileManager's defaultManager()
#####保存先のdファイルパス
set ocidDistFilePath to (objNSString's stringWithString:strNewFilePath)
###ファイルパスに同名のファイルがあるか?
set boolFileExists to (objFileManager's fileExistsAtPath:ocidDistFilePath isDirectory:false)
log boolFileExists
###同名のファイルがある場合は1をつける
if boolFileExists is true then
#####変更後のファイル名
set strNewFileName to (strShortFileName & "." & strDimensionsW & "x" & strDimensionsH & "." & strFPS & "fps.1.mov") as text
#####変更後のファイルパス
set strNewFilePath to (strContainerDirPath & strNewFileName) as text
####リネーム後のファイルパスをNSString
set ocidDistFilePath to (objNSString's stringWithString:strNewFilePath)
end if



tell application "QuickTime Player"
####ファイルをオープンしてobjOpenDocに格納
set objOpenDoc to open file aliasFilePath
tell objOpenDoc
#####書き出し
##export the front document in (POSIX file strNewFilePath) using settings preset "1080p"
##export the front document in (POSIX file strNewFilePath) using settings preset "720p"
##export the front document in (POSIX file strNewFilePath) using settings preset "480p"
export objOpenDoc in (POSIX file strNewFilePath) using settings preset "4K"

##export the front document in (POSIX file strNewFilePath) using settings preset "Audio Only"
end tell
###ファイルを閉じる
close objOpenDoc
end tell

end repeat




end open




#########################ログ表示
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
tell application "Script Editor"
tell application "System Events"
tell process "Script Editor"
tell window 1
tell splitter group 1
tell splitter group 1
tell group 1
tell checkbox "返された値"
set boolValue to value as boolean
end tell
if boolValue is false then
click checkbox "返された値"
end if
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end if
end repeat

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

|

[QuickTime]"書き出しの進行状況"を開く

"書き出しの進行状況"

#!/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 objNSNotFound : a reference to 9.22337203685477E+18 + 5807

###おまじない
tell application "System Events"
launch
activate
end tell



tell application "QuickTime Player"
###書き出しWINDOWの有無
set numChkProgressWindow to 0 as number
###QuickTime Playerを前面に
activate
####開いているWINDOWをリストに
set listEveryWindow to every window
log listEveryWindow as list
###ウィンドウの数を数えて
set numCntWindow to count listEveryWindow
log numCntWindow as number
###本来ならこれでようたりるはずなんだけど
if numCntWindow = 0 then
activate
tell application "System Events"
tell process "QuickTime Player"
keystroke "p" using {option down, command down}
end tell
end tell
set numChkProgressWindow to 1 as number
end if
###ウィンドウが1以上なら
if numCntWindow1 then
repeat numCntWindow times
###ウィンドウの名前を取得して
set strWindowName to name of item numCntWindow of listEveryWindow
log strWindowName as text
if strWindowName is "書き出しの進行状況" then
tell (item numCntWindow of listEveryWindow)
set bounds to {0, 25, 520, 280}
activate
end tell
set numChkProgressWindow to 1 as number
end if
###"書き出しの進行状況"アリ
set numCntWindow to numCntWindow - 1 as number
end repeat
end if
###結果"書き出しの進行状況"が無い場合はあらためて
if numChkProgressWindow = 0 then
activate
tell application "System Events"
tell process "QuickTime Player"
keystroke "p" using {option down, command down}
end tell
end tell
set numChkProgressWindow to 1 as number
end if
end tell









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
#########################

|

[QuickTime]"書き出しの進行状況"を開く

"書き出しの進行状況"

#!/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 objNSNotFound : a reference to 9.22337203685477E+18 + 5807

###おまじない
tell application "System Events"
launch
activate
end tell



tell application "QuickTime Player"
###書き出しWINDOWの有無
set numChkProgressWindow to 0 as number
###QuickTime Playerを前面に
activate
####開いているWINDOWをリストに
set listEveryWindow to every window
log listEveryWindow as list
###ウィンドウの数を数えて
set numCntWindow to count listEveryWindow
log numCntWindow as number
###本来ならこれでようたりるはずなんだけど
if numCntWindow = 0 then
activate
tell application "System Events"
tell process "QuickTime Player"
keystroke "p" using {option down, command down}
end tell
end tell
set numChkProgressWindow to 1 as number
end if
###ウィンドウが1以上なら
if numCntWindow1 then
repeat numCntWindow times
###ウィンドウの名前を取得して
set strWindowName to name of item numCntWindow of listEveryWindow
log strWindowName as text
if strWindowName is "書き出しの進行状況" then
tell (item numCntWindow of listEveryWindow)
set bounds to {0, 25, 520, 280}
activate
end tell
set numChkProgressWindow to 1 as number
end if
###"書き出しの進行状況"アリ
set numCntWindow to numCntWindow - 1 as number
end repeat
end if
###結果"書き出しの進行状況"が無い場合はあらためて
if numChkProgressWindow = 0 then
activate
tell application "System Events"
tell process "QuickTime Player"
keystroke "p" using {option down, command down}
end tell
end tell
set numChkProgressWindow to 1 as number
end if
end tell









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
#########################

|

[QuickTime]書き出し

export the front document in aliasSavePath using settings preset "1080p"
export the front document in aliasSavePath using settings preset "720p"
export the front document in aliasSavePath using settings preset "480p"
export the front document in (POSIX file strNewFilePath) using settings preset "4K"
export the front document in aliasSavePath using settings preset "Audio Only"


#!/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 objNSMutableString : a reference to objMe's NSMutableString

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

###選択ダイアログのデフォルトパス
tell application "Finder"
set aliasDefaultLocation to (path to desktop folder from user domain) as alias
log aliasDefaultLocation as alias
end tell

####ファイルを選択してlistChooseFileに入れる
set listChooseFile to (choose file with prompt "TSファイルを選んでください" default location aliasDefaultLocation of type {"public.mpeg-2-transport-stream", "com.apple.quicktime-movie", "public.mpeg-4"} with invisibles and multiple selections allowed without showing package contents) as list
log listChooseFile as list


###listChooseFileに入ってるエリアス分だけ繰り返す
repeat with objFile in listChooseFile
###ユニックスパス
set strFilePath to POSIX path of objFile as text
log strFilePath as text
####ファイルエイリアス
set aliasFilePath to objFile as alias
log aliasFilePath as alias
####ファイルのコンテナ(ファイルのあるディレクトリ)のエイリアス
tell application "Finder"
set aliasContainDirPath to container of aliasFilePath as alias
log aliasContainDirPath as text
end tell
###ファイルのあるディレクトリのユニックスパス
set strContainDirPath to POSIX path of aliasContainDirPath as text
log strContainDirPath as text

tell application "Finder"
####ファイルINFOを取得
set objInfo to info for objFile
####ファイル名
set strFileName to name of objInfo as text
####拡張子名
set strExtension to name extension of objInfo as text
end tell
#####ファイル名から拡張子を取り除く
set AppleScript's text item delimiters to "."
set listFileName to every text item of strFileName
set AppleScript's text item delimiters to ""
set numCntDot to (count of listFileName) as number
set strShortFileName to (item 1 of listFileName) as text
log strShortFileName


log "###Input"
log "Alias: " & aliasFilePath
log "POSIX: " & strFilePath
log "FileName: " & strFileName
log "Extension: " & strExtension



tell application "QuickTime Player"
####ファイルをオープンしてobjOpenDocに格納
set objOpenDoc to open file aliasFilePath

tell window 1
set bounds to {0, 75, 520, 280}
properties
end tell
####縦横サイズを取得
tell objOpenDoc
###プロパティをリストにしてから
set listNaturalDimensions to natural dimensions as list
###値を取得する
set strDimensionsW to (item 1 of listNaturalDimensions) as text
set strDimensionsH to (item 2 of listNaturalDimensions) as text
end tell
#####書き出しファイル名
set strNewFileName to (strShortFileName & "_" & strDimensionsW & "x" & strDimensionsH & ".mov") as text
#####書き出しパス
set strNewFilePath to (strContainDirPath & strNewFileName) as text
log "###OutPut"
log "AliasOutPutDir: " & aliasContainDirPath
log "NewFileName: " & strNewFileName
log "NewFilePath: " & strNewFilePath
#####書き出し
##export the front document in aliasSavePath using settings preset "1080p"
##export the front document in aliasSavePath using settings preset "720p"
##export the front document in aliasSavePath using settings preset "480p"
export the front document in (POSIX file strNewFilePath) using settings preset "4K"

##export the front document in aliasSavePath using settings preset "Audio Only"

end tell

end repeat














#########################ログ表示
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 BookMark Acrobat Dialog Acrobat Distiller Acrobat Form Acrobat JS Acrobat Open Acrobat Plugin Acrobat Preflight Acrobat python Acrobat Reader Acrobat SCA Acrobat Sequ Acrobat Sign 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 Adobe RemoteUpdateManager Apple AppleScript AppleScript Accessibility AppleScript AppKit AppleScript Applications AppleScript AppStore AppleScript Archive AppleScript Attributes AppleScript Audio 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 Guide 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 Mail 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 NSFileManager enumeratorAtURL 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 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 Events Plist 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 savedSearch AppleScript XML SVG AppleScript XML TTML AppleScript XML webloc AppleScript XMP AppleScript YouTube AppleScript Zero Suppress Applications CityCode Design github 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