Menu

Skip to content
AppleScriptの穴
  • Home
  • Products
  • Books
  • Docs
  • Events
  • Forum
  • About This Blog
  • License
  • 仕事依頼

AppleScriptの穴

Useful & Practical AppleScript archive. Click '★Click Here to Open This Script' Link to download each AppleScript

カテゴリー: file

CoreImageで指定画像をBoxBlur v2

Posted on 2月 9, 2018 by Takaaki Naganoya


▲Original


▲Filtered Image

AppleScript名:CoreImageで指定画像をBoxBlur v2
— Created 2017-03-21 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "QuartzCore"

property CIFilter : a reference to current application’s CIFilter
property |NSURL| : a reference to current application’s |NSURL|
property NSUUID : a reference to current application’s NSUUID
property CIImage : a reference to current application’s CIImage
property NSString : a reference to current application’s NSString
property NSImage : a reference to current application’s NSImage
property NSProcessInfo : a reference to current application’s NSProcessInfo
property NSPNGFileType : a reference to current application’s NSPNGFileType
property NSBitmapImageRep : a reference to current application’s NSBitmapImageRep

–画像を選択
set aPath to POSIX path of (choose file of type {"public.image"})
set aNSImage to NSImage’s alloc()’s initWithContentsOfFile:aPath

set paramRec to {inputRadius:10} –5から10
set imgRes to execCIFilterWithNSImageAndParams(aNSImage, "CIBoxBlur", paramRec) of me

set savePath to retUUIDfilePath(aPath, "png") of me
set fRes to saveNSImageAtPathAsPNG(imgRes, savePath) of me

–NSImageをCIImageに変換してCIfilterを実行
on execCIFilterWithNSImageAndParams(aNSImage, aFilterName as string, paramRec as record)
  set aDict to current application’s NSDictionary’s dictionaryWithDictionary:paramRec
  
  
set aCIImage to convNSImageToCIimage(aNSImage) of me
  
set aFilter to current application’s CIFilter’s filterWithName:aFilterName
  
  
aFilter’s setDefaults()
  
aFilter’s setValue:aCIImage forKey:"inputImage"
  
set aOutImage to aFilter’s valueForKey:"outputImage"
  
  
set keyList to aDict’s allKeys() as list
  
repeat with i in keyList
    set aVal to (aDict’s valueForKey:i) as list of string or string –as anything
    (
aFilter’s setValue:aVal forKey:(i as string))
  end repeat
  
  
set newNSImage to convCIimageToNSImage(aOutImage) of me
  
return newNSImage
end execCIFilterWithNSImageAndParams

on convCIimageToNSImage(aCIImage)
  set aRep to NSBitmapImageRep’s alloc()’s initWithCIImage:aCIImage
  
set tmpSize to aRep’s |size|()
  
set newImg to NSImage’s alloc()’s initWithSize:tmpSize
  
newImg’s addRepresentation:aRep
  
return newImg
end convCIimageToNSImage

on convNSImageToCIimage(aNSImage)
  set tiffDat to aNSImage’s TIFFRepresentation()
  
set aRep to NSBitmapImageRep’s imageRepWithData:tiffDat
  
set newImg to CIImage’s alloc()’s initWithBitmapImageRep:aRep
  
return newImg
end convNSImageToCIimage

on retUUIDfilePath(aPath, aEXT)
  set aUUIDstr to (NSUUID’s UUID()’s UUIDString()) as string
  
set aPath to ((NSString’s stringWithString:aPath)’s stringByDeletingLastPathComponent()’s stringByAppendingPathComponent:aUUIDstr)’s stringByAppendingPathExtension:aEXT
  
return aPath
end retUUIDfilePath

–NSImageを指定パスにPNG形式で保存
on saveNSImageAtPathAsPNG(anImage, outPath)
  set imageRep to anImage’s TIFFRepresentation()
  
set aRawimg to NSBitmapImageRep’s imageRepWithData:imageRep
  
set pathString to NSString’s stringWithString:outPath
  
set newPath to pathString’s stringByExpandingTildeInPath()
  
set myNewImageData to (aRawimg’s representationUsingType:(NSPNGFileType) |properties|:(missing value))
  
set aRes to (myNewImageData’s writeToFile:newPath atomically:true) as boolean
  
return aRes –true/false
end saveNSImageAtPathAsPNG

★Click Here to Open This Script 

Posted in file filter Image | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

CoreImageで指定画像を2階調ポスタライズ v2

Posted on 2月 9, 2018 by Takaaki Naganoya


▲Original


▲2-level postalized image

AppleScript名:CoreImageで指定画像を2階調ポスタライズ v2
— Created 2014-12-09 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "QuartzCore"

property |NSURL| : a reference to current application’s |NSURL|
property NSUUID : a reference to current application’s NSUUID
property NSString : a reference to current application’s NSString
property NSImage : a reference to current application’s NSImage
property NSPNGFileType : a reference to current application’s NSPNGFileType
property NSBitmapImageRep : a reference to current application’s NSBitmapImageRep

–CIFilters (Not everything!!) From Apple’s Core Image Filter Reference
set cifilterName to "CIColorPosterize"

–画像を選択
set aPath to POSIX path of (choose file of type {"public.image"})

–指定フィルタ名でフィルタしたNSImageを取得
set nsimageRes to filterAnImageFile(aPath, cifilterName) of me

–Save as PNG
set fRes to retUUIDfilePath(aPath, "png") of me
set sRes to saveNSImageAtPathAsPNG(nsimageRes, fRes) of me

–CIFilterをかけたJPEG画像を生成
–参照:http://ashplanning.blogspot.jp/ のうちのどこか
on filterAnImageFile(aPath, aFilterName)
  –CIImageを生成
  
set aURL to current application’s |NSURL|’s fileURLWithPath:aPath –Input
  
set aCIImage to current application’s CIImage’s alloc()’s initWithContentsOfURL:aURL
  
  
— CIFilter をフィルタの名前で生成
  
set aFilter to current application’s CIFilter’s filterWithName:aFilterName
  
aFilter’s setDefaults() –各フィルタのパラメータはデフォルト
  
  
–Filterを実行
  
aFilter’s setValue:aCIImage forKey:"inputImage"
  
aFilter’s setValue:2 forKey:"inputLevels"
  
  
set aOutImage to aFilter’s valueForKey:"outputImage"
  
