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

タグ: 10.13savvy

指定URLをロードして1枚ものの大きなPNGにレンダリング v2.1

Posted on 2月 8, 2018 by Takaaki Naganoya

指定URLのWebコンテンツをWebViewに読み込んでレンダリングし、1枚ものの大きなPNG画像に保存するAppleScriptです。

資料作成時にWebサイトの内容を利用する場合、こうした1枚ものの大きな画像にレンダリングすることがよくあります(Webサイトのデザインや構成変更の提案時など)。PDFとしてレンダリングする場合が多いですが、サイズ軽減のためにPNGなどの画像でレンダリングすることもあり、その場合のために作成したものです。

ただ、実際に作っておいてナニですが、PDFで保存する場合のほうが多く、PNGでレンダリングするケースはまれです。

# そのままではmacOS 10.13以降の環境で動かなくなっていたので、一部修正しました。ただ、今後のことを考えるとWebViewではなくWkWebViewを使って動作するものがあったほうがよいでしょう

AppleScript名:指定URLをロードして1枚ものの大きなPNGにレンダリング v2a
— Created 2015-09-15 by Takaaki Naganoya
— Modified 2019-11-09 by Takaaki Naganoya
— 2019 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "WebKit"
use framework "Quartz"
use framework "AppKit"

property loadDone : false
property theWebView : missing value
property userAgentName : "Version/9.0 Safari/601.1.56"

set aOutPath to "~/Desktop/outIMG_1.png"
set aURL to "http://www.apple.com/jp/shop/browse/home/specialdeals/mac"
–set aURL to "http://piyocast.com/as"

–Check If this script runs in foreground
if not (current application’s NSThread’s isMainThread()) as boolean then
  display alert "This script must be run from the main thread (Command-Control-R in Script Editor)." buttons {"Cancel"} as critical
  
error number -128
end if

set aPath to current application’s NSString’s stringWithString:aOutPath
set bPath to aPath’s stringByExpandingTildeInPath()

–URL Validation check
set aRes to validateURL(aURL)
if aRes = false then return
set aTitle to getURLandRender(aURL)

–Specify Render to image view (HTML world)
set aTargetView to (my theWebView)’s mainFrame()’s frameView()’s documentView()

–Get Web Contents Size
set targRect to aTargetView’s |bounds|()

–Make Window begin–????? Really Needed ???? Very doubtful
if class of targRect = record then
  set aWidth to width of |size| of targRect
  
set aHeight to height of |size| of targRect
else if class of targRect = list then
  set aWidth to item 1 of item 2 of targRect
  
set aHeight to item 2 of item 2 of targRect
end if

set aWin to current application’s NSWindow’s alloc()’s init()
aWin’s setContentSize:{aWidth + 40, aHeight + 20}
aWin’s setContentView:(my theWebView)
aWin’s setOpaque:false
aWin’s |center|()
–Make Window end

set aData to aTargetView’s dataWithPDFInsideRect:targRect
set aImage to current application’s NSImage’s alloc()’s initWithData:aData

set bData to aImage’s TIFFRepresentation()
set aBitmap to current application’s NSBitmapImageRep’s imageRepWithData:bData

–Write To File
set myNewImageData to (aBitmap’s representationUsingType:(current application’s NSPNGFileType) |properties|:(missing value))
set aRes to (myNewImageData’s writeToFile:bPath atomically:true) as boolean

return aRes

–Download the URL page to WebView and get page title
on getURLandRender(aURL)
  
  
set my loadDone to false
  
set my theWebView to missing value
  
openURL(aURL)
  
  
set waitLoop to 1000 * 60 –60 seconds
  
  
set hitF to false
  
repeat waitLoop times
    if my loadDone = true then
      set hitF to true
      
exit repeat
    end if
    
current application’s NSThread’s sleepForTimeInterval:("0.001" as real) –delay 0.001
  end repeat
  
if hitF = false then return
  
  
set jsText to "document.title"
  
set x to ((my theWebView)’s stringByEvaluatingJavaScriptFromString:jsText) as text
  
  
return x
end getURLandRender

–Down Load URL contents to WebView
on openURL(aURL)
  set noter1 to current application’s NSNotificationCenter’s defaultCenter()
  
set (my theWebView) to current application’s WebView’s alloc()’s init()
  (
my theWebView)’s setApplicationNameForUserAgent:userAgentName
  (
my theWebView)’s setMediaStyle:"screen"
  (
my theWebView)’s setDrawsBackground:true –THIS SEEMS NOT TO WORK
  
–(my theWebView)’s backGroundColor:(current application’s NSColor’s whiteColor())–Mistake
  
–(my theWebView)’s setShouldUpdateWhileOffscreen:true
  
noter1’s addObserver:me selector:"webLoaded:" |name|:(current application’s WebViewProgressFinishedNotification) object:(my theWebView)
  (
my theWebView)’s setMainFrameURL:aURL
end openURL

–Web View’s Event Handler:load finished
on webLoaded:aNotification
  set my loadDone to true
end webLoaded:

–URL Validation Check
on validateURL(anURL as text)
  set regEx1 to current application’s NSString’s stringWithString:"((https|http)://)((\\w|-)+)(([.]|[/])((\\w|-)+))+"
  
set predicate1 to current application’s NSPredicate’s predicateWithFormat_("SELF MATCHES %@", regEx1)
  
set aPredRes1 to (predicate1’s evaluateWithObject:anURL) as boolean
  
return aPredRes1
end validateURL

★Click Here to Open This Script 

Posted in Require Control-Command-R to run | Tagged 10.11savvy 10.12savvy 10.13savvy | 1 Comment

簡易形態素解析してスーパー大辞林で辞書検索

Posted on 2月 7, 2018 by Takaaki Naganoya

「words of」によるAppleScriptビルトインの超簡易形態素解析を実行して、日本語の文を単語(形態素)ごとに分解し、macOS標準搭載の辞書.appの「スーパー大辞林」で全単語を検索するAppleScriptです。

–> dictKit.framework

実行にあたっては、上記Frameworkを~/Library/Frameworksにインストールしたうえで、macOS 10.14以降ではScript Debuggerを用いるか、お使いのMacをSIP解除してScript Editor上で呼び出して実行する必要があります。

処理対象:”大きな栗の木の下で”

実行結果:
–> {{dictName:”スーパー大辞林”, keywordName:”で”, dictContents:”で 「て」の濁音の仮名。歯茎破裂音の有声子音と前舌の半狭母音とから成る音節。”}….}}

AppleScript名:簡易形態素解析してスーパー大辞林で辞書検索
— Created 2015-10-25 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "dictKit" –https://github.com/mattt/DictionaryKit

set aText to "大きな栗の木の下で"
set wList to words of aText

repeat with i in wList
  set dRes to getWordDifinitionInJapaneseDictionary(i as string) of me
end repeat

on getWordDifinitionInJapaneseDictionary(aTerm as string)
  set localNameList to getNameOfLocalDictionaries() of me
  
set dNameList to {"スーパー大辞林"}
  
set aSet to current application’s NSMutableSet’s setWithArray:localNameList
  
set bSet to current application’s NSMutableSet’s setWithArray:dNameList
  
