AppleScript Numbers

[Numbers]ナンバーズで祭日入りカレンダー

Screencapture-20230610-144702

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

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

####設定項目
##文字サイズ
set numFontSize to 14 as number
##フォント名はPS名?
set strFontName to "Osaka-Mono" as text


########################
#####ここから処理
####日付情報の取得--> 今の『年』の数値を求める
set ocidDate to refMe's NSDate's |date|()
set ocidCalendar to refMe's NSCalendar's autoupdatingCurrentCalendar()
set ocidCalendarUnitYear to refMe's NSCalendarUnitYear
set ocidCalendarUnitMonth to refMe's NSCalendarUnitMonth
set ocidDateComponents to ocidCalendar's components:((ocidCalendarUnitYear) + (ocidCalendarUnitMonth)) fromDate:ocidDate
set numSetYear to (ocidDateComponents's |year|) as integer
set numSetMonth to (ocidDateComponents's |month|) as integer
#####各種リスト
set listWeekDay to {"日", "月", "火", "水", "木", "金", "土"} as list
set listYear to {(numSetYear - 1), (numSetYear), (numSetYear + 1)} as list
set listMonth to {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} as list
########################
#####ダイアログを前面に
tell current application
  set strName to name as text
end tell
####スクリプトメニューから実行したら
if strName is "osascript" then
  tell application "Finder" to activate
else
  tell current application to activate
end if
#####年ダイアログを出す
try
  set objResponseYear to (choose from list listYear with title "年選択" with prompt "年を選択してください" default items (item 2 of listYear) OK button name "OK" cancel button name "キャンセル" with multiple selections allowed without empty selection allowed)
on error
  log "エラーしました"
return
end try
if objResponseYear is false then
return
end if
set numSetYear to (objResponseYear) as integer
########################
#####月ダイアログを出す
if numSetMonth = 12 then
  set numSetMonth to 1 as integer
else
  set numSetMonth to numSetMonth + 1 as integer
end if
try
  set objResponseMonth to (choose from list listMonth with title "月選択" with prompt "月を選択してください" default items (item (numSetMonth) of listMonth) OK button name "OK" cancel button name "キャンセル" with multiple selections allowed without empty selection allowed)
on error
  log "エラーしました"
return
end try
if objResponseMonth is false then
return
end if
set numSetMonth to (objResponseMonth) as integer
########################
tell application "Numbers" to launch
##ナンバーズ 表題部のみ処理
tell application "Numbers"
  make new document
  tell front document
    activate
    set strDociID to id as text
  end tell
  tell document id strDociID
    tell front sheet
      set name to "カレンダー"
      tell front table
set name to "" & numSetYear & "年" & numSetMonth & "月のカレンダー"
set rangeTable to cell range
tell rangeTable
set background color to {65535, 65535, 65535}
set text color to {0, 0, 0}
set vertical alignment to center
set format to text
set font size to numFontSize
set font name to strFontName
set alignment to center
end tell
tell cell "A1"
set value to "" & numSetYear & "/" & numSetMonth & "" as text
end tell
tell cell "B1"
set value to "曜日" as text
end tell
set row count to 35
      end tell
    end tell
  end tell
end tell

########################
#####カレンダー初期化
set ocidCalendar to refMe's NSCalendar's calendarWithIdentifier:(refMe's NSCalendarIdentifierGregorian)
set ocidLocale to refMe's NSLocale's alloc()'s initWithLocaleIdentifier:("ja_JP")
ocidCalendar's setLocale:(ocidLocale)
#####日付コンポーネント初期化
set ocidDateComponents to refMe's NSDateComponents's alloc()'s init()
ocidDateComponents's setYear:(numSetYear)
ocidDateComponents's setMonth:(numSetMonth)
set ocidDate to ocidCalendar's dateFromComponents:(ocidDateComponents)
###指定月のカレンダーの最大日数-->繰り返し回数になる
set ocidMonthDateRange to ocidCalendar's rangeOfUnit:(refMe's NSCalendarUnitDay) inUnit:(refMe's NSCalendarUnitMonth) forDate:(ocidDate)
set numDateLength to ocidMonthDateRange's |length|


########################
###祭日データJSONで取得
set strURL to "https://holidays-jp.github.io/api/v1/date.json" as text
set ocidJsonURL to refMe's NSURL's URLWithString:(strURL)
set ocidOption to refMe's NSDataReadingMappedIfSafe
set listDownLoadData to refMe's NSData's dataWithContentsOfURL:(ocidJsonURL) options:(ocidOption) |error|:(reference)
set ocidJsonData to (item 1 of listDownLoadData)
#####################
###JSON初期化 してレコードに格納
set listJSONSerialization to (refMe's NSJSONSerialization's JSONObjectWithData:(ocidJsonData) options:0 |error|:(reference))
set ocidJsonData to item 1 of listJSONSerialization
set ocidHolidayDict to refMe's NSDictionary's alloc()'s initWithDictionary:(ocidJsonData)

#####################
###取得するカレンダーの月(処理としては不要なんだけど、今後の展開のために処理)
set numYear to ocidCalendar's component:(refMe's NSCalendarUnitYear) fromDate:(ocidDate)
set numMonth to ocidCalendar's component:(refMe's NSCalendarUnitMonth) fromDate:(ocidDate)
###年はそのまま
set strYear to numYear as text
###月はゼロサプレス
set strMonth to (text -2 through -1 of ("00" & (numMonth as text))) as text
###日付毎処理
set numCntRows to 2

repeat with numDayNo from (1) to (numDateLength)
  -->ここまでは年と月でのカレンダーなので
  ###日付を入れて
(ocidDateComponents's setDay:(numDayNo))
  set ocidDate to (ocidCalendar's dateFromComponents:(ocidDateComponents))
  set ocidWeekDayClender to (ocidCalendar's components:(refMe's NSWeekdayCalendarUnit) fromDate:(ocidDate))
  ###日付
  log ocidDate as date
  ###日付番号
  log numDayNo
  set strDayNoZeroSupp to (text -2 through -1 of ("00" & numDayNo)) as text
  #####################
  ###曜日処理
  set numWeekDayNo to (ocidWeekDayClender's |weekday|)'s intValue()
  ###曜日番号
  log numWeekDayNo
  ###曜日テキスト
  set strWeekDayJp to (item numWeekDayNo of listWeekDay) as text
  ###祭日取得用
  set strDateText to ("" & strYear & "-" & strMonth & "-" & strDayNoZeroSupp & "") as text
  ###祭日取得
  set ocidHolidayValue to (ocidHolidayDict's valueForKey:(strDateText))
  ###祭日処理
  if ocidHolidayValue is (missing value) then
    set numChkHoliday to 0 as integer
  else
    set numChkHoliday to 1 as integer
    set strHolidayValue to ocidHolidayValue as text
    log strHolidayValue
    ####Cの列
    tell application "Numbers"
      tell document id strDociID
tell front sheet
tell front table
tell cell ("C" & numCntRows & "")
###Cの列に祭日名を入力
set value to (strHolidayValue) as text
end tell
end tell
end tell
      end tell
    end tell
  end if
  
  tell application "Numbers"
    tell document id strDociID
      tell front sheet
set name to "カレンダー"
tell front table
tell cell ("A" & numCntRows & "")
###日付を入れて
set value to "" & strDayNoZeroSupp & "" as text
end tell
tell cell ("B" & numCntRows & "")
###曜日を入れる
set value to strWeekDayJp as text
end tell
if strWeekDayJp is "日" then
tell row numCntRows
###日曜日の色
set background color to {64945, 37783, 61881}
set text color to {38078, 202, 22456}
end tell
else if strWeekDayJp is "土" then
###土曜日の色
tell row numCntRows
set background color to {41120, 61174, 59832}
set text color to {5140, 16191, 37008}
end tell
else
tell row numCntRows
###平日の色
set background color to {65535, 65535, 65535}
set text color to {0, 0, 0}
end tell
end if
if numChkHoliday = 1 then
tell row numCntRows
###祭日の色
set background color to {64945, 37783, 61881}
set text color to {38078, 202, 22456}
end tell
end if
end tell
      end tell
    end tell
  end tell
  
  
  set numCntRows to numCntRows + 1
end repeat

|

[Numbers]タブ区切りテキストで保存する

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

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


####起動させる
tell application "Numbers"
launch
activate
end tell
####起動を待つ
repeat
tell application "Numbers"
activate
set boolActivate to frontmost
end tell
if boolActivate is false then
delay 1
else
exit repeat
end if
end repeat

tell application "Numbers"
set numCntWindow to (count of every window) as integer
end tell
if numCntWindow = 0 then
return "ファイルがありません"
end if

tell application "Numbers"
tell front window
set strFileName to name as text
end tell
tell front document
tell active sheet
set strSheetName to name as text
tell first table
set strTableName to name as text
set rangeTable to cell range
set selection range to rangeTable
set listValue to value of cells of rows
end tell
end tell
end tell
end tell

set ocidValueArray to refNSArray's alloc()'s initWithArray:listValue
set ocidTSVstrings to refNSMutableString's alloc()'s initWithCapacity:0

repeat with itemValueArray in ocidValueArray
####行の最後にタブを入れない用
set numCntArrayItem to count of itemValueArray
repeat with itemLineValueArray in itemValueArray
log itemLineValueArray
set ocidTSVstrings to (ocidTSVstrings's stringByAppendingString:itemLineValueArray)
####最後のアイテムは処理しなし
if numCntArrayItem > 1 then
####区切り文字の挿入
set ocidTSVstrings to (ocidTSVstrings's stringByAppendingString:"\t")
end if
####カウントダウン
set numCntArrayItem to numCntArrayItem - 1 as integer
end repeat
###行毎改行
set ocidTSVstrings to (ocidTSVstrings's stringByAppendingString:"\n")
end repeat


###################################
#####ダイアログ
###################################a
###ダイアログのデフォルト
set ocidUserDesktopPath to (objFileManager's URLsForDirectory:(refMe's NSDesktopDirectory) inDomains:(refMe's NSUserDomainMask))
set aliasDefaultLocation to ocidUserDesktopPath as alias
set strPromptText to "名前を決めてください"
set strDefaultName to (strFileName & "." & strSheetName & "." & strTableName & ".tsv")
tell current application to activate
####実在しない『はず』なのでas «class furl»
set aliasSaveFilePath to (choose file name default location aliasDefaultLocation default name strDefaultName with prompt strPromptText) as «class furl»
####UNIXパス
set strSaveFilePath to POSIX path of aliasSaveFilePath as text
####ドキュメントのパスをNSString
set ocidSaveFilePath to refNSString's stringWithString:strSaveFilePath
####ドキュメントのパスをNSURL
set ocidSaveFilePathURL to refNSURL's fileURLWithPath:ocidSaveFilePath
###拡張子取得
set strFileExtensionName to ocidSaveFilePathURL's pathExtension() as text
###ダイアログで拡張子を取っちゃった時対策
if strFileExtensionName is not "tsv" then
set ocidSaveFilePathURL to ocidSaveFilePathURL's URLByAppendingPathExtension:"tsv"
set ocidSaveFilePath to ocidSaveFilePathURL's |path|()
end if

#####属性を指定しておく
set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
set strUID to user ID of (system info) as text
###所有者ID
ocidAttrDict's setValue:strUID forKey:(refMe's NSFileOwnerAccountID)
###グループID
ocidAttrDict's setValue:80 forKey:(refMe's NSFileGroupOwnerAccountID)
####パーミッション 700
ocidAttrDict's setValue:448 forKey:(refMe's NSFilePosixPermissions)

###ファイル作成時のダミーテキスト
set ocidTempText to refNSString's stringWithString:""
###ファイルを作る
set boolMakeNewFile to (objFileManager's createFileAtPath:ocidSaveFilePath |contents|:ocidTempText attributes:ocidAttrDict)
####内容を書き込む UTF8で書き込む
set boolFileWrite to (ocidTSVstrings's writeToFile:ocidSaveFilePath atomically:false encoding:(refMe's NSUTF8StringEncoding) |error|:(reference))

return

|

[Numbers]セルの値を順番に取得する

#!/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 scripting additions

####この名前のシートを処理したい
set strTargetSheetName to "listURL" as text

####この表の内容で処理したい
set strTargerTableName to "QRコード作成用リスト" as text


set aliasPath2Me to (path to me) as alias

tell application "Finder"
set aliasContainerDirPath to container of aliasPath2Me as alias
set aliasFilePath to document file "input.numbers" of folder "Documents" of aliasContainerDirPath as alias
end tell

#############################################
#########アプリケーションの起動
#############################################
####起動させる
tell application "Numbers"
launch
activate
end tell
####起動を待つ
repeat
tell application "Numbers"
activate
set boolActivate to frontmost
end tell
if boolActivate is false then
delay 1
else
exit repeat
end if
end repeat
#############################################
#########ファイルを開く
#############################################

tell application "Numbers"
open aliasFilePath
end tell



#############################################
#########開いているドキュメントの中から選ぶ
#############################################
tell application "Numbers"
###Windowの数を数えます
set numCntOpenWindow to (count of every window) as integer
###ファイル名格納用のリストの初期化
set recordFileName to {} as record
set listFileName to {} as list
###カウントアップ用の値の初期化
set numCntWindowNo to 1 as integer
###ウィンドの数だけ繰り返し
repeat numCntOpenWindow times
####WindowIDからファイル名を取得
set strFileName to name of window numCntWindowNo as text
####WindowIDからファイル名を取得
set strWindowID to id of window numCntWindowNo as text
####リストに格納
if strFileName is not "" then
###
set recordTemp to (run script "return {|" & strFileName & "|:\"" & strWindowID & "\"}")
set recordFileName to recordFileName & recordTemp as record
copy strFileName to end of listFileName
end if
####カウントアップ
set numCntWindowNo to numCntWindowNo + 1 as integer
end repeat
end tell
#############################################
#########ファイル選択
#############################################
tell current application to activate
try
set objResponse to (choose from list listFileName with title "どの書類で処理しますか" with prompt "選んでください" default items (item 1 of listFileName) 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
return
else
set strResponse to objResponse as text
end if

#############################################
#########開いているドキュメントの中から選ぶ
#############################################

tell application "Numbers"
set numCntOpenWindow to (count of every window) as integer

###カウントアップ用の値の初期化
set numCntWindowNo to 1 as integer
###ウィンドの数だけ繰り返し
repeat numCntOpenWindow times
###順番にファイル名取得
set strWindowName to name of window numCntWindowNo
if strWindowName is strResponse then
####window
tell window numCntWindowNo
properties
end tell
#####document
tell document numCntWindowNo
set numCntSheet to (count of every sheet) as integer
set numCntSheetNo to 1 as integer
repeat numCntSheet times
####sheet
tell sheet numCntSheetNo
properties
set strSheetName to name as text
if strSheetName is strTargetSheetName then
log "このシートが処理対象"
set numCntTable to (count of every table) as integer
set numCntTableNo to 1 as integer
repeat numCntTable times
tell table numCntTableNo
set strTableName to name as text
if strTableName is strTargerTableName then
properties
log "この表が処理対象"
set numCntRowNo to row count as integer
set numCntRow to 2 as integer
repeat (numCntRowNo - 1) times
####Bセルの値
set strCellNo to "B" & numCntRow
tell cell strCellNo
set strBvalue to value as text
end tell
###Cセルの値
set strCellNo to "C" & numCntRow
tell cell strCellNo
set strCvalue to value as text
end tell


set numCntRow to numCntRow + 1 as integer
end repeat
else
log "処理しない"
end if
end tell
set numCntTableNo to numCntTableNo + 1 as integer
end repeat

set numCntLine to 1 as integer
else
log "処理しない"
end if
end tell
set numCntSheetNo to numCntSheetNo + 1 as integer
end repeat
end tell
end if
####カウントアップ
set numCntWindowNo to numCntWindowNo + 1 as integer
end repeat
end tell



return

|

[Numbers]Window Document Sheetまで(途中)

#!/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 scripting additions

####この名前のシートを処理したい
set strTargetSheetName to "listURL" as text


#############################################
#########開いているドキュメントの中から選ぶ
#############################################
tell application "Numbers"
###Windowの数を数えます
set numCntOpenWindow to (count of every window) as integer
###ファイル名格納用のリストの初期化
set recordFileName to {} as record
set listFileName to {} as list
###カウントアップ用の値の初期化
set numCntWindowNo to 1 as integer
###ウィンドの数だけ繰り返し
repeat numCntOpenWindow times
####WindowIDからファイル名を取得
set strFileName to name of window numCntWindowNo as text
####WindowIDからファイル名を取得
set strWindowID to id of window numCntWindowNo as text
####リストに格納
if strFileName is not "" then
###
set recordTemp to (run script "return {|" & strFileName & "|:\"" & strWindowID & "\"}")
set recordFileName to recordFileName & recordTemp as record
copy strFileName to end of listFileName
end if
####カウントアップ
set numCntWindowNo to numCntWindowNo + 1 as integer
end repeat
end tell
#############################################
#########ファイル選択
#############################################
try
set objResponse to (choose from list listFileName with title "どの書類で処理しますか" with prompt "選んでください" default items (item 1 of listFileName) 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
return
else
set strResponse to objResponse as text
end if

#############################################
#########開いているドキュメントの中から選ぶ
#############################################

tell application "Numbers"
set numCntOpenWindow to (count of every window) as integer

###カウントアップ用の値の初期化
set numCntWindowNo to 1 as integer
###ウィンドの数だけ繰り返し
repeat numCntOpenWindow times
###順番にファイル名取得
set strWindowName to name of window numCntWindowNo
if strWindowName is strResponse then
####window
tell window numCntWindowNo
properties
end tell
#####document
tell document numCntWindowNo
properties
set numCntSheet to (count of every sheet) as integer
set numCntSheetNo to 1 as integer
repeat numCntSheet times
####sheet
tell sheet numCntSheetNo
properties
set strSheetName to name as text
if strSheetName is strTargetSheetName then

log "このシートが処理対象"
else
log "処理しない"
end if
end tell
set numCntSheetNo to numCntSheetNo + 1 as integer
end repeat
end tell
end if
####カウントアップ
set numCntWindowNo to numCntWindowNo + 1 as integer
end repeat
end tell



return

|

その他のカテゴリー

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