set outNSImage to convCIimageToNSImage(aOutImage) of me
  
return outNSImage
end filterAnImageFile

on convCIimageToNSImage(aCIImage)
  set aRep to current application’s NSBitmapImageRep’s alloc()’s initWithCIImage:aCIImage
  
set tmpSize to aRep’s |size|()
  
set newImg to current application’s NSImage’s alloc()’s initWithSize:tmpSize
  
newImg’s addRepresentation:aRep
  
return newImg
end convCIimageToNSImage

on convNSImageToCIimage(aNSImage)
  set tiffDat to aNSImage’s TIFFRepresentation()
  
set aRep to current application’s NSBitmapImageRep’s imageRepWithData:tiffDat
  
set newImg to current application’s CIImage’s alloc()’s initWithBitmapImageRep:aRep
  
return newImg
end convNSImageToCIimage

on retUUIDfilePath(aPath, aEXT)
  set aUUIDstr to (NSUUID’s UUID()’s UUIDString()) as string
  
set aPath to ((NSString’s stringWithString:aPath)’s stringByDeletingLastPathComponent()’s stringByAppendingPathComponent:aUUIDstr)’s stringByAppendingPathExtension:aEXT
  
return aPath
end retUUIDfilePath

–NSImageを指定パスにPNG形式で保存
on saveNSImageAtPathAsPNG(anImage, outPath)
  set imageRep to anImage’s TIFFRepresentation()
  
set aRawimg to NSBitmapImageRep’s imageRepWithData:imageRep
  
set pathString to NSString’s stringWithString:outPath
  
set newPath to pathString’s stringByExpandingTildeInPath()
  
set myNewImageData to (aRawimg’s representationUsingType:(NSPNGFileType) |properties|:(missing value))
  
set aRes to (myNewImageData’s writeToFile:newPath atomically:true) as boolean
  
return aRes –true/false
end saveNSImageAtPathAsPNG

★Click Here to Open This Script 

Posted in file filter Image | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

指定画像をBMP形式で保存

Posted on 2月 9, 2018 by Takaaki Naganoya
AppleScript名:指定画像をBMP形式で保存
— Created 2017-02-05 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"

set aFile to POSIX path of (choose file of type {"public.image"} with prompt "Select Image A")
set aImage to current application’s NSImage’s alloc()’s initWithContentsOfFile:aFile

set fRes to retUUIDfilePath(aFile, "bmp") of me
set sRes to saveNSImageAtPathAsBMP(imgRes, fRes) of me

on retUUIDfilePath(aPath, aEXT)
  set aUUIDstr to (current application’s NSUUID’s UUID()’s UUIDString()) as string
  
set aPath to ((current application’s NSString’s stringWithString:aPath)’s stringByDeletingLastPathComponent()’s stringByAppendingPathComponent:aUUIDstr)’s stringByAppendingPathExtension:aEXT
  
return aPath
end retUUIDfilePath

–NSImageを指定パスにBMP形式で保存
on saveNSImageAtPathAsBMP(anImage, outPath)
  set imageRep to anImage’s TIFFRepresentation()
  
set aRawimg to current application’s NSBitmapImageRep’s imageRepWithData:imageRep
  
set pathString to current application’s NSString’s stringWithString:outPath
  
set newPath to pathString’s stringByExpandingTildeInPath()
  
set myNewImageData to (aRawimg’s representationUsingType:(current application’s NSBMPFileType) |properties|:(missing value))
  
set aRes to (myNewImageData’s writeToFile:newPath atomically:true) as boolean
  
return aRes –true/false
end saveNSImageAtPathAsBMP

★Click Here to Open This Script 

Posted in file Image | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

指定画像をPNG形式で保存

Posted on 2月 9, 2018 by Takaaki Naganoya
AppleScript名:指定画像をPNG形式で保存
— Created 2017-02-05 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"

set aFile to POSIX path of (choose file of type {"public.image"} with prompt "Select Image A")
set aImage to current application’s NSImage’s alloc()’s initWithContentsOfFile:aFile

set fRes to retUUIDfilePath(aFile, "png") of me
set sRes to saveNSImageAtPathAsPNG(imgRes, fRes) of me

on retUUIDfilePath(aPath, aEXT)
  set aUUIDstr to (current application’s NSUUID’s UUID()’s UUIDString()) as string
  
set aPath to ((current application’s NSString’s stringWithString:aPath)’s stringByDeletingLastPathComponent()’s stringByAppendingPathComponent:aUUIDstr)’s stringByAppendingPathExtension:aEXT
  
return aPath
end retUUIDfilePath

–NSImageを指定パスにPNG形式で保存
on saveNSImageAtPathAsPNG(anImage, outPath)
  set imageRep to anImage’s TIFFRepresentation()
  
set aRawimg to current application’s NSBitmapImageRep’s imageRepWithData:imageRep
  
set pathString to current application’s NSString’s stringWithString:outPath
  
set newPath to pathString’s stringByExpandingTildeInPath()
  
set myNewImageData to (aRawimg’s representationUsingType:(current application’s NSPNGFileType) |properties|:(missing value))
  
set aRes to (myNewImageData’s writeToFile:newPath atomically:true) as boolean
  
return aRes –true/false
end saveNSImageAtPathAsPNG

★Click Here to Open This Script 

Posted in file Image | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

指定画像をJPG形式で保存

Posted on 2月 9, 2018 by Takaaki Naganoya

指定の画像をJPEG形式+指定圧縮率で保存するAppleScriptです。

現在は、これをさらに発展させて指定ファイルサイズになるまで圧縮率を順次変更して動的に圧縮率を変更して保存する、という処理に発展し、これは日常的に(SNSなどでアップロード可能なファイルサイズに制限があるサイトに画像掲載を行うさいに)利用しています。

AppleScript名:指定画像をJPG形式で保存
— Created 2017-02-05 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"

set aFile to POSIX path of (choose file of type {"public.image"} with prompt "Select Image A")
set aImage to current application’s NSImage’s alloc()’s initWithContentsOfFile:aFile

set fRes to retUUIDfilePath(aFile, "jpg") of me
set sRes to saveNSImageAtPathAsJPG(aImage, fRes, 1.0) of me

on retUUIDfilePath(aPath, aEXT)
  set aUUIDstr to (current application’s NSUUID’s UUID()’s UUIDString()) as string
  