aSet’s intersectSet:bSet
  
set dList to aSet’s allObjects() as list
  
if dList = {} then return false
  
  
set aResList to {}
  
  
repeat with i in dNameList
    set aDictionary to (current application’s TTTDictionary’s dictionaryNamed:i)
    
set hitEntryList to (aDictionary’s entriesForSearchTerm:aTerm) as list
    
if hitEntryList is not equal to {missing value} then
      
      
repeat with ii in hitEntryList
        set j to contents of ii
        
        
set headW to (j’s headword)
        
set headW to headW as text
        
        
try
          set aText to (j’s |text|)
          
set aText to aText as text
        on error
          set aText to (j’s HTML)
          
set aText to decodeCharacterReference(aText) of me
        end try
        
        
set the end of aResList to {dictName:(i as text), keywordName:headW, dictContents:aText}
        
      end repeat
      
    end if
  end repeat
  
  
aResList
end getWordDifinitionInJapaneseDictionary

on decodeCharacterReference(aStr)
  set anNSString to current application’s NSString’s stringWithString:aStr
  
set theData to anNSString’s dataUsingEncoding:(current application’s NSUTF16StringEncoding)
  
set styledString to current application’s NSAttributedString’s alloc()’s initWithHTML:theData documentAttributes:(missing value)
  
set plainText to (styledString’s |string|()) as string
  
return plainText
end decodeCharacterReference

on getNameOfLocalDictionaries()
  set dSet to current application’s TTTDictionary’s availableDictionaries()
  
set dList to dSet’s allObjects()
  
set dNameList to {}
  
repeat with i in dList
    set the end of dNameList to (i’s |name|()) as text
  end repeat
  
return dNameList
end getNameOfLocalDictionaries

★Click Here to Open This Script 

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

Dictionary.appの辞書名を言語で抽出

Posted on 2月 7, 2018 by Takaaki Naganoya

–> dictKit.framework

AppleScript名:DIctionary.appの辞書名を言語で抽出
— Created 2015-10-25 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "dictKit" –https://github.com/mattt/DictionaryKit

–Dictionary.appのすべての辞書名を出力
set d1Res to getEveryLocalDictionaryInformation() of me
–>  {​​​​​{​​​​​​​dictName:"뉴에이스 영한사전 / 뉴에이스 한영사전", ​​​​​​​dictLang:"韓国語 – 英語"​​​​​}, ​​​​​{​​​​​​​dictName:"Multidictionnaire de la langue française", ​​​​​​​dictLang:"フランス語"​​​​​}, ​​​​​{​​​​​​​dictName:"राजपाल हिन्दी शब्दकोश", ​​​​​​​dictLang:"ヒンディー語"​​​​​}, ….}

–DIctionary.appの辞書のうち言語ラベル(shortName)が「日本語」ではじまるものを抽出(和英辞典など)
set d2Res to getLocalDictionaryInformationByFromLang("日本語") of me
–>  {​​​​​{​​​​​​​dictName:"スーパー大辞林", ​​​​​​​dictLang:"日本語"​​​​​}, ​​​​​{​​​​​​​dictName:"ウィズダム英和辞典 / ウィズダム和英辞典", ​​​​​​​dictLang:"日本語 – 英語"​​​​​}​​​}

–Dictionary.appの辞書のうち言語ラベル(shortName)が「日本語」で終わるものを抽出(英和辞典、日本語辞典)
set d3Res to getLocalDictionaryInformationByToLang("日本語") of me
–>  {​​​​​{​​​​​​​dictName:"スーパー大辞林", ​​​​​​​dictLang:"日本語"​​​​​}​​​}

–Dictionary.appの辞書のうち言語ラベル(shortName)が「日本語」ではじまり「英語」で終わるもの(和英辞典)を抽出
set d4Res to getLocalDictionaryInformationByFromToLang("日本語", "英語") of me
–>  {​​​​​{​​​​​​​dictName:"ウィズダム英和辞典 / ウィズダム和英辞典", ​​​​​​​dictLang:"日本語 – 英語"​​​​​}​​​}

on getEveryLocalDictionaryInformation()
  set dSet to current application’s TTTDictionary’s availableDictionaries()
  
set dList to dSet’s allObjects()
  
set dNameList to {}
  
repeat with i in dList
    set aName to (|name|() of i) as string
    
set sName to (shortName() of i) as string
    
set the end of dNameList to {dictName:aName, dictLang:sName}
  end repeat
  
return dNameList
end getEveryLocalDictionaryInformation

on getLocalDictionaryInformationByFromLang(aFromLang)
  set dSet to current application’s TTTDictionary’s availableDictionaries()
  
set dList to dSet’s allObjects()
  
set dNameList to {}
  
repeat with i in dList
    set aName to (|name|() of i) as string
    
set sName to (shortName() of i) as string
    
if sName begins with aFromLang then
      set the end of dNameList to {dictName:aName, dictLang:sName}
    end if
  end repeat
  
return dNameList
end getLocalDictionaryInformationByFromLang

on getLocalDictionaryInformationByToLang(aToLang)
  set dSet to current application’s TTTDictionary’s availableDictionaries()
  
set dList to dSet’s allObjects()
  
set dNameList to {}
  
repeat with i in dList
    set aName to (|name|() of i) as string
    
set sName to (shortName() of i) as string
    
if sName ends with aToLang then
      set the end of dNameList to {dictName:aName, dictLang:sName}
    end if
  end repeat
  
return dNameList
end getLocalDictionaryInformationByToLang

on getLocalDictionaryInformationByFromToLang(aFromLang, aToLang)
  set dSet to current application’s TTTDictionary’s availableDictionaries()
  
set dList to dSet’s allObjects()
  
set dNameList to {}
  
repeat with i in dList
    set aName to (|name|() of i) as string
    
set sName to (shortName() of i) as string
    
if sName starts with aFromLang and sName ends with aToLang then
      set the end of dNameList to {dictName:aName, dictLang:sName}
    end if
  end repeat
  
return dNameList
end getLocalDictionaryInformationByFromToLang

★Click Here to Open This Script 

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

指定辞書で指定キーワードを串刺し検索

Posted on 2月 7, 2018 by Takaaki Naganoya

–> dictKit.framework

AppleScript名:指定辞書で指定キーワードを串刺し検索
— Created 2015-10-25 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "dictKit" –https://github.com/mattt/DictionaryKit

set dRes to getWordDifinitionInDictionaries("青い", {"スーパー大辞林"}) of me

on getWordDifinitionInDictionaries(aTerm as string, dNameList as list)
  set localNameList to getNameOfLocalDictionaries() of me
  
  
–指定辞書がローカル環境に存在しているかどうかチェック
  
set aSet to current application’s NSMutableSet’s setWithArray:localNameList
  
set bSet to current application’s NSMutableSet’s setWithArray:dNameList
  
aSet’s intersectSet:bSet
  
set dList to aSet’s allObjects() as list
  
if dList = {} then return false
  
  
set aResList to {}
  
  
repeat with i in dNameList
    set aDictionary to (current application’s TTTDictionary’s dictionaryNamed:i)
    