set aPath to ((current application’s NSString’s stringWithString:aPath)’s stringByDeletingLastPathComponent()’s stringByAppendingPathComponent:aUUIDstr)’s stringByAppendingPathExtension:aEXT
  
return aPath
end retUUIDfilePath

–NSImageを指定パスにJPEG形式で保存、qulityNumは0.0〜1.0。1.0は無圧縮
on saveNSImageAtPathAsJPG(anImage, outPath, qulityNum as real)
  set imageRep to anImage’s TIFFRepresentation()
  
set aRawimg to current application’s NSBitmapImageRep’s imageRepWithData:imageRep
  
set pathString to current application’s NSString’s stringWithString:outPath
  
set newPath to pathString’s stringByExpandingTildeInPath()
  
set myNewImageData to (aRawimg’s representationUsingType:(current application’s NSJPEGFileType) |properties|:{NSImageCompressionFactor:qulityNum})
  
set aRes to (myNewImageData’s writeToFile:newPath atomically:true) as boolean
  
return aRes –true/false
end saveNSImageAtPathAsJPG

★Click Here to Open This Script 

Posted in file Image | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

指定画像をTIFF形式で保存

Posted on 2月 9, 2018 by Takaaki Naganoya
AppleScript名:指定画像をTIFF形式で保存
— Created 2017-02-05 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"

set aFile to POSIX path of (choose file of type {"public.image"} with prompt "Select Image A")
set aImage to current application’s NSImage’s alloc()’s initWithContentsOfFile:aFile

set fRes to retUUIDfilePath(aFile, "tif") of me
set sRes to saveNSImageAtPathAsTIFF(imgRes, fRes) of me

on retUUIDfilePath(aPath, aEXT)
  set aUUIDstr to (current application’s NSUUID’s UUID()’s UUIDString()) as string
  
set aPath to ((current application’s NSString’s stringWithString:aPath)’s stringByDeletingLastPathComponent()’s stringByAppendingPathComponent:aUUIDstr)’s stringByAppendingPathExtension:aEXT
  
return aPath
end retUUIDfilePath

–NSImageを指定パスにTIFF形式で保存
on saveNSImageAtPathAsTIFF(anImage, outPath)
  set imageRep to anImage’s TIFFRepresentation()
  
set aRawimg to current application’s NSBitmapImageRep’s imageRepWithData:imageRep
  
set pathString to current application’s NSString’s stringWithString:outPath
  
set newPath to pathString’s stringByExpandingTildeInPath()
  
set myNewImageData to (aRawimg’s representationUsingType:(current application’s NSTIFFFileType) |properties|:(missing value))
  
set aRes to (myNewImageData’s writeToFile:newPath atomically:true) as boolean
  
return aRes –true/false
end saveNSImageAtPathAsTIFF

★Click Here to Open This Script 

Posted in file Image | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

画像にステガノグラフィーで埋め込まれた文字列を取り出す

Posted on 2月 9, 2018 by Takaaki Naganoya

オープンソースのステガノグラフィーのプログラム「ISStego」(By Isaac Stevao Sena氏)を用いて、JPEG画像に埋め込んだ文字情報を取り出すAppleScriptです。

ISStegoは普通にObjective-Cで書かれたGUIベースのアプリケーションだったので、そのままではAppleScriptから呼び出せませんでした。

そこで、中身をそのままそっくり移し替えた新規フレームワーク「stegLib.framework」をでっちあげてビルドし、AppleScriptから呼び出してみました。

JPEG画像にUTF-8の文字情報(日本語文字列)を埋め込んで別のPNG画像に書き出し、書き出した画像からUTF-8の文字情報を取り出す実験を行ってみました。エンコードもデコードもうまく行っているようなので、うまく処理できていると思います。

ステガノグラフィーについて初めて聞いたのは20年ぐらい前のことと記憶していますが、こんなに手軽に使えるようになっていたとは驚きです。


▲Original Image


▲Information Embedded Image

–> stegLib.framework

AppleScript名:画像にステガノグラフィーで埋め込まれた文字列を取り出す
— Created 2015-10-21 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"
use framework "stegLib" –https://github.com/isena/ISStego

set aFile to POSIX path of (choose file of type {"public.png"})
set aFilePath to current application’s NSString’s stringWithString:aFile
set aURL to current application’s |NSURL|’s fileURLWithPath:aFilePath
set aImage to current application’s NSImage’s alloc()’s initWithContentsOfURL:aURL

set aDecodedData to current application’s ISStegoDecoder’s alloc()’s init()’s decodeStegoImage:aImage |error|:(missing value)
set resStr to (current application’s NSString’s alloc()’s initWithData:aDecodedData encoding:(current application’s NSUTF8StringEncoding)) as string
–> "長野谷隆昌/ぴよまるソフトウェア/Piyomaru Software"

★Click Here to Open This Script 

Posted in file Image Text | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

画像にステガノグラフィーで情報を埋め込む

Posted on 2月 9, 2018 by Takaaki Naganoya

オープンソースのステガノグラフィー(steganography)のプログラム「ISStego」(By Isaac Stevao Sena氏)を用いて、JPEG画像に文字情報を埋め込むAppleScriptです。

ISStegoは普通にObjective-Cで書かれたGUIベースのアプリケーションだったので、そのままではAppleScriptから呼び出せませんでした。

そこで、中身をそのままそっくり移し替えた新規フレームワーク「stegLib.framework」をでっちあげてビルドし、AppleScriptから呼び出してみました。

JPEG画像にUTF-8の文字情報(日本語文字列)を埋め込んで別のPNG画像に書き出し、書き出した画像からUTF-8の文字情報を取り出す実験を行ってみました。エンコードもデコードもうまく行っているようなので、うまく処理できていると思います。

ステガノグラフィー(steganography)について初めて聞いたのは20年ぐらい前のことと記憶していますが、こんなに手軽に使えるようになっていたとは驚きです。

Twitterにプログラムを投稿するのに、(140文字制限を回避するため)文字を画像化して投稿しているのを見て、「そこまでやるなら、画像にプログラムの文字データを埋め込めばいいのに」と思い、「ステガノグラフィーで埋め込めばいいんじゃないか?」ということで、埋め込めるようになったのですが、肝心のTwitterクライアントから画像をダウンロードする手段がなかったのがダメダメでした(Webブラウザ経由ならOKです)。


▲Original Image


▲Information Embedded Image

–> stegLib.framework