set hitEntryList to (aDictionary’s entriesForSearchTerm:aTerm) as list
    
if hitEntryList is not equal to {missing value} then
      
      
repeat with ii in hitEntryList
        set j to contents of ii
        
        
set headW to (j’s headword)
        
set headW to headW as text
        
        
try
          set aText to (j’s |text|)
          
set aText to aText as text
        on error
          set aText to (j’s HTML)
          
set aText to decodeCharacterReference(aText) of me
        end try
        
        
set the end of aResList to {dictName:(i as text), keywordName:headW, dictContents:aText}
        
      end repeat
      
    end if
  end repeat
  
  
aResList
end getWordDifinitionInDictionaries

on decodeCharacterReference(aStr)
  set anNSString to current application’s NSString’s stringWithString:aStr
  
set theData to anNSString’s dataUsingEncoding:(current application’s NSUTF16StringEncoding)
  
set styledString to current application’s NSAttributedString’s alloc()’s initWithHTML:theData documentAttributes:(missing value)
  
set plainText to (styledString’s |string|()) as string
  
return plainText
end decodeCharacterReference

on getNameOfLocalDictionaries()
  set dSet to current application’s TTTDictionary’s availableDictionaries()
  
set dList to dSet’s allObjects()
  
set dNameList to {}
  
repeat with i in dList
    set the end of dNameList to (i’s |name|()) as text
  end repeat
  
return dNameList
end getNameOfLocalDictionaries

★Click Here to Open This Script 

Posted in System | Tagged 10.11savvy 10.12savvy 10.13savvy Dictionary | 1 Comment

ASOCでOS内蔵辞書を串刺し検索するじっけん3

Posted on 2月 7, 2018 by Takaaki Naganoya

–> dictKit.framework

AppleScript名:ASOCでOS内蔵辞書を串刺し検索するじっけん3
— Created 2015-10-25 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "dictKit" –https://github.com/mattt/DictionaryKit

–Japanese & English Dictionaries
set dNameList to {"Apple用語辞典", "Oxford Thesaurus of English", "スーパー大辞林", "Oxford Dictionary of English", "Oxford American Writer’s Thesaurus", "Wikipedia", "New Oxford American Dictionary", "ウィズダム英和辞典 / ウィズダム和英辞典", "Wikipedia"}

–English Dictionaries
set dNameList to {"Oxford American Writer’s Thesaurus", "New Oxford American Dictionary"}

–Wikipedia
set dNameList to {"Wikipedia"}

set aTerm to "set"
set aResList to {}

repeat with i in dNameList
  set aDictionary to (current application’s TTTDictionary’s dictionaryNamed:i)
  
set hitEntryList to (aDictionary’s entriesForSearchTerm:aTerm) as list
  
if hitEntryList is not equal to {missing value} then
    
    
repeat with ii in hitEntryList
      set j to contents of ii
      
      
set headW to (j’s headword)
      
set headW to headW as text
      
      
try
        set aText to (j’s |text|)
        
set aText to aText as text
      on error
        set aText to (j’s HTML)
        
set aText to decodeCharacterReference(aText) of me
      end try
      
      
set the end of aResList to {dictName:(i as text), keywordName:headW, dictContents:aText}
      
    end repeat
    
  end if
end repeat

aResList

on decodeCharacterReference(aStr)
  set anNSString to current application’s NSString’s stringWithString:aStr
  
set theData to anNSString’s dataUsingEncoding:(current application’s NSUTF16StringEncoding)
  
set styledString to current application’s NSAttributedString’s alloc()’s initWithHTML:theData documentAttributes:(missing value)
  
set plainText to (styledString’s |string|()) as string
  
return plainText
end decodeCharacterReference

★Click Here to Open This Script 

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

指定辞書でキーワード検索

Posted on 2月 7, 2018 by Takaaki Naganoya

–> dictKit.framework

AppleScript名:指定辞書でキーワード検索
— Created 2017-12-30 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "dictKit" –https://github.com/mattt/DictionaryKit

set aRes to findKeywordWithDictionaryApp("rake", "ウィズダム英和辞典 / ウィズダム和英辞典") of me

on findKeywordWithDictionaryApp(aKeyword, aDictName)
  set aDictionary to (current application’s TTTDictionary’s dictionaryNamed:aDictName)
  
set hitEntryList to (aDictionary’s entriesForSearchTerm:aKeyword) as list
  
if hitEntryList is not equal to {missing value} then
    
    
repeat with ii in hitEntryList
      set j to contents of ii
      
      
set headW to (j’s headword)
      
set headW to headW as text
      
      
try
        set aText to (j’s |text|)
        
set aText to aText as text
      on error
        set aText to (j’s HTML)
        
set aText to decodeCharacterReference(aText) of me
      end try
      
      
return aText
      
    end repeat
    
    
return {}
  end if
end findKeywordWithDictionaryApp

on decodeCharacterReference(aStr)
  set anNSString to current application’s NSString’s stringWithString:aStr
  
set theData to anNSString’s dataUsingEncoding:(current application’s NSUTF16StringEncoding)
  
set styledString to current application’s NSAttributedString’s alloc()’s initWithHTML:theData documentAttributes:(missing value)
  
set plainText to (styledString’s |string|()) as string
  
return plainText
end decodeCharacterReference

★Click Here to Open This Script 

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

日本語の慣用句を検索する

Posted on 2月 7, 2018 by Takaaki Naganoya

辞書.app内の辞書「スーパー大辞林」を対象に、慣用句のキーワード検索(部分一致検索)を行うAppleScriptです。

–> dictKit.framework (To ~/Library/Frameworks/)

掲載時はmacOS 10.12上で作成、検証を行っていましたが、その後macOS 10.14でホームディレクトリ下のFrameworkへのアクセスが禁止されたため、実行にはScript Debugger上、およびScript Debuggerから書き出したEnhanced AppleScript Applet上で書き出して実行する必要があります。

# あるいは、SIPを解除すればスクリプトエディタ上でも実行可能です

AppleScript名:日本語の慣用句を検索する
— Created 2017-12-30 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "dictKit" –https://github.com/mattt/DictionaryKit

set aRes to retJapaneseIdionFromKanjiChar("血") of me
–>  {​​​​​"血が通う", ​​​​​"血が騒ぐ", ​​​​​"血が繫がる", ​​​​​"血が上る", ​​​​​"血が引く", ​​​​​"血で血を洗う", ​​​​​"血と汗", ​​​​​"血となり肉となる", ​​​​​"血に飢える", ​​​​​"血の出るよう", ​​​​​"血の滲むよう", ​​​​​"血は争えない", ​​​​​"血は水よりも濃い", ​​​​​"血も涙もない", ​​​​​"血湧き肉躍る", ​​​​​"血を受ける", ​​​​​"血を歃る", ​​​​​"血を吐く思い", ​​​​​"血を引く", ​​​​​"血を見る", ​​​​​"血を分ける"​​​}

set aRes to retJapaneseIdionFromKanjiChar("家") of me
–>  {​​​​​"家給し人足る", ​​​​​"家高し", ​​​​​"家に杖つく", ​​​​​"家貧しくして孝子顕わる", ​​​​​"家をあける", ​​​​​"家を出ず", ​​​​​"家を外にする"​​​}