AppleScript名:画像にステガノグラフィーで情報を埋め込む
— Created 2015-10-21 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"
use framework "stegLib" –https://github.com/isena/ISStego

set aFile to POSIX path of (choose file of type {"public.jpeg"})
set encString to "長野谷隆昌/ぴよまるソフトウェア/Piyomaru Software"

set aFilePath to current application’s NSString’s stringWithString:aFile
set aExt to "png"

set newPath to aFilePath’s stringByDeletingPathExtension()
set newPath2 to newPath’s stringByAppendingString:"_stego"
set newPath3 to newPath2’s stringByAppendingPathExtension:aExt

set aURL to current application’s |NSURL|’s fileURLWithPath:aFilePath
set aImage to current application’s NSImage’s alloc()’s initWithContentsOfURL:aURL
set strData to current application’s NSString’s stringWithString:encString

set aEncimage to current application’s ISStegoEncoder’s alloc()’s init()’s stegoImageForImage:aImage |data|:strData |error|:(missing value)
my saveImageRepAtPathAsPNG(aEncimage, newPath3)

–画像を指定パスにPNG形式で保存
on saveImageRepAtPathAsPNG(anImage, outPath)
  set imageRep to anImage’s TIFFRepresentation()
  
set aRawimg to current application’s NSBitmapImageRep’s imageRepWithData:imageRep
  
  
set pathString to current application’s NSString’s stringWithString:outPath
  
set newPath to pathString’s stringByExpandingTildeInPath()
  
  
set myNewImageData to (aRawimg’s representationUsingType:(current application’s NSPNGFileType) |properties|:(missing value))
  
return (myNewImageData’s writeToFile:newPath atomically:true) as boolean
end saveImageRepAtPathAsPNG

★Click Here to Open This Script 

Posted in file Image Text | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

拡張子でUTIを指定しつつchoose file of type

Posted on 2月 8, 2018 by Takaaki Naganoya

choose fileコマンドを拡張して、選択対象をUTIではなくファイル拡張子で指定できるようにしたAppleScriptです。

もともと、Classic Mac OSの時代からファイルのタイプを指し示す識別子としてFile Type(”PICT”とか”MooV”とか)が存在していましたが、OS X 10.6あたりで廃止になり、ウヤムヤのまま部分的に延命してきたものの、macOS 10.13でファイルシステムにAPFSを採用(File Typeなどの情報がFile System上に存在しない)したことにより、完全に使用不能になりました。

ファイルの区別に利用してきた情報としては、File type以外にも、

 拡張子(複数の書き方をすることがある。.jpgとか.jpegとか)
 ファイルkind(ローカライズされている)
 type identifier(UTIのこと)

が存在しています。

「すべての画像」「プレーンテキスト全般」といったざっくりとした指定が可能なUTIは、AppleScript側にあまり機能が解放されておらず、あまり利用できていなかったのですが、macOS 10.10でCocoaの機能が利用できるようになってからはUTIの利用もすすんできました。

ただ、それなりに調べる作業も必要だったり、ツールを併用する必要もあったりするので、ファイル拡張子からUTIをScriptで調べて指定できたほうが便利な場合もあるのでは? と考え、このようなルーチン(+命令拡張)を書いてみたものです。

AppleScript名:拡張子でUTIを指定しつつchoose file of type
— Created 2018-1-20 by Takaaki Naganoya
— 2018 Piyomaru Software
use AppleScript version "2.4"
use framework "Foundation"
use scripting additions
use BridgePlus : script "BridgePlus" –https://www.macosxautomation.com/applescript/apps/BridgePlus.html

set aFile to choose file of type {"jpg", "png"} with prompt "This is a message"
set bFile to choose file of type {"scpt", "scptd"} with prompt "With default locaion" default location (path to desktop)

on choose file of type extList with prompt aMes as string : "" default location aLoc : missing value
  set utiList to {}
  
repeat with i in extList
    set the end of utiList to retFileFormatUTI(i) of me
  end repeat
  
if aLoc = missing value then
    continue choose file of type utiList with prompt aMes
  else
    continue choose file of type utiList with prompt aMes default location aLoc
  end if
end choose file

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

★Click Here to Open This Script 

Posted in dialog file UTI | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

指定UTIでUTIを入れたリストをフィルタリング

Posted on 2月 8, 2018 by Takaaki Naganoya
AppleScript名:指定UTIでUTIを入れたリストをフィルタリング
— Created 2017-11-03 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

property NSPredicate : a reference to current application’s NSPredicate
property NSArray : a reference to current application’s NSArray

set aList to {"public.jpeg", "com.compuserve.gif", "public.svg-image", "public.plain-text", "com.apple.iwork.keynote.key", "com.apple.iwork.pages.pages", "com.apple.iwork.numbers.numbers", "com.microsoft.word.doc", "com.microsoft.excel.xls", "com.microsoft.powerpoint.ppt", "com.apple.mail.email", "com.apple.applescript.script", "com.apple.applescript.text", "public.html", "com.apple.property-list", "public.zip-archive", "public.au-audio", "com.apple.m4a-audio", "com.apple.m4v-video"}

set aRes to filterUTIList(aList, "public.text")
–>  {​​​​​"public.plain-text", ​​​​​"com.apple.applescript.script", ​​​​​"com.apple.applescript.text", ​​​​​"public.html"​​​}

set bRes to filterUTIList(aList, "public.image")
–>  {​​​​​"public.jpeg", ​​​​​"com.compuserve.gif", ​​​​​"public.svg-image"​​​}

set cRes to filterUTIList(aList, "public.audiovisual-content")
–>  {​​​​​"public.au-audio", ​​​​​"com.apple.m4a-audio", ​​​​​"com.apple.m4v-video"​​​}

on filterUTIList(aUTIList, aUTIstr)
  set anArray to NSArray’s arrayWithArray:aUTIList
  
set aPred to NSPredicate’s predicateWithFormat_("SELF UTI-CONFORMS-TO %@", aUTIstr)
  
set bRes to (anArray’s filteredArrayUsingPredicate:aPred) as list
  
return bRes
end filterUTIList

★Click Here to Open This Script 

Posted in file UTI | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

指定拡張子のUTI文字列を取得する

Posted on 2月 8, 2018 by Takaaki Naganoya
AppleScript名:指定拡張子のUTI文字列を取得する
— Created 2016-10-24 by Takaaki Naganoya
— Modified 2016-10-25 by Shane Stanley
— 2016 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AVFoundation"
use BridgePlus : script "BridgePlus" –https://www.macosxautomation.com/applescript/apps/BridgePlus.html

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

★Click Here to Open This Script 

Posted in file UTI | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

指定ファイルのUTI情報を取得

Posted on 2月 8, 2018 by Takaaki Naganoya

–> MagicKit.framework

AppleScript名:指定ファイルのUTI情報を取得
— Created 2017-10-25 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "MagicKit" –https://github.com/aidansteele/magickit

set aFile to POSIX path of (choose file)
set aRes to (current application’s GEMagicKit’s magicForFileAtPath:aFile)

set aaRes to aRes’s |description|() as string
–>  "ISO Media, MPEG v4 system, version 2"

set aMime to (aRes’s mimeType()) as string
–>  "video/mp4; charset=binary"

set utiList to (aRes’s uniformTypeHierarchy()) as list
–>  {​​​​​"com.apple.quicktime-movie", ​​​​​"public.movie", ​​​​​"public.audiovisual-content", ​​​​​"public.data", ​​​​​"public.content", ​​​​​"public.item"​​​}

set aDesc to (aRes’s |description|()) as string
–>  "ISO Media, Apple QuickTime movie"

★Click Here to Open This Script 

Posted in file UTI | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

指定ファイルからカスタムアイコンを削除する

Posted on 2月 8, 2018 by Takaaki Naganoya
AppleScript名:指定ファイルからカスタムアイコンを削除する
— Created 2015-10-19 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"

set aFile to POSIX path of (choose file with prompt "Choose Target File") –設定対象のファイル
set aSW to current application’s NSWorkspace’s sharedWorkspace()
aSW’s setIcon:(missing value) forFile:aFile options:0

★Click Here to Open This Script 

Posted in file Icon System | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

指定ファイルに指定アイコン画像をつける

Posted on 2月 8, 2018 by Takaaki Naganoya
AppleScript名:指定ファイルに指定アイコン画像をつける
— Created 2015-10-19 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"

set aPath to POSIX path of (choose file of type {"com.apple.icns", "public.tiff"} with prompt "Choose Icon File") –アイコンファイル
set aFile to POSIX path of (choose file with prompt "Choose Target File") –設定対象のファイル

set aURL to current application’s |NSURL|’s fileURLWithPath:aPath
set aImage to current application’s NSImage’s alloc()’s initWithContentsOfURL:aURL

set aSW to current application’s NSWorkspace’s sharedWorkspace()
aSW’s setIcon:aImage forFile:aFile options:0

★Click Here to Open This Script 

Posted in file Icon System | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

指定ファイルのxattrの削除(ダウンロードしたファイルが開けないときに)

Posted on 2月 8, 2018 by Takaaki Naganoya

–> XAttribute.framework

AppleScript名:指定ファイルのxattrの削除(ダウンロードしたファイルが開けないときに)
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "XAttribute" –https://github.com/rylio/OTMXAttribute

set dlFullPath to POSIX path of (choose file)

set xRes to removeXAttrFromFile(dlFullPath, "com.apple.quarantine")

on removeXAttrFromFile(aFile, anXattr)
  –Get Xattr String
  
set anAttribute to (current application’s OTMXAttribute’s stringAttributeAtPath:aFile |name|:anXattr |error|:(missing value))
  
if anAttribute = missing value then return true –There is no use to remove xattr
  
  
–Remove Xattr
  
set xRes to (current application’s OTMXAttribute’s removeAttributeAtPath:aFile |name|:anXattr |error|:(missing value))
  
if xRes = missing value then return false
  
return (xRes as boolean)
end removeXAttrFromFile

★Click Here to Open This Script 

Posted in file System | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

2D ListをCSVに v3(サニタイズ処理つき)

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:2D ListをCSVに v3(サニタイズ処理つき)
— Created 2015-10-01 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aNewFile to choose file name

set dataList to {{"0010", "ひよこタオルギフト", "200", "手に取ったとき、\"使うとき\"、ちょっと楽しくてかわいいひよこのタオル。", "●サイズ/H200㎜×W200㎜●素材/ひよこ羽毛100%●重量/170g●内容/5枚入り"}, {"0020", "ひよこホイッスル", "250", "今までにないデザインの、ひよこ型のホイッスル。ぴよ〜音を音階で吹き分けます。", "●サイズ/H60㎜×W40㎜×D10㎜●素材/プラスチック
●色/ひよこ色●重量/10g●付属品/首かけロープ付き
●型番/PIYO1"
}}

saveAsCSV(dataList, aNewFile) of me

–2D List to CSV file
on saveAsCSV(aList, aPath)
  –set crlfChar to (ASCII character 13) & (ASCII character 10)
  
set crlfChar to (string id 13) & (string id 10)
  
set LF to (string id 10)
  
set wholeText to ""
  
  
repeat with i in aList
    set newLine to {}
    
    
–Sanitize (Double Quote)
    
repeat with ii in i
      set jj to ii as text
      
set kk to repChar(jj, string id 34, (string id 34) & (string id 34)) of me –Escape Double Quote
      
set the end of newLine to kk
    end repeat
    
    
–Change Delimiter
    
set aLineText to ""
    
set curDelim to AppleScript’s text item delimiters
    
set AppleScript’s text item delimiters to "\",\""
    
set aLineList to newLine as text
    
set AppleScript’s text item delimiters to curDelim
    
    
set aLineText to repChar(aLineList, return, "") of me –delete return
    
set aLineText to repChar(aLineText, LF, "") of me –delete lf
    
    
set wholeText to wholeText & "\"" & aLineText & "\"" & crlfChar –line terminator: CR+LF
  end repeat
  
  
if (aPath as string) does not end with ".csv" then
    set bPath to aPath & ".csv" as Unicode text
  else
    set bPath to aPath as Unicode text
  end if
  
  
write_to_file(wholeText, bPath, false) of me
  
end saveAsCSV

on write_to_file(this_data, target_file, append_data)
  tell current application
    try
      set the target_file to the target_file as text
      
set the open_target_file to open for access file target_file with write permission
      
if append_data is false then set eof of the open_target_file to 0
      
write this_data to the open_target_file starting at eof
      
close access the open_target_file
      
return true
    on error error_message
      try
        close access file target_file
      end try
      