set aRes to retJapaneseIdionFromKanjiChar("水") of me
–>  {​​​​​"水到りて渠成る", ​​​​​"水が合わない", ​​​​​"水が漬く", ​​​​​"水が入る", ​​​​​"水が引く", ​​​​​"水涸る", ​​​​​"水清ければ魚棲まず", ​​​​​"水澄む", ​​​​​"水で割る", ​​​​​"水と油", ​​​​​"水にする", ​​​​​"水に流す", ​​​​​"水になる", ​​​​​"水に馴れる", ​​​​​"水温む", ​​​​​"水の滴るよう", ​​​​​"水の流れと身のゆくえ", ​​​​​"水の低きに就く如し", ​​​​​"水は方円の器に随う", ​​​​​"水も漏らさぬ", ​​​​​"水をあける", ​​​​​"水を打ったよう", ​​​​​"水を得た魚のよう", ​​​​​"水を掛ける", ​​​​​"水をさす", ​​​​​"水を向ける"​​​}

set aRes to retJapaneseIdionFromKanjiChar("木") of me
–>  {​​​​​"木から落ちた猿", ​​​​​"樹静かならんと欲すれども風止まず", ​​​​​"木で鼻を括る", ​​​​​"木に竹を接ぐ", ​​​​​"木にも草にも心を置く", ​​​​​"木に餅がなる", ​​​​​"木に縁りて魚を求む", ​​​​​"木の股から生まれる", ​​​​​"木六竹八塀十郎", ​​​​​"木を見て森を見ず"​​​}

on retJapaneseIdionFromKanjiChar(aKanji)
  set aDictionary to (current application’s TTTDictionary’s dictionaryNamed:"スーパー大辞林")
  
set hitEntryList to (aDictionary’s entriesForSearchTerm:aKanji) as list
  
if hitEntryList is not equal to {missing value} then
    
    
repeat with ii in hitEntryList
      set j to contents of ii
      
      
set headW to (j’s headword)
      
set headW to headW as text
      
      
try
        set aText to (j’s |text|)
        
set aText to aText as text
      on error
        set aText to (j’s HTML)
        
set aText to decodeCharacterReference(aText) of me
      end try
      
      
if aText contains "〈句項目〉" then
        set aCount to 1
        
set tmpList to paragraphs of aText
        
set aLen to length of tmpList
        
        
repeat with i in tmpList
          set j to contents of i
          
if j contains "〈句項目〉" then
            set outList to items (aCount + 1) thru -1 of tmpList
            
exit repeat
          end if
          
set aCount to aCount + 1
        end repeat
        
        
repeat with ii from (aCount + 1) to aLen
          set jj to contents of ii
          
if jj = "" then exit repeat
        end repeat
        
        
set outList to contents of items (aCount + 1) thru (ii – 1) of tmpList
        
return outList
      end if
    end repeat
    
    
return {}
  end if
end retJapaneseIdionFromKanjiChar

on decodeCharacterReference(aStr)
  set anNSString to current application’s NSString’s stringWithString:aStr
  
set theData to anNSString’s dataUsingEncoding:(current application’s NSUTF16StringEncoding)
  
set styledString to current application’s NSAttributedString’s alloc()’s initWithHTML:theData documentAttributes:(missing value)
  
set plainText to (styledString’s |string|()) as string
  
return plainText
end decodeCharacterReference

★Click Here to Open This Script 

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

ASOCでOS内蔵辞書を串刺し検索するじっけん1

Posted on 2月 7, 2018 by Takaaki Naganoya

–> dictKit.framework

AppleScript名:ASOCでOS内蔵辞書を串刺し検索するじっけん1
— Created 2015-10-22 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "dictKit" –https://github.com/mattt/DictionaryKit

set dSet to current application’s TTTDictionary’s availableDictionaries()
set dList to dSet’s allObjects()

set aTerm to "Apple"
set aResList to {}

repeat with ii in dList
  set hitEntryList to (ii’s entriesForSearchTerm:aTerm) as list
  
if hitEntryList is not equal to {missing value} then
    set aDname to ii’s |name|() as text
    
    
repeat with i in hitEntryList
      set j to contents of i
      
      
set headW to (j’s headword)
      
set headW to headW as text
      
      
set aText to (j’s |text|)
      
set aText to aText as text
      
      
set the end of aResList to {aDname, headW, aText}
      
    end repeat
  end if
end repeat

aResList

★Click Here to Open This Script 

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

ASOCで辞書.appで検索可能な辞書名称一覧を取得する v13

Posted on 2月 7, 2018 by Takaaki Naganoya

–> dictKit.framework

AppleScript名:ASOCで辞書.appで検索可能な辞書名称一覧を取得する v13
— Created 2015-10-22 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "dictKit" –https://github.com/mattt/DictionaryKit

set dSet to current application’s TTTDictionary’s availableDictionaries()
set dList to dSet’s allObjects()
set dNameList to {}
repeat with i in dList
  set the end of dNameList to (i’s |name|()) as text
end repeat
dNameList
–OS X 10.10 (27 dict)
–>  {"뉴에이스 영한사전 / 뉴에이스 한영사전", "Apple 用語辞典", "Multidictionnaire de la langue française", "राजपाल हिन्दी शब्दकोश", "Dizionario italiano da un affiliato di Oxford University Press", "Oxford-Hachette French Dictionary", "NE Ordbok", "牛津英汉汉英词典", "Oxford Thesaurus of English", "スーパー大辞林", "Oxford Dictionary of English", "Oxford American Writer’s Thesaurus", "Norsk Ordbok", "Gran Diccionario Oxford – Español-Inglés • Inglés-Español", "Wikipedia", "Duden-Wissensnetz deutsche Sprache", "Толковый словарь русского языка", "뉴에이스 국어사전", "Prisma woordenboek Nederlands", "New Oxford American Dictionary", "Dicionário de Português licenciado para Oxford University Press", "Oxford German Dictionary", "Diccionario General de la Lengua Española Vox", "ウィズダム英和辞典 / ウィズダム和英辞典", "Arkadaş Türkçe Sözlük", "พจนานุกรมไทย ฉบับทันสมัยและสมบูรณ์", "现代汉语规范词典"}

–macOS 10.12 (32 dict)
–>  {"뉴에이스 영한사전 / 뉴에이스 한영사전", "Multidictionnaire de la langue française", "राजपाल हिन्दी शब्दकोश", "Dizionario italiano da un affiliato di Oxford University Press", "Oxford-Hachette French Dictionary", "NE Ordbok", "Apple用語辞典", "牛津英汉汉英词典", "スーパー大辞林", "Oxford Dictionary of English", "Oxford American Writer’s Thesaurus", "Gran Diccionario Oxford – Español-Inglés • Inglés-Español", "Norsk Ordbok", "Wikipedia", "Oxford Paravia Il Dizionario inglese – italiano/italiano – inglese", "Duden-Wissensnetz deutsche Sprache", "Толковый словарь русского языка", "Oxford Thesaurus of English", "TTY Dictionary", "Dicionário de Português licenciado para Oxford University Press", "New Oxford American Dictionary", "Prisma woordenboek Nederlands", "뉴에이스 국어사전", "Oxford German Dictionary", "五南國語活用辭典", "Diccionario General de la Lengua Española Vox", "ウィズダム英和辞典 / ウィズダム和英辞典", "Arkadaş Türkçe Sözlük", "พจนานุกรมไทย ฉบับทันสมัยและสมบูรณ์", "现代汉语规范词典", "Politikens Nudansk Ordbog", "Prisma Handwoordenboek Engels"}