return error_message
    end try
  end tell
end write_to_file

on repChar(origText as text, targChar as text, repChar as text)
  set curDelim to AppleScript’s text item delimiters
  
set AppleScript’s text item delimiters to targChar
  
set tmpList to text items of origText
  
set AppleScript’s text item delimiters to repChar
  
set retText to tmpList as string
  
set AppleScript’s text item delimiters to curDelim
  
return retText
end repChar

★Click Here to Open This Script 

Posted in file list Text | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

CSVのParse 5(ASOC)

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:CSVのParse 5(ASOC)
–Created By Shane Stanley 2015/03/12
–Commented & Arranged By Takaaki Naganoya 2015/03/12

use scripting additions
use framework "Foundation"

set theString to "cust1,\"prod,1\",season 1,
cust1,prod1,season2,
cust2,prod1,event1,season1
cust2,prod3,event1,season 1"

its makeListsFromCSV:theString commaIs:","
–>  {​​​​​{​​​​​​​"cust1", ​​​​​​​"prod,1", ​​​​​​​"season 1"​​​​​}, ​​​​​{​​​​​​​"cust1", ​​​​​​​"prod1", ​​​​​​​"season2"​​​​​}, ​​​​​{​​​​​​​"cust2", ​​​​​​​"prod1", ​​​​​​​"event1", ​​​​​​​"season1"​​​​​}, ​​​​​{​​​​​​​"cust2", ​​​​​​​"prod3", ​​​​​​​"event1", ​​​​​​​"season 1"​​​​​}​​​}

–CSV Parser ASOC ver (Translated from "ASObjCExtras.framework" Objective-C version)
on makeListsFromCSV:theString commaIs:theComma
  
  
set theRows to {} –最終的に出力するデータ(2D Listになる)
  
  
set newLineCharSet to current application’s NSCharacterSet’s newlineCharacterSet() –改行キャラクタ
  
set importantCharSet to current application’s NSMutableCharacterSet’s characterSetWithCharactersInString:("\"" & theComma) –カンマ
  
  
importantCharSet’s formUnionWithCharacterSet:newLineCharSet
  
  
set theNSScanner to current application’s NSScanner’s scannerWithString:theString
  
theNSScanner’s setCharactersToBeSkipped:(missing value)
  
  
  
–データ末尾を検出するまでループ
  
repeat while (theNSScanner’s isAtEnd() as integer = 0)
    
    
set insideQuotes to false
    
set finishedRow to false
    
set theColumns to {}
    
set currentColumn to ""
    
    
–すべての行を処理終了するまでループ(行内部の処理)
    
repeat while (not finishedRow)
      
      
set {theResult, tempString} to theNSScanner’s scanUpToCharactersFromSet:importantCharSet intoString:(reference)
      
–log {"theResult", theResult, "tempString", tempString}
      
      
if theResult as integer = 1 then set currentColumn to currentColumn & (tempString as text)
      
–log {"currentColumn", currentColumn}
      
      
–データ末尾検出
      
if theNSScanner’s isAtEnd() as integer = 1 then
        if currentColumn is not "" then set end of theColumns to currentColumn
        
set finishedRow to true
        
      else
        –データ末尾ではない場合
        
set {theResult, tempString} to theNSScanner’s scanCharactersFromSet:newLineCharSet intoString:(reference)
        
        
if theResult as integer = 1 then
          
          
if insideQuotes then
            –ダブルクォート文字内の場合
            
set currentColumn to currentColumn & (tempString as text)
          else
            –ダブルクォート内ではない場合
            
if currentColumn is not "" then set end of theColumns to currentColumn
            
set finishedRow to true
          end if
          
        else
          –行末文字が見つからない場合
          
set theResult to theNSScanner’s scanString:"\"" intoString:(missing value)
          
          
if theResult as integer = 1 then
            –ダブルクォート文字が見つかった場合
            
if insideQuotes then
              –ダブルクォート文字内の場合
              
set theResult to theNSScanner’s scanString:"\"" intoString:(missing value)
              
              
if theResult as integer = 1 then
                set currentColumn to currentColumn & "\""
              else
                set insideQuotes to (not insideQuotes)
              end if
            else
              –ダブルクォート文字内ではない場合
              
set insideQuotes to (not insideQuotes)
            end if
            
          else
            –ダブルクォート文字が見つからなかった場合
            
set theResult to theNSScanner’s scanString:theComma intoString:(missing value) –カンマの検索
            
            
if theResult as integer = 1 then
              if insideQuotes then
                set currentColumn to currentColumn & theComma
              else
                set end of theColumns to currentColumn
                
set currentColumn to ""
                
theNSScanner’s scanCharactersFromSet:(current application’s NSCharacterSet’s whitespaceCharacterSet()) intoString:(missing value)
              end if
            end if
          end if
        end if
      end if
      
    end repeat
    
    
if (count of theColumns) > 0 then set end of theRows to theColumns –行データ(1D List)をtheRowsに追加(2D List)
    
  end repeat
  
  
return theRows
  
end makeListsFromCSV:commaIs:

★Click Here to Open This Script 

Posted in file list Text | Tagged 10.11savvy 10.12savvy 10.13savvy | 1 Comment

CSVのParse 4a(ASOC)

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:CSVのParse 4a(ASOC)
— Created 2015-03-11 by Shane Stanley
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use Bplus : script "BridgePlus" –https://www.macosxautomation.com/applescript/apps/BridgePlus.html

load framework
set someString to read (choose file of type {"public.comma-separated-values-text"})

set theData to current application’s SMSForder’s arrayFromCSV:someString commaIs:","
set theData to (current application’s SMSForder’s subarraysIn:theData paddedWith:"" |error|:(missing value)) as list
–>  {​​​​​{​​​​​​​"cust1", ​​​​​​​"prod,1", ​​​​​​​"season 1", ​​​​​​​""​​​​​}, ​​​​​{​​​​​​​"cust1", ​​​​​​​"prod1", ​​​​​​​"season 2", ​​​​​​​""​​​​​}, ​​​​​{​​​​​​​"cust2", ​​​​​​​"prod1", ​​​​​​​"event1", ​​​​​​​"season 1"​​​​​}, ​​​​​{​​​​​​​"cust2", ​​​​​​​"prod2", ​​​​​​​"event1", ​​​​​​​"season 2"​​​​​}, ​​​​​{​​​​​​​"cust2", ​​​​​​​"prod3", ​​​​​​​"event1", ​​​​​​​"season 1"​​​​​}​​​}

★Click Here to Open This Script 

Posted in file list Text | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

ASOCでDict読み込みして、指定のMSの搭乗回数を取得する v2

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:ASOCでDict読み込みして、指定のMSの搭乗回数を取得する v2
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aName to "efsf.plist"
set aFolName to "戦場の絆"
set aRec to retDictFromPlist(aFolName, aName) of me
set msL to msList of aRec

set eList to filterRecListByLabel(msL, "msName CONTAINS ’近 ザクII(F2) 獲得済’") of me
set aTimes to sortieTimes of first item of eList

on retDictFromPlist(aFolName, aPlistName)
  
  
set myAppSupDir to ((path to application support from user domain) as string) & aFolName & ":"
  
tell application "System Events" –Finderでなくこちらを使ってみた
    tell folder myAppSupDir
      set aExit to exists of file aPlistName
    end tell
  end tell
  
  
if aExit = false then
    return {}
  else
    set aPath to (POSIX path of myAppSupDir) & aPlistName
    
set thePath to current application’s NSString’s stringWithString:aPath
    
set thePath to thePath’s stringByExpandingTildeInPath()
    
set theDict to current application’s NSDictionary’s dictionaryWithContentsOfFile:thePath
    
return theDict as record
  end if
  
end retDictFromPlist

–リストに入れたレコードを、指定の属性ラベルの値で抽出
on filterRecListByLabel(aRecList as list, aPredicate as string)
  –ListからNSArrayへの型変換
  
set aArray to current application’s NSArray’s arrayWithArray:aRecList
  
  
–抽出
  
set aPredicate to current application’s NSPredicate’s predicateWithFormat:aPredicate
  
set filteredArray to aArray’s filteredArrayUsingPredicate:aPredicate
  
  
–NSArrayからListに型変換して返す
  
set bList to filteredArray as list
  
return bList
end filterRecListByLabel

★Click Here to Open This Script 

Posted in file list Record | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

ASOCでDict書き込み_3(Bridge Plus)

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:ASOCでDict書き込み_3(Bridge Plus)
use AppleScript version "2.4"
use framework "Foundation"
use scripting additions
use script "BridgePlus" — https://www.macosxautomation.com/applescript/apps/BridgePlus.html

load framework — BridgePlus command to load

set a1List to {"msName", "sortieTimes"}
set b1List to {{"近 装甲強化型ジム 獲得済 COST: 200", 66}, {"遠 ジム・キャノン 獲得済 COST: 160", 43}, {"近 ザクII(F2) 獲得済 COST: 160", 42}, {"近 ジム・コマンド 獲得済 COST: 200", 32}, {"近 ジム(WD隊) 獲得済 COST: 160", 28}, {"近 陸戦型ガンダム 獲得済 COST: 220", 24}, {"近 ジム改 獲得済 COST: 240", 22}, {"遠 ガンタンク 獲得済 COST: 200", 22}, {"格 ジム(指揮官機) 獲得済 COST: 160", 20}, {"近 ジム 獲得済 COST: 120", 19}, {"遠 量産型ガンタンク 獲得済 COST: 160", 14}, {"格 陸戦型ジム 獲得済 COST: 120", 12}, {"格 ガンダム 獲得済 COST: 280", 11}, {"近 ジム・トレーナー 獲得済 COST: 120", 9}, {"射 ジム・スナイパーII(WD隊) 獲得済 COST: 220", 9}, {"射 陸戦型ガンダム(ジム頭) 獲得済 COST: 200", 7}, {"格 ガンダムEz8 獲得済 COST: 240", 6}, {"近 ジム・寒冷地仕様 獲得済 COST: 200", 6}, {"狙 ジム・スナイパーカスタム 獲得済 COST: 200", 6}, {"格 ジム・ストライカー 獲得済 COST: 180", 4}, {"格 ガンキャノン重装型 獲得済 COST: 160", 3}, {"近 アクア・ジム 獲得済 COST: 160", 2}, {"射 ガンキャノン 獲得済 COST: 200", 2}, {"近 ジム・コマンドライトアーマー 獲得済 COST: 160", 1}, {"格 ボールK型 獲得済 COST: 120", 0}, {"格 B.D.2号機 獲得済 COST: 260", 0}, {"格 プロトタイプガンダム 獲得済 COST: 280", 0}, {"近 パワード・ジム 獲得済 COST: 240", 0}, {"射 デザート・ジム 獲得済 COST: 160", 0}, {"遠 量産型ガンキャノン 獲得済 COST: 200", 0}}

— BridgePlus uses SMSForder instead of SMSFord in ASOBjCExtras, but method is the same
set aArray to current application’s SMSForder’s subarraysIn:b1List asDictionariesUsingLabels:a1List |error|:(missing value)

set cRec to {msList:aArray, sortieDate:date string of (current date)}

set aName to "efsf.plist"
saveRecordToFolAsPlist(cRec, "戦場の絆", aName) of me

on saveRecordToFolAsPlist(theRecord, folName, aName)
  
  
set myAppSupDir to POSIX path of (path to application support from user domain)
  
set folderURL to (current application’s class "NSURL"’s fileURLWithPath:myAppSupDir)’s URLByAppendingPathComponent:folName
  
  
–do shell script(mkdir -p)のかわりに、指定ディレクトリまで作成
  
current application’s NSFileManager’s defaultManager()’s createDirectoryAtURL:folderURL withIntermediateDirectories:true attributes:(missing value) |error|:(missing value)
  
  
set theDict to current application’s NSDictionary’s dictionaryWithDictionary:theRecord
  
set aRes to theDict’s writeToURL:(folderURL’s URLByAppendingPathComponent:aName) atomically:true
  
  
return aRes as boolean
  
end saveRecordToFolAsPlist

★Click Here to Open This Script 

Posted in file list Record | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

Post navigation

  • Older posts
  • Newer posts

電子書籍(PDF)をオンラインストアで販売中!

Google Search