–macOS 10.13 (34 dict)
–>  {"Gran Diccionario Oxford – Español-Inglés • Inglés-Español", "Norsk Ordbok", "Arkadaş Türkçe Sözlük", "五南國語活用辭典", "Oxford Thesaurus of English", "Oxford Dictionary of English", "พจนานุกรมไทย ฉบับทันสมัยและสมบูรณ์", "スーパー大辞林", "राजपाल हिन्दी शब्दकोश", "Duden-Wissensnetz deutsche Sprache", "Multidictionnaire de la langue française", "现代汉语规范词典", "Prisma woordenboek Nederlands", "Dicionário de Português licenciado para Oxford University Press", "New Oxford American Dictionary", "ウィズダム英和辞典 / ウィズダム和英辞典", "NE Ordbok", "Толковый словарь русского языка", "Apple用語辞典", "Diccionario General de la Lengua Española Vox", "뉴에이스 국어사전", "Politikens Nudansk Ordbog", "TTY Dictionary", "Prisma Handwoordenboek Engels", "Dizionario italiano da un affiliato di Oxford University Press", "Wikipedia", "Oxford Paravia Il Dizionario inglese – italiano/italiano – inglese", "Oxford German Dictionary", "Oxford-Hachette French Dictionary", "Oxford Russian Dictionary – Русско-Английский • Англо-Русский", "Oxford American Writer’s Thesaurus", "Oxford Portuguese Dictionary – Português-Inglês • Inglês-Português", "牛津英汉汉英词典", "뉴에이스 영한사전 / 뉴에이스 한영사전"}

★Click Here to Open This Script 

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

ASOCで辞書検索じっけん

Posted on 2月 7, 2018 by Takaaki Naganoya

–> dictKit.framework

AppleScript名:ASOCで辞書検索じっけん
— Created 2015-10-22 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "dictKit" –https://github.com/mattt/DictionaryKit

set aDictionary to current application’s TTTDictionary’s dictionaryNamed:"Apple用語辞典" –macOS 10.12で"Apple 用語辞典"から"Apple用語辞典"に名称が変更された
set dRes to aDictionary’s |name|()
set dRes to dRes as text
–>  "Apple 用語辞典"

set aTerm to "AppleScript"
set hitEntryList to (aDictionary’s entriesForSearchTerm:aTerm) as list
if hitEntryList = {missing value} then return "" –ヒットしなかった場合

repeat with i in hitEntryList
  set j to contents of i
  
  
set headW to (j’s headword)
  
set headW to headW as text
  
–>  "AppleScript"
  
  
set aText to (j’s |text|)
  
set aText to aText as text
  
(*)
  –>  "AppleScript
OS X に内蔵されたスクリプト言語です。AppleScript 言語のコマンドを使用すれば、“メール”、Safari、“カレンダー”など、さまざまなアプリケーションで繰り返しの作業や複雑な作業を自動化できます。
*)

  
end repeat

★Click Here to Open This Script 

Posted in System | Tagged 10.11savvy 10.12savvy 10.13savvy Dictionary | 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

RSSをダウンロードしてparseする(XmlToDictKit)

Posted on 2月 7, 2018 by Takaaki Naganoya

–> XmlToDictKit.framework

AppleScript名:RSSをダウンロードしてparseする(XmlToDictKit)
— Created 2016-11-05 by Takaaki Naganoya
— 2016 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "XmlToDictKit" –https://github.com/nicklockwood/XMLDictionary

set aURL to current application’s |NSURL|’s alloc()’s initWithString:"http://piyocast.com/as/feed/"
set xmlString to current application’s NSString’s alloc()’s initWithContentsOfURL:aURL encoding:(current application’s NSUTF8StringEncoding) |error|:(missing value)
if xmlString = missing value then return false
set xmlDoc to (current application’s NSDictionary’s dictionaryWithXMLString:xmlString)

set blogTitle to (xmlDoc’s valueForKeyPath:"channel.title") as string
–>  "AppleScirpt Hole"

–タイトル一覧を取得する
set titleList to (xmlDoc’s valueForKeyPath:"channel.item.title") as list
–>  {"XmlToDictKitでBlogのRSS情報を解析", "listのrecordをplistにserializeして、plistをde-serializeする", "Listのrecordをエンコーディングしてplist文字列にする", "serializeされたlistのrecordからKeynoteで新規ドキュメントを作成してグラフを作成", "system_profilerの結果のstringのplistをdictionaryにのコピー2", "XPathQuery4ObjCのじっけん2", "recordをXMLに v2", "XmlToDictKitでXMLをDictionaryに(remote file)", "XmlToDictKitでXMLをDictionaryに(local file)", "XMLをrecordにv2"}

–URL一覧を返す
set urlList to (xmlDoc’s valueForKeyPath:"channel.item.link") as list
–>  {"http://piyocast.com/as/archives/814", "http://piyocast.com/as/archives/812", "http://piyocast.com/as/archives/810", "http://piyocast.com/as/archives/805", "http://piyocast.com/as/archives/803", "http://piyocast.com/as/archives/799", "http://piyocast.com/as/archives/797", "http://piyocast.com/as/archives/792", "http://piyocast.com/as/archives/790", "http://piyocast.com/as/archives/788"}