Popular posts

  • 開発機としてM2 Mac miniが来たのでガチレビュー
  • CotEditorで2つの書類の行単位での差分検出
  • macOS 13.6.5 AS系のバグ、一切直らず
  • macOS 15, Sequoia
  • 初心者がつまづきやすい「log」コマンド
  • 指定のWordファイルをPDFに書き出す
  • Pages本執筆中に、2つの書類モード切り替えに気がついた
  • Adobe AcrobatをAppleScriptから操作してPDF圧縮
  • メキシカンハットの描画
  • 与えられた文字列の1D Listのすべての順列組み合わせパターン文字列を返す v3(ベンチマーク用)
  • 2023年に書いた価値あるAppleScript
  • Pixelmator Pro v3.6.4でAppleScriptからの操作時の挙動に違和感が
  • Numbersで選択範囲のセルの前後の空白を削除
  • AdobeがInDesign v19.4からPOSIX pathを採用
  • Safariで「プロファイル」機能を使うとAppleScriptの処理に影響
  • Cocoa Scripting Course 続刊計画
  • AppleScriptによる並列処理
  • macOS 14.xでScript Menuの実行速度が大幅に下がるバグ
  • NaturalLanguage.frameworkでNLEmbeddingの処理が可能な言語をチェック
  • AppleScript入門③AppleScriptを使った「自動化」とは?

Tags

10.11savvy (1102) 10.12savvy (1243) 10.13savvy (1392) 10.14savvy (587) 10.15savvy (438) 11.0savvy (283) 12.0savvy (212) 13.0savvy (188) 14.0savvy (138) 15.0savvy (116) CotEditor (64) Finder (51) iTunes (19) Keynote (115) NSAlert (61) NSArray (51) NSBitmapImageRep (20) NSBundle (20) NSButton (34) NSColor (53) NSDictionary (28) NSFileManager (23) NSFont (21) NSImage (41) NSJSONSerialization (21) NSMutableArray (63) NSMutableDictionary (22) NSPredicate (36) NSRunningApplication (56) NSScreen (30) NSScrollView (22) NSString (119) NSURL (98) NSURLRequest (23) NSUTF8StringEncoding (30) NSView (33) NSWorkspace (20) Numbers (75) Pages (54) Safari (44) Script Editor (27) WKUserContentController (21) WKUserScript (20) WKWebView (23) WKWebViewConfiguration (22)

カテゴリー

  • 2D Bin Packing
  • 3D
  • AirDrop
  • AirPlay
  • Animation
  • AppleScript Application on Xcode
  • Beginner
  • Benchmark
  • beta
  • Bluetooth
  • Books
  • boolean
  • bounds
  • Bug
  • Calendar
  • call by reference
  • check sum
  • Clipboard
  • Cocoa-AppleScript Applet
  • Code Sign
  • Color
  • Custom Class
  • dialog
  • diff
  • drive
  • Droplet
  • exif
  • file
  • File path
  • filter
  • folder
  • Font
  • Font
  • GAME
  • geolocation
  • GUI
  • GUI Scripting
  • Hex
  • History
  • How To
  • iCloud
  • Icon
  • Image
  • Input Method
  • Internet
  • iOS App
  • JavaScript
  • JSON
  • JXA
  • Keychain
  • Keychain
  • Language
  • Library
  • list
  • Locale
  • Localize
  • Machine Learning
  • Map
  • Markdown
  • Menu
  • Metadata
  • MIDI
  • MIME
  • Natural Language Processing
  • Network
  • news
  • Noification
  • Notarization
  • Number
  • Object control
  • OCR
  • OSA
  • parallel processing
  • PDF
  • Peripheral
  • PRODUCTS
  • QR Code
  • Raw AppleEvent Code
  • Record
  • rectangle
  • recursive call
  • regexp
  • Release
  • Remote Control
  • Require Control-Command-R to run
  • REST API
  • Review
  • RTF
  • Sandbox
  • Screen Saver
  • Script Libraries
  • sdef
  • search
  • Security
  • selection
  • shell script
  • Shortcuts Workflow
  • Sort
  • Sound
  • Spellchecker
  • Spotlight
  • SVG
  • System
  • Tag
  • Telephony
  • Text
  • Text to Speech
  • timezone
  • Tools
  • Update
  • URL
  • UTI
  • Web Contents Control
  • WiFi
  • XML
  • XML-RPC
  • イベント(Event)
  • 未分類

アーカイブ

  • 2025年2月
  • 2025年1月
  • 2024年12月
  • 2024年11月
  • 2024年10月
  • 2024年9月
  • 2024年8月
  • 2024年7月
  • 2024年6月
  • 2024年5月
  • 2024年4月
  • 2024年3月
  • 2024年2月
  • 2024年1月
  • 2023年12月
  • 2023年11月
  • 2023年10月
  • 2023年9月
  • 2023年8月
  • 2023年7月
  • 2023年6月
  • 2023年5月
  • 2023年4月
  • 2023年3月
  • 2023年2月
  • 2023年1月
  • 2022年12月
  • 2022年11月
  • 2022年10月
  • 2022年9月
  • 2022年8月
  • 2022年7月
  • 2022年6月
  • 2022年5月
  • 2022年4月
  • 2022年3月
  • 2022年2月
  • 2022年1月
  • 2021年12月
  • 2021年11月
  • 2021年10月
  • 2021年9月
  • 2021年8月
  • 2021年7月
  • 2021年6月
  • 2021年5月
  • 2021年4月
  • 2021年3月
  • 2021年2月
  • 2021年1月
  • 2020年12月
  • 2020年11月
  • 2020年10月
  • 2020年9月
  • 2020年8月
  • 2020年7月
  • 2020年6月
  • 2020年5月
  • 2020年4月
  • 2020年3月
  • 2020年2月
  • 2020年1月
  • 2019年12月
  • 2019年11月
  • 2019年10月
  • 2019年9月
  • 2019年8月
  • 2019年7月
  • 2019年6月
  • 2019年5月
  • 2019年4月
  • 2019年3月
  • 2019年2月
  • 2019年1月
  • 2018年12月
  • 2018年11月
  • 2018年10月
  • 2018年9月
  • 2018年8月
  • 2018年7月
  • 2018年6月
  • 2018年5月
  • 2018年4月
  • 2018年3月
  • 2018年2月

https://piyomarusoft.booth.pm/items/301502

メタ情報

  • ログイン
  • 投稿フィード
  • コメントフィード
  • WordPress.org

Forum Posts

  • 人気のトピック
  • 返信がないトピック

メタ情報

  • ログイン
  • 投稿フィード
  • コメントフィード
  • WordPress.org
Proudly powered by WordPress
Theme: Flint by Star Verte LLC