–本文のプレビュー一覧
set descList to (xmlDoc’s valueForKeyPath:"channel.item.description") as list
(*
{"AppleScript名:XmlToDictKitでBlogのRSS情報を解析 &#8212; Created 2016-11-05 by Takaaki Naganoya&#8212; 2016 Piyomaru S &#8230; <a href=\"http://piyocast.com/as/archives/814\" class=\"more-link\"><span class=\"screen-reader-text\">\"XmlToDictKitでBlogのRSS情報を解析\"の</span>続きを読む</a>", ….
*)

–更新日時の一覧
set descList to (xmlDoc’s valueForKeyPath:"channel.item.pubDate") as list
–>  {"Wed, 07 Feb 2018 08:00:53 +0000", "Wed, 07 Feb 2018 07:58:06 +0000", "Wed, 07 Feb 2018 07:55:12 +0000", "Wed, 07 Feb 2018 07:50:07 +0000", "Wed, 07 Feb 2018 07:28:10 +0000", "Wed, 07 Feb 2018 07:23:45 +0000", "Wed, 07 Feb 2018 07:23:04 +0000", "Wed, 07 Feb 2018 07:20:21 +0000", "Wed, 07 Feb 2018 07:20:13 +0000", "Wed, 07 Feb 2018 07:11:33 +0000"}

★Click Here to Open This Script 

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

XmlToDictKitでBlogのRSS情報を解析

Posted on 2月 7, 2018 by Takaaki Naganoya

–> XmlToDictKit.framework

AppleScript名:XmlToDictKitでBlogのRSS情報を解析
— Created 2016-11-05 by Takaaki Naganoya
— 2016 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "XmlToDictKit" –https://github.com/nicklockwood/XMLDictionary

set aURL to "http://piyocast.com/as/feed/"
set xRes to getLatestBlogInfo(aURL) of me

on getLatestBlogInfo(aURLstring)
  set aURL to current application’s |NSURL|’s alloc()’s initWithString:aURLstring
  
set xmlString to current application’s NSString’s alloc()’s initWithContentsOfURL:aURL encoding:(current application’s NSUTF8StringEncoding) |error|:(missing value)
  
if xmlString = missing value then return false
  
set xmlDoc to (current application’s NSDictionary’s dictionaryWithXMLString:xmlString)
  
  
set blogTitle to (xmlDoc’s valueForKeyPath:"channel.title") as string
  
–>  "AS Hole(AppleScriptの穴) By Piyomaru Software"
  
  
set titleList to (xmlDoc’s valueForKeyPath:"channel.item.title") as list –タイトル一覧
  
set urlList to (xmlDoc’s valueForKeyPath:"channel.item.link") as list –URL一覧
  
set descList to (xmlDoc’s valueForKeyPath:"channel.item.description") as list –本文のプレビュー一覧
  
set updateList to (xmlDoc’s valueForKeyPath:"channel.item.pubDate") as list –更新日時の一覧
  
  
return {first item of titleList, first item of urlList, first item of descList}
end getLatestBlogInfo

★Click Here to Open This Script 

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

listのrecordをplistにserializeして、plistをde-serializeする

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:listのrecordをplistにserializeして、plistをde-serializeする
— Created 2016-10-30 by Takaaki Naganoya
— Modified 2016-10-31 by Shane Stanley
— 2016 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aList to {{theName:"サウンドトラック", numberOfTimes:1721}, {theName:"ロック", numberOfTimes:942}, {theName:"クラシック", numberOfTimes:539}, {theName:"ポップ", numberOfTimes:492}, {theName:"J-Pop", numberOfTimes:352}, {theName:"アニメ", numberOfTimes:330}, {theName:"Pop", numberOfTimes:279}, {theName:"World", numberOfTimes:218}, {theName:"Soundtrack", numberOfTimes:188}, {theName:"ジャズ", numberOfTimes:187}, {theName:"エレクトロニック", numberOfTimes:166}, {theName:"Classical", numberOfTimes:165}, {theName:"Rock", numberOfTimes:148}, {theName:"R&B", numberOfTimes:125}, {theName:"ニューエイジ", numberOfTimes:104}, {theName:"Unclassifiable", numberOfTimes:81}, {theName:"Children’s", numberOfTimes:57}, {theName:"歌謡曲", numberOfTimes:47}, {theName:"Holiday", numberOfTimes:38}, {theName:"オルタナティブ", numberOfTimes:34}, {theName:"Data", numberOfTimes:32}, {theName:"イージーリスニング", numberOfTimes:31}, {theName:"ヴォーカル", numberOfTimes:28}, {theName:"ワールド", numberOfTimes:28}, {theName:"soundtrack", numberOfTimes:19}, {theName:"ディズニー", numberOfTimes:15}, {theName:"シンガーソングライター", numberOfTimes:15}, {theName:"ブルース", numberOfTimes:15}, {theName:"Easy Listening", numberOfTimes:14}, {theName:"ラテン", numberOfTimes:14}, {theName:"Electronica/Dance", numberOfTimes:14}, {theName:"Anime", numberOfTimes:13}, {theName:"フォーク", numberOfTimes:10}, {theName:"J-POP", numberOfTimes:9}, {theName:"New Age", numberOfTimes:9}, {theName:"ダンス", numberOfTimes:5}, {theName:"ホリデー", numberOfTimes:5}, {theName:"カントリー", numberOfTimes:4}, {theName:"演歌", numberOfTimes:4}, {theName:"Latin", numberOfTimes:3}, {theName:"ヒップホップ/ラップ", numberOfTimes:3}, {theName:"Vocal", numberOfTimes:2}, {theName:"R&B/ソウル", numberOfTimes:2}, {theName:"R&B/ソウル", numberOfTimes:2}, {theName:"#NIPPONSEI @ IRC.MIRCX.COM", numberOfTimes:2}, {theName:"148", numberOfTimes:1}, {theName:"Electronic", numberOfTimes:1}, {theName:"Folk", numberOfTimes:1}, {theName:"NHK FM(東京)", numberOfTimes:1}, {theName:"その他", numberOfTimes:1}, {theName:"チルドレン・ミュージック", numberOfTimes:1}, {theName:"Seattle Pacific University – Latin", numberOfTimes:1}, {theName:"Kayokyoku", numberOfTimes:1}, {theName:"ヒップホップ/ ラップ", numberOfTimes:1}, {theName:"Dance", numberOfTimes:1}, {theName:"インストゥルメンタル", numberOfTimes:1}, {theName:"146", numberOfTimes:1}}

set aRes to serializeToPlistString(aList) of me
–>"<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"><plist version=\"1.0\"><array><dict><key>numberOfTimes</key><integer>1721</integer><key>theName</key><string>サウンドトラック</string></dict>….

set bRes to (deserializeToPlistString(aRes) of me) as list
–>  {​​​​​{​​​​​​​numberOfTimes:1721, ​​​​​​​theName:"Sound Track"​​​​​}, ​​​​​{​​​​​​​numberOfTimes:942, ​​​​​​​theName:"Rock"​​​​​}​​​}

–list or record –> XML-format plist string
on serializeToPlistString(aList as {list, record})
  set pListData to current application’s NSPropertyListSerialization’s dataWithPropertyList:aList |format|:(current application’s NSPropertyListXMLFormat_v1_0) options:0 |error|:(missing value)
  
set bStr to (current application’s NSString’s alloc()’s initWithData:pListData encoding:(current application’s NSUTF8StringEncoding)) as string
  
return bStr
end serializeToPlistString

–XML-format plist string–> list or record
on deserializeToPlistString(aStr as string)
  set deStr to current application’s NSString’s stringWithString:aStr
  
set theData to deStr’s dataUsingEncoding:(current application’s NSUTF8StringEncoding)
  
set aList to current application’s NSPropertyListSerialization’s propertyListWithData:theData options:(current application’s NSPropertyListMutableContainersAndLeaves) |format|:(missing value) |error|:(missing value)
  
return aList
end deserializeToPlistString

★Click Here to Open This Script 

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

Listのrecordをエンコーディングしてplist文字列にする

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:Listのrecordをエンコーディングしてplist文字列にする
— Created 2016-10-30 by Takaaki Naganoya
— 2016 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
–http://piyocast.com/as/archives/4295

set aList to {{theName:"サウンドトラック", numberOfTimes:1721}, {theName:"ロック", numberOfTimes:942}}

–2D Arrayをplistの文字列にエンコードする
set anArray to current application’s NSArray’s arrayWithObject:aList
set pListData to current application’s NSPropertyListSerialization’s dataFromPropertyList:anArray |format|:(current application’s NSPropertyListXMLFormat_v1_0) errorDescription:(missing value)
set bStr to (current application’s NSString’s alloc()’s initWithData:pListData encoding:(current application’s NSUTF8StringEncoding)) as string

(*
–>  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\">
<array>
  <array>
    <dict>
      <key>numberOfTimes</key>
      <integer>1721</integer>
      <key>theName</key>
      <string>サウンドトラック</string>
    </dict>
    <dict>
      <key>numberOfTimes</key>
      <integer>942</integer>
      <key>theName</key>
      <string>ロック</string>
    </dict>
  </array>
</array>
</plist>
"
*)

★Click Here to Open This Script 

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

serializeされたlistのrecordからKeynoteで新規ドキュメントを作成してグラフを作成

Posted on 2月 7, 2018 by Takaaki Naganoya

AppleScript名:serializeされたlistのrecordからKeynoteで新規ドキュメントを作成してグラフを作成
— Created 2016-10-31 by Takaaki Naganoya
— 2016 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set selData to retSerializedData() of me
set aList to (deserializeToPlistString(selData) of me) as list
set aLen to length of aList
if aLen > 10 then
  set bList to items 1 thru 10 of aList
else
  copy aList to bList
end if

makeKeynoteGraph(bList, "自分のiTunesライブラリ中のジャンル内訳") of me

on makeKeynoteGraph(bList, aTitle)
  set labelList to {}
  
set dataList to {}
  
  
repeat with i from 1 to (length of bList)
    set the end of labelList to contents of theName of (item i of bList)
    
set the end of dataList to contents of numberOfTimes of (item i of bList)
  end repeat
  
  
set targWidth to 500
  
set targHeight to 500
  
  
tell application "Keynote"
    activate
    
set thisDocument to make new document with properties {height:764, width:1024, document theme:theme "ホワイト"}
    
    
tell thisDocument
      
      
set aHeight to height
      
set aWidth to width
      
      
tell slide 1
        set base slide to master slide "タイトル(上)" of thisDocument
        
set object text of default title item to aTitle
        
        
tell default title item
          set height to 80
        end tell
        
        (
add chart row names {"ROW A"} column names labelList data {dataList} type pie_2d group by chart column)
        
        
tell chart 1
          
          
set width to targWidth
          
set height to targHeight
          
          
set position to {(aWidth / 2) – (targWidth / 2), (aHeight / 2) – (targHeight / 2) + 20}
          
        end tell
        
      end tell
    end tell
  end tell
end makeKeynoteGraph

on retSerializedData()
  return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\">
<array>
  <dict>
    <key>numberOfTimes</key>
    <integer>1721</integer>
    <key>theName</key>
    <string>サウンドトラック</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>942</integer>
    <key>theName</key>
    <string>ロック</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>539</integer>
    <key>theName</key>
    <string>クラシック</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>492</integer>
    <key>theName</key>
    <string>ポップ</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>352</integer>
    <key>theName</key>
    <string>J-Pop</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>330</integer>
    <key>theName</key>
    <string>アニメ</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>279</integer>
    <key>theName</key>
    <string>Pop</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>218</integer>
    <key>theName</key>
    <string>World</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>188</integer>
    <key>theName</key>
    <string>Soundtrack</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>187</integer>
    <key>theName</key>
    <string>ジャズ</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>166</integer>
    <key>theName</key>
    <string>エレクトロニック</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>165</integer>
    <key>theName</key>
    <string>Classical</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>148</integer>
    <key>theName</key>
    <string>Rock</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>125</integer>
    <key>theName</key>
    <string>R&amp;B</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>104</integer>
    <key>theName</key>
    <string>ニューエイジ</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>81</integer>
    <key>theName</key>
    <string>Unclassifiable</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>57</integer>
    <key>theName</key>
    <string>Children’s</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>47</integer>
    <key>theName</key>
    <string>歌謡曲</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>38</integer>
    <key>theName</key>
    <string>Holiday</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>34</integer>
    <key>theName</key>
    <string>オルタナティブ</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>32</integer>
    <key>theName</key>
    <string>Data</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>31</integer>
    <key>theName</key>
    <string>イージーリスニング</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>28</integer>
    <key>theName</key>
    <string>ヴォーカル</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>28</integer>
    <key>theName</key>
    <string>ワールド</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>19</integer>
    <key>theName</key>
    <string>soundtrack</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>15</integer>
    <key>theName</key>
    <string>ディズニー</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>15</integer>
    <key>theName</key>
    <string>シンガーソングライター</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>15</integer>
    <key>theName</key>
    <string>ブルース</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>14</integer>
    <key>theName</key>
    <string>Easy Listening</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>14</integer>
    <key>theName</key>
    <string>ラテン</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>14</integer>
    <key>theName</key>
    <string>Electronica/Dance</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>13</integer>
    <key>theName</key>
    <string>Anime</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>10</integer>
    <key>theName</key>
    <string>フォーク</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>9</integer>
    <key>theName</key>
    <string>J-POP</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>9</integer>
    <key>theName</key>
    <string>New Age</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>5</integer>
    <key>theName</key>
    <string>ダンス</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>5</integer>
    <key>theName</key>
    <string>ホリデー</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>4</integer>
    <key>theName</key>
    <string>カントリー</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>4</integer>
    <key>theName</key>
    <string>演歌</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>3</integer>
    <key>theName</key>
    <string>Latin</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>3</integer>
    <key>theName</key>
    <string>ヒップホップ/ラップ</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>2</integer>
    <key>theName</key>
    <string>Vocal</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>2</integer>
    <key>theName</key>
    <string>R&amp;B/ソウル</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>2</integer>
    <key>theName</key>
    <string>R&amp;B/ソウル</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>2</integer>
    <key>theName</key>
    <string>#NIPPONSEI @ IRC.MIRCX.COM</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>1</integer>
    <key>theName</key>
    <string>148</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>1</integer>
    <key>theName</key>
    <string>Electronic</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>1</integer>
    <key>theName</key>
    <string>Folk</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>1</integer>
    <key>theName</key>
    <string>NHK FM(東京)</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>1</integer>
    <key>theName</key>
    <string>その他</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>1</integer>
    <key>theName</key>
    <string>チルドレン・ミュージック</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>1</integer>
    <key>theName</key>
    <string>Seattle Pacific University – Latin</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>1</integer>
    <key>theName</key>
    <string>Kayokyoku</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>1</integer>
    <key>theName</key>
    <string>ヒップホップ/ ラップ</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>1</integer>
    <key>theName</key>
    <string>Dance</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>1</integer>
    <key>theName</key>
    <string>インストゥルメンタル</string>
  </dict>
  <dict>
    <key>numberOfTimes</key>
    <integer>1</integer>
    <key>theName</key>
    <string>146</string>
  </dict>
</array>
</plist>
"

  
end retSerializedData

–list or record –> XML-format plist string
on serializeToPlistString(aList as {list, record})
  set pListData to current application’s NSPropertyListSerialization’s dataWithPropertyList:aList |format|:(current application’s NSPropertyListXMLFormat_v1_0) options:0 |error|:(missing value)
  
set bStr to (current application’s NSString’s alloc()’s initWithData:pListData encoding:(current application’s NSUTF8StringEncoding)) as string
  
return bStr
end serializeToPlistString

–XML-format plist string–> list or record
on deserializeToPlistString(aStr as string)
  set deStr to current application’s NSString’s stringWithString:aStr
  
set theData to deStr’s dataUsingEncoding:(current application’s NSUTF8StringEncoding)
  
set aList to current application’s NSPropertyListSerialization’s propertyListWithData:theData options:(current application’s NSPropertyListMutableContainersAndLeaves) |format|:(missing value) |error|:(missing value)
  
return aList
end deserializeToPlistString

★Click Here to Open This Script 

Keynote Control 1

Keynote Control 2

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

system_profilerの結果のstringのplistをdictionaryにのコピー2

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:system_profilerの結果のstringのplistをdictionaryにのコピー2
— Created 2015-11-01 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aTargKey to "machine_name"
set aTargGenre to "SPHardwareDataType"

set macRes to getSystemProfileInAGenre(aTargGenre, aTargKey) of me
–>  "MacBook Pro"

on getSystemProfileInAGenre(aTargGenre, aTargKey)
  set sRes to do shell script ("/usr/sbin/system_profiler -xml " & aTargGenre)
  
set aSource to (my readPlistFromStr:sRes) as list
  
set aaList to contents of first item of aSource
  
  
set aList to _items of aaList
  
repeat with i in aList
    set aDict to (current application’s NSMutableDictionary’s dictionaryWithDictionary:(contents of i))
    
set aKeyList to (aDict’s allKeys()) as list
    
if aTargKey is in aKeyList then
      set aRes to (aDict’s valueForKeyPath:aTargKey)
      
if aRes is not equal to missing value then
        return aRes as string
      end if
    end if
  end repeat
  
  
return false
end getSystemProfileInAGenre

–stringのplistを読み込んでRecordに
on readPlistFromStr:theString
  set aSource to current application’s NSString’s stringWithString:theString
  
set pListData to aSource’s dataUsingEncoding:(current application’s NSUTF8StringEncoding)
  
set aPlist to current application’s NSPropertyListSerialization’s propertyListFromData:pListData mutabilityOption:(current application’s NSPropertyListImmutable) |format|:(current application’s NSPropertyListFormat) errorDescription:(missing value)
  
return aPlist
end readPlistFromStr:

★Click Here to Open This Script 

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

XPathQuery4ObjCのじっけん2

Posted on 2月 7, 2018 by Takaaki Naganoya

XMLに対して、オープンソースの「XPathQuery4ObjC」を用いてXPathを指定してXML内の要素にアクセスするAppleScriptです。

XMLに対してXpathを指定してアクセスする道具はいろいろあります。

Syetem Eventsを使ってXMLにアクセスする方法、XMLLib OSAX、オープンソースのObjective-CのプログラムをCocoa Framework化したもの、etc。

ただ、macOS 10.14でOSAXが事実上使えなくなったことを考えると、OSAXによるAppleScriptの予約語拡張は得策ではありません。System Eventsも1つの解決策ではありますが、XPathが使えないのでほとんど使いません。

こうしたObjective-Cで記述されたプログラムをAppleScriptから呼び出すのが、現状でもっとも効率のよい解決策です。各プログラムはだいたいにおいて挙動が異なり、XMLの構造も一様ではありません。複数のプログラムをためして、対象のXMLを思い通りに処理できるか、総当たりで確認しています。

–> XPathQueryKit.framework

AppleScript名:XPathQuery4ObjCのじっけん2
— Created 2017-01-05 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "XPathQueryKit"
–https://github.com/cybergarage/XPathQuery4ObjC
–http://piyocast.com/as/archives/4376

set rssURL to current application’s |NSURL|’s URLWithString:"http://piyocast.com/as/feed"
set xpathQuery to current application’s CGXPathQuery’s alloc()’s initWithContentsOfURL:rssURL

if ((xpathQuery’s parse()) as boolean) = true then
  set entriesList to xpathQuery’s objectsForXPath:"/rss/channel/item"
  
  
repeat with itemObject in entriesList
    set aChild to itemObject’s children()
    
log aChild
    
    
set aTitle to (itemObject’s valueForXPath:"title")
    
log aTitle as string
    
    
set aLink to (itemObject’s valueForXPath:"link")
    
log aLink as string
    
    
set aComments to (itemObject’s valueForXPath:"comments")
    
log aComments as string
    
    
set aPubdate to (itemObject’s valueForXPath:"pubDate")
    
log aPubdate as string
    
    
set aCreator to (itemObject’s valueForXPath:"dc:creator")
    
log aCreator as string
    
    
set aCategory to (itemObject’s valuesForXPath:"category")
    
log aCategory as list
    
    
set aGUID to (itemObject’s valuesForXPath:"guid")
    
log aGUID as string
    
    
set aDesc to (itemObject’s valueForXPath:"description")
    
log aDesc as string
    
    
set aCommentURL to (itemObject’s valueForXPath:"wfw:commentRss")
    
log aCommentURL as string
  end repeat
  
end if

★Click Here to Open This Script 

Posted in Record | Tagged 10.11savvy 10.12savvy 10.13savvy | 1 Comment

Post navigation

  • Older posts
  • Newer posts

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

Google Search

Popular posts

  • 開発機としてM2 Mac miniが来たのでガチレビュー
  • macOS 15, Sequoia
  • 指定のWordファイルをPDFに書き出す
  • Pages本執筆中に、2つの書類モード切り替えに気がついた
  • Numbersで選択範囲のセルの前後の空白を削除
  • メキシカンハットの描画
  • Pixelmator Pro v3.6.4でAppleScriptからの操作時の挙動に違和感が
  • AdobeがInDesign v19.4からPOSIX pathを採用
  • AppleScriptによる並列処理
  • Safariで「プロファイル」機能を使うとAppleScriptの処理に影響
  • Cocoa Scripting Course 続刊計画
  • macOS 14.xでScript Menuの実行速度が大幅に下がるバグ
  • AppleScript入門③AppleScriptを使った「自動化」とは?
  • Keynote/Pagesで選択中の表カラムの幅を均等割
  • macOS 15でも変化したText to Speech環境
  • デフォルトインストールされたフォント名を取得するAppleScript
  • macOS 15 リモートApple Eventsにバグ?
  • AppleScript入門① AppleScriptってなんだろう?
  • macOS 14で変更になったOSバージョン取得APIの返り値
  • Numbersで最前面の書類のすべてのシート上の表の行数を合計

Tags

10.11savvy (1101) 10.12savvy (1242) 10.13savvy (1391) 10.14savvy (587) 10.15savvy (438) 11.0savvy (283) 12.0savvy (212) 13.0savvy (194) 14.0savvy (147) 15.0savvy (132) CotEditor (66) Finder (51) iTunes (19) Keynote (117) 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 (76) Pages (55) 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
  • date
  • 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年5月
  • 2025年4月
  • 2025年3月
  • 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