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

なんでもデータを文字列化 v2

Posted on 2月 7, 2018 by Takaaki Naganoya

数値でもリストでもレコードでもなんでも文字列化するAppleScriptです。

大規模なシステムを作っているときに、ログに詳細なデータを書き込む必要があって、その入り組んだrecordから各種要素を取り出すのが嫌だったので、「そのまま文字列化してしまえ」と考えて作成したものです。

エラートラップを仕掛けてわざとエラーを発生させ、エラーメッセージに表記されているデータを加工して出力するというトリッキーかつやけっぱちな処理内容ですが、たしかに動作し、日本語以外の言語環境でもきちんと動くためひそかに利用されている処理です。

ただし、本ルーチンではアプリケーションのオブジェクトを含むデータの文字列化が行えないので、のちになって作成したOSAScriptControllerで実際にAppleScriptを実行して結果をすべて文字列で取得するようなタイプのものに入れ替えています。

AppleScript名:なんでもデータを文字列化 v2
set a to {{aName:"PiyoPiyo", anAge:10}, {aName:"Piyoko", anAge:9}} –record in list
–set a to {aName:"PiyoPiyo", anAge:10}–record
–set a to {{1, 2, 3}, {4, 5, 6}}–list
–set a to 1.0 as real–real
–set a to 1 as integer–integer
–set a to "1.0" as string–string
–set a to true–boolean
–set a to front window of application "Finder"–アプリケーションのオブジェクトはエラーになるよ!
–set a to missing value

set aRes to convToStr(a) of somethingToStrKit
–> "{{aName:\"PiyoPiyo\", anAge:10}, {aName:\"Piyoko\", anAge:9}}"

–リストでもレコードでもなんでも文字列化して返すキット
script somethingToStrKit
  
  
on convToStr(aRec)
    
    
set aClass to (class of aRec) as string
    
    
if (aClass = "integer") or (aClass = "number") or (aClass = "real") or (aClass = "string") or (aClass = "text") or (aClass = "Unicode text") or (aClass = "boolean") then
      set aRes to aRec as string
    else if aClass is "list" then
      set aRes to listToString(aRec)
    else if aClass is "record" then
      set aRes to recToString(aRec)
    else
      try
        set aRes to aRec as string
      on error
        –アプリケーションのオブジェクトとかはエラーで返す
        
return false
      end try
    end if
    
    
return aRes
    
  end convToStr
  
  
  
–レコードをStringに変換
  
  
–エラートラップを使って、わざとエラーを発生させ、エラーメッセージからレコードをstringに変換する
  
on recToString(aRec)
    
    
–レコードを無理矢理stringにcastして、エラーメッセージを取得する
    
try
      set a to aRec as string –ここでエラー発生
    on error aMes
      set a to aMes
    end try
    
    
–エラーメッセージ文字列から、元のレコードの情報を組み立てる
    
set b to trimStrFromTo(a, "{", "}")
    
set b to "{" & b & "}"
    
    
return b
    
  end recToString
  
  
  
on trimStrFromTo(aStr, fromStr, toStr)
    –fromStrは前から探す
    
if fromStr is not equal to "" then
      set sPos to (offset of fromStr in aStr) + 1
    else
      set sPos to 1
    end if
    
    
–toStrは後ろから探す
    
if toStr is not equal to "" then
      set b to (reverse of characters of aStr) as string
      
set ePos to (offset of toStr in b)
      
set ePos to ((length of aStr) – ePos)
    else
      set ePos to length of aStr
    end if
    
set aRes to text sPos thru ePos of aStr
    
    
return aRes
    
  end trimStrFromTo
  
  
  
–リストおよびリストに入ったレコードをStringに変換
  
  
on listToString(aList)
    set listText to {"{"}
    
set quotChar to ASCII character 34
    
set firstFlag to true
    
    
repeat with i in aList
      set j to contents of i
      
set aClass to (class of i) as string
      
if (aClass = "integer") or (aClass = "number") or (aClass = "real") then
        set the end of listText to (getFirst(firstFlag) of me & j as text)
        
set firstFlag to false
      else if (aClass = "string") or (aClass = "text") or (aClass = "Unicode text") then
        set the end of listText to ((getFirst(firstFlag) of me & quotChar & j as text) & quotChar)
        
set firstFlag to false
      else if aClass is "list" then
        set the end of listText to (getFirst(firstFlag) & listToString(j)) –ちょっと再帰処理
        
set firstFlag to false
      else if aClass is "record" then
        set the end of listText to (getFirst(firstFlag) & recToString(j))
        
set firstFlag to false
      end if
    end repeat
    
    
set the end of listText to "}"
    
set listText to listText as text
    
    
return listText
  end listToString
  
  
on getFirst(aFlag)
    if aFlag = true then return ""
    
if aFlag = false then return ", "
  end getFirst
  
end script

★Click Here to Open This Script 

Posted in list Record Text | Tagged 10.11savvy 10.12savvy 10.13savvy | 2 Comments

asoc_レコードのリストをソート

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:asoc_レコードのリストをソート
— Created 2017-05-22 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aList to {{theWord:"英国", retweetCount:0}, {theWord:"新潟記念", retweetCount:0}, {theWord:"一時的", retweetCount:0}, {theWord:"原宿", retweetCount:0}, {theWord:"経常収支", retweetCount:0}, {theWord:"板倉", retweetCount:0}, {theWord:"格安スマホ", retweetCount:0}, {theWord:"Wikileaks", retweetCount:0}, {theWord:"ジャニーズ事務所", retweetCount:0}, {theWord:"日産", retweetCount:0}, {theWord:"あずきバー", retweetCount:0}, {theWord:"海南省", retweetCount:0}, {theWord:"海外市場", retweetCount:0}, {theWord:"亀田劇場", retweetCount:0}, {theWord:"東芝", retweetCount:0}, {theWord:"南シナ海", retweetCount:0}, {theWord:"光害", retweetCount:0}, {theWord:"債務不履行", retweetCount:0}, {theWord:"BR", retweetCount:0}, {theWord:"大リーグ", retweetCount:0}, {theWord:"イスラム", retweetCount:0}, {theWord:"未来", retweetCount:0}, {theWord:"インプラント", retweetCount:0}, {theWord:"リーバイス", retweetCount:0}, {theWord:"スマホ", retweetCount:0}, {theWord:"ジル", retweetCount:0}, {theWord:"G7", retweetCount:0}, {theWord:"貿易統計", retweetCount:0}, {theWord:"宮崎県", retweetCount:0}, {theWord:"新基準", retweetCount:0}, {theWord:"福岡三越", retweetCount:0}, {theWord:"Croiseur Milan", retweetCount:0}, {theWord:"リスクオン", retweetCount:0}, {theWord:"異常接近", retweetCount:0}, {theWord:"キャッシング", retweetCount:0}, {theWord:"キレイだ", retweetCount:0}, {theWord:"HD", retweetCount:0}, {theWord:"高校野球", retweetCount:0}, {theWord:"田母神俊雄", retweetCount:0}, {theWord:"2月", retweetCount:0}, {theWord:"本田圭佑", retweetCount:0}, {theWord:"工藤静香", retweetCount:0}, {theWord:"大久保", retweetCount:0}, {theWord:"山東", retweetCount:0}, {theWord:"生中継", retweetCount:0}, {theWord:"有田哲平", retweetCount:0}, {theWord:"ジカ熱", retweetCount:0}, {theWord:"11月26日", retweetCount:0}, {theWord:"事実上", retweetCount:0}, {theWord:"英語表記", retweetCount:0}, {theWord:"文句なし", retweetCount:0}, {theWord:"糖質制限", retweetCount:0}, {theWord:"ベン", retweetCount:0}, {theWord:"監視社会", retweetCount:0}, {theWord:"三原じゅん子", retweetCount:0}, {theWord:"週刊ダイヤモンド", retweetCount:0}, {theWord:"スウェーデン", retweetCount:0}, {theWord:"赤ちゃんポスト", retweetCount:0}, {theWord:"20歳", retweetCount:0}, {theWord:"見聞録", retweetCount:0}, {theWord:"運動員", retweetCount:0}, {theWord:"liverty", retweetCount:0}, {theWord:"民進党", retweetCount:0}, {theWord:"ケー・エフ・シー", retweetCount:0}, {theWord:"ロシア当局", retweetCount:0}, {theWord:"拡張現実", retweetCount:0}, {theWord:"キスショット", retweetCount:0}, {theWord:"に学ぶ", retweetCount:0}, {theWord:"ASCII", retweetCount:0}, {theWord:"FOMC", retweetCount:0}, {theWord:"機関投資家", retweetCount:0}, {theWord:"労働法", retweetCount:0}, {theWord:"カンヌ映画祭", retweetCount:0}, {theWord:"賛否両論", retweetCount:0}, {theWord:"ユキ", retweetCount:0}, {theWord:"サウジ", retweetCount:0}, {theWord:"スカイツリー", retweetCount:0}, {theWord:"アリゲーターガー", retweetCount:0}, {theWord:"オフィスワーク", retweetCount:0}, {theWord:"アフガン", retweetCount:0}, {theWord:"北九州", retweetCount:0}, {theWord:"キリスト", retweetCount:0}, {theWord:"利上げ観測", retweetCount:0}, {theWord:"渋谷", retweetCount:0}, {theWord:"カナダ", retweetCount:0}, {theWord:"京大", retweetCount:0}, {theWord:"侵略者", retweetCount:0}, {theWord:"夏季五輪", retweetCount:0}, {theWord:"乾", retweetCount:0}, {theWord:"グラミー賞", retweetCount:3154}, {theWord:"トヨタショック", retweetCount:27716}, {theWord:"スペイン", retweetCount:57180}, {theWord:"ソ連崩壊", retweetCount:1028}, {theWord:"マイナス金利", retweetCount:11783}, {theWord:"Triumph", retweetCount:5955}, {theWord:"通信社", retweetCount:10379}, {theWord:"そのままで", retweetCount:8114}, {theWord:"高須", retweetCount:50330}, {theWord:"田口淳之介", retweetCount:30}, {theWord:"利下げ観測", retweetCount:0}, {theWord:"日本企業", retweetCount:109187}, {theWord:"日向夏", retweetCount:98639}, {theWord:"観光農園", retweetCount:2342}, {theWord:"ASEAN", retweetCount:267}, {theWord:"規制撤廃", retweetCount:2044}, {theWord:"国2", retweetCount:27669}, {theWord:"サラリーマン川柳", retweetCount:581}, {theWord:"株式相場", retweetCount:6}, {theWord:"ハラ", retweetCount:1010}, {theWord:"仙台", retweetCount:44049}, {theWord:"駐日大使", retweetCount:233}, {theWord:"有吉", retweetCount:267388}, {theWord:"英", retweetCount:22235}, {theWord:"一発逆転", retweetCount:2923}, {theWord:"北海道", retweetCount:8818}, {theWord:"3D", retweetCount:18976}, {theWord:"佐田建設", retweetCount:2901}, {theWord:"穏健派", retweetCount:4641}, {theWord:"聞く力", retweetCount:399}, {theWord:"火星探査機", retweetCount:1216}, {theWord:"ウォール街", retweetCount:1092}, {theWord:"Crowd Funding", retweetCount:6811}, {theWord:"赤羽", retweetCount:6874}, {theWord:"株高", retweetCount:28}, {theWord:"Pizza Hut", retweetCount:55727}, {theWord:"KAT-TUN", retweetCount:3330}, {theWord:"ドイツ", retweetCount:573124}, {theWord:"バルサ", retweetCount:4872}, {theWord:"SweetS", retweetCount:16952}, {theWord:"コミー", retweetCount:1305}, {theWord:"ご当地グルメ", retweetCount:1240}, {theWord:"アレグラ", retweetCount:0}, {theWord:"安倍首相", retweetCount:49530}, {theWord:"大腸がん", retweetCount:78}, {theWord:"業務提携", retweetCount:119}, {theWord:"米国", retweetCount:11739}, {theWord:"5日", retweetCount:18262}, {theWord:"総選挙", retweetCount:8269}, {theWord:"東武鉄道", retweetCount:963}, {theWord:"Samsung", retweetCount:20895}, {theWord:"RALPH LAUREN", retweetCount:7611}, {theWord:"ロ", retweetCount:4692}, {theWord:"ローソン", retweetCount:166787}, {theWord:"大嘘", retweetCount:8333}, {theWord:"森友", retweetCount:39699}, {theWord:"高島市", retweetCount:9868}, {theWord:"チワワ", retweetCount:9022}, {theWord:"栗原類", retweetCount:3020}, {theWord:"プラスワン", retweetCount:2299}, {theWord:"東大阪", retweetCount:5250}, {theWord:"政治学者", retweetCount:3365}, {theWord:"京", retweetCount:6701}, {theWord:"開催地", retweetCount:10018}, {theWord:"視聴率", retweetCount:20114}, {theWord:"大企業", retweetCount:11424}, {theWord:"近畿", retweetCount:4530}, {theWord:"石狩", retweetCount:145}, {theWord:"小田急", retweetCount:94364}, {theWord:"ベルーフ", retweetCount:12}, {theWord:"鉄道ジャーナル", retweetCount:970}, {theWord:"IT", retweetCount:437124}, {theWord:"公明党", retweetCount:2060}, {theWord:"表参道", retweetCount:18059}, {theWord:"経済成長", retweetCount:2257}, {theWord:"魚住りえ", retweetCount:25}, {theWord:"女子高生", retweetCount:512226}, {theWord:"野村", retweetCount:14080}, {theWord:"Google", retweetCount:1515}, {theWord:"NYダウ", retweetCount:253}, {theWord:"くりぃむ", retweetCount:5893}, {theWord:"博多", retweetCount:679890}, {theWord:"交通事故", retweetCount:3622}, {theWord:"就職四季報", retweetCount:0}, {theWord:"大統領制", retweetCount:3455}, {theWord:"トルコ", retweetCount:28673}, {theWord:"長野駅", retweetCount:11630}, {theWord:"繁華街", retweetCount:8179}, {theWord:"Deep Impact", retweetCount:10379}, {theWord:"ソニー", retweetCount:25410}, {theWord:"統一省", retweetCount:1250}, {theWord:"赤羽駅", retweetCount:9681}, {theWord:"U2", retweetCount:214}, {theWord:"日経ビジネス", retweetCount:4942}, {theWord:"日本人男性", retweetCount:6990}, {theWord:"キャサリン妃", retweetCount:1242}, {theWord:"重賞", retweetCount:670}, {theWord:"ニッポン", retweetCount:10690}, {theWord:"ブラジル", retweetCount:53316}, {theWord:"本部長", retweetCount:12333}, {theWord:"香川真司", retweetCount:28884}, {theWord:"金融市場", retweetCount:248}, {theWord:"万景峰号", retweetCount:2228}, {theWord:"W杯", retweetCount:9696}, {theWord:"北朝鮮", retweetCount:260562}, {theWord:"You Tube", retweetCount:70170}, {theWord:"橋本愛", retweetCount:4255}, {theWord:"日の丸半導体", retweetCount:464}, {theWord:"Enterprise", retweetCount:19289}, {theWord:"SNS", retweetCount:273982}, {theWord:"ヴェノム", retweetCount:18037}, {theWord:"インフレ率", retweetCount:5034}, {theWord:"アプリ", retweetCount:312863}, {theWord:"柴崎岳", retweetCount:1282}, {theWord:"独自制裁", retweetCount:1548}, {theWord:"弾道ミサイル", retweetCount:12150}, {theWord:"エジプト", retweetCount:55094}, {theWord:"日独", retweetCount:1528}, {theWord:"大分県警", retweetCount:1133}, {theWord:"ベルギー", retweetCount:29151}, {theWord:"労働組合", retweetCount:14314}, {theWord:"委員長", retweetCount:30619}, {theWord:"企業戦士", retweetCount:2749}, {theWord:"円高株安", retweetCount:18536}, {theWord:"下げ幅", retweetCount:56}, {theWord:"日本型", retweetCount:2164}, {theWord:"ペットショップ", retweetCount:7808}, {theWord:"イラン大統領", retweetCount:2817}, {theWord:"サマー2000シリーズ", retweetCount:0}, {theWord:"広尾", retweetCount:436}, {theWord:"本田翼", retweetCount:8313}, {theWord:"深読み", retweetCount:4269}, {theWord:"妖怪ウォッチ", retweetCount:5}, {theWord:"情報筋", retweetCount:7180}, {theWord:"液晶ディスプレイ", retweetCount:86}, {theWord:"ピッパ・ミドルトン", retweetCount:1255}, {theWord:"経済学", retweetCount:1208}, {theWord:"婚活", retweetCount:16789}, {theWord:"女子アナ", retweetCount:83}, {theWord:"SMAP", retweetCount:19538}, {theWord:"バフェット", retweetCount:466}, {theWord:"専門家", retweetCount:75824}, {theWord:"体験型", retweetCount:1906}, {theWord:"ラストチャンス", retweetCount:121140}, {theWord:"和歌山大", retweetCount:911}, {theWord:"通勤電車", retweetCount:3988}, {theWord:"ロス", retweetCount:1625}, {theWord:"駒の", retweetCount:515}, {theWord:"タカタ", retweetCount:36}, {theWord:"今季初", retweetCount:7164}, {theWord:"電子機器", retweetCount:585}, {theWord:"反政府デモ", retweetCount:762}, {theWord:"市場規模", retweetCount:288}, {theWord:"NY", retweetCount:377126}, {theWord:"鉄道事故", retweetCount:5084}, {theWord:"発達障害", retweetCount:46538}, {theWord:"コーセー", retweetCount:4444}, {theWord:"梅田", retweetCount:110569}, {theWord:"中国", retweetCount:69727}, {theWord:"埼玉", retweetCount:410646}, {theWord:"JR東海", retweetCount:227767}, {theWord:"雄二", retweetCount:2185}, {theWord:"不動産業", retweetCount:12112}, {theWord:"観測機", retweetCount:15345}, {theWord:"竹内結子", retweetCount:1727}, {theWord:"労基署", retweetCount:23756}, {theWord:"ホー", retweetCount:6316}, {theWord:"東洋経済オンライン", retweetCount:165}, {theWord:"EA", retweetCount:8341}, {theWord:"UZA", retweetCount:23153}, {theWord:"ロシア", retweetCount:729687}, {theWord:"環境相", retweetCount:9992}, {theWord:"過剰反応", retweetCount:381747}, {theWord:"イラン", retweetCount:9612}, {theWord:"フランス人", retweetCount:38565}, {theWord:"金融緩和", retweetCount:1261}, {theWord:"相鉄", retweetCount:1203}, {theWord:"ブレ", retweetCount:27000}, {theWord:"鑑定士", retweetCount:24350}, {theWord:"BOSS", retweetCount:273204}, {theWord:"IMF", retweetCount:0}, {theWord:"ポケ", retweetCount:0}, {theWord:"若い人", retweetCount:0}, {theWord:"準々決勝", retweetCount:0}, {theWord:"I-O DATA", retweetCount:0}, {theWord:"国際政治", retweetCount:0}, {theWord:"FRB", retweetCount:0}, {theWord:"NIKE", retweetCount:0}, {theWord:"警視庁", retweetCount:0}, {theWord:"ロイター", retweetCount:0}, {theWord:"FBI", retweetCount:0}, {theWord:"FBI", retweetCount:0}, {theWord:"エコカー", retweetCount:0}, {theWord:"働く男", retweetCount:0}, {theWord:"消費者", retweetCount:0}, {theWord:"旗艦店", retweetCount:0}, {theWord:"サービス業", retweetCount:0}, {theWord:"個人投資家", retweetCount:0}, {theWord:"エルドアン", retweetCount:0}, {theWord:"千葉テレビ", retweetCount:0}, {theWord:"首都圏", retweetCount:0}, {theWord:"蓮舫", retweetCount:0}, {theWord:"大幅続落", retweetCount:0}, {theWord:"字数制限", retweetCount:0}, {theWord:"国際テロ", retweetCount:0}, {theWord:"懐疑的", retweetCount:0}, {theWord:"日本", retweetCount:0}, {theWord:"環境省", retweetCount:0}, {theWord:"北極星", retweetCount:0}, {theWord:"カンボジア", retweetCount:0}, {theWord:"大統領選", retweetCount:0}, {theWord:"EU", retweetCount:0}, {theWord:"財務相", retweetCount:0}, {theWord:"武", retweetCount:0}, {theWord:"EV", retweetCount:0}, {theWord:"日銀", retweetCount:0}, {theWord:"DELI", retweetCount:0}, {theWord:"田母神", retweetCount:0}, {theWord:"スキー場", retweetCount:0}, {theWord:"スリーエフ", retweetCount:0}, {theWord:"創設者", retweetCount:0}, {theWord:"日本銀行", retweetCount:0}, {theWord:"政府広報", retweetCount:0}, {theWord:"米韓", retweetCount:0}, {theWord:"HONZ", retweetCount:0}, {theWord:"国交省", retweetCount:0}, {theWord:"青森山田", retweetCount:0}, {theWord:"下値余地", retweetCount:0}, {theWord:"学生野球", retweetCount:0}, {theWord:"都知事選", retweetCount:0}, {theWord:"受動喫煙", retweetCount:0}, {theWord:"体調不良", retweetCount:0}, {theWord:"バーガー", retweetCount:0}, {theWord:"2016年", retweetCount:0}, {theWord:"本田", retweetCount:0}, {theWord:"シュツットガルト", retweetCount:0}, {theWord:"日本郵政", retweetCount:0}, {theWord:"億万長者", retweetCount:0}, {theWord:"堀ちえみ", retweetCount:0}, {theWord:"近畿財務局", retweetCount:0}, {theWord:"日本株", retweetCount:0}, {theWord:"ラッカ", retweetCount:0}, {theWord:"中谷美紀", retweetCount:0}, {theWord:"ロシア経済", retweetCount:0}, {theWord:"決算説明会", retweetCount:0}, {theWord:"秋山進", retweetCount:0}, {theWord:"通勤時間", retweetCount:0}, {theWord:"三菱自", retweetCount:0}, {theWord:"マクロン", retweetCount:0}, {theWord:"バイロン・ネルソン", retweetCount:0}, {theWord:"浅香光代", retweetCount:0}, {theWord:"官房長官", retweetCount:0}, {theWord:"Halloween", retweetCount:0}, {theWord:"浅野", retweetCount:0}, {theWord:"東武", retweetCount:0}, {theWord:"ミサイル発射", retweetCount:0}, {theWord:"共同店舗", retweetCount:0}, {theWord:"西武", retweetCount:0}, {theWord:"大手私鉄", retweetCount:0}, {theWord:"食物繊維", retweetCount:0}, {theWord:"ガジェット", retweetCount:0}, {theWord:"民主党", retweetCount:0}, {theWord:"軍事衛星", retweetCount:0}, {theWord:"タカ派", retweetCount:0}, {theWord:"SIM", retweetCount:0}, {theWord:"原油価格", retweetCount:0}, {theWord:"電通", retweetCount:0}, {theWord:"早実", retweetCount:0}, {theWord:"株安", retweetCount:0}, {theWord:"共謀罪", retweetCount:0}, {theWord:"アンド", retweetCount:0}, {theWord:"芸能活動", retweetCount:0}, {theWord:"JR", retweetCount:0}, {theWord:"青山", retweetCount:0}, {theWord:"国連", retweetCount:0}, {theWord:"ウィリアム", retweetCount:0}, {theWord:"GDP", retweetCount:0}, {theWord:"南青山", retweetCount:0}, {theWord:"大阪", retweetCount:0}, {theWord:"モテる", retweetCount:0}, {theWord:"名城大", retweetCount:0}, {theWord:"新興国", retweetCount:0}, {theWord:"キキララ", retweetCount:0}, {theWord:"金", retweetCount:0}, {theWord:"旅行会社", retweetCount:0}, {theWord:"メタンハイドレート", retweetCount:0}, {theWord:"井手", retweetCount:0}, {theWord:"マクドナルド", retweetCount:0}, {theWord:"国立科学博物館", retweetCount:0}, {theWord:"バークシャー", retweetCount:0}, {theWord:"成長率", retweetCount:0}, {theWord:"松坂桃李", retweetCount:0}, {theWord:"高齢者", retweetCount:0}, {theWord:"週刊東洋経済", retweetCount:253003}, {theWord:"マイケル・コース", retweetCount:0}, {theWord:"菊地", retweetCount:0}, {theWord:"ドル円", retweetCount:0}, {theWord:"音鼓 -OTOKO-", retweetCount:0}, {theWord:"滋賀", retweetCount:0}, {theWord:"株式市場", retweetCount:0}, {theWord:"資生堂", retweetCount:0}, {theWord:"東野圭吾", retweetCount:0}, {theWord:"投資家", retweetCount:0}, {theWord:"FLYNN", retweetCount:0}, {theWord:"キーエンス", retweetCount:0}, {theWord:"小澤征爾", retweetCount:0}, {theWord:"ダルビッシュ", retweetCount:0}, {theWord:"G1", retweetCount:0}, {theWord:"自動車産業", retweetCount:0}, {theWord:"低インフレ", retweetCount:0}, {theWord:"6月", retweetCount:0}, {theWord:"G2", retweetCount:0}, {theWord:"ワケ", retweetCount:0}, {theWord:"キアヌ・リーヴス", retweetCount:0}, {theWord:"韓国", retweetCount:0}, {theWord:"KIN", retweetCount:0}, {theWord:"欧州", retweetCount:0}, {theWord:"取締役会", retweetCount:0}, {theWord:"国民投票", retweetCount:0}, {theWord:"カリフォルニア", retweetCount:0}, {theWord:"配偶者", retweetCount:0}, {theWord:"AI", retweetCount:0}, {theWord:"特別展", retweetCount:0}, {theWord:"国内政治", retweetCount:0}, {theWord:"傷物語", retweetCount:0}, {theWord:"表現の自由", retweetCount:0}, {theWord:"大西", retweetCount:0}, {theWord:"関東大会", retweetCount:0}, {theWord:"ヘッドマーク", retweetCount:0}, {theWord:"家宅捜索", retweetCount:0}, {theWord:"EU", retweetCount:0}, {theWord:"ウォーターゲート事件", retweetCount:0}, {theWord:"名古屋城", retweetCount:0}, {theWord:"金融政策", retweetCount:0}, {theWord:"ACミラン", retweetCount:0}, {theWord:"インドネシア", retweetCount:0}, {theWord:"イギリス", retweetCount:0}, {theWord:"湘南新宿ライン", retweetCount:0}, {theWord:"消費増税", retweetCount:0}, {theWord:"世論調査", retweetCount:0}, {theWord:"リアル", retweetCount:0}, {theWord:"唯夫", retweetCount:0}, {theWord:"豊", retweetCount:0}, {theWord:"可能性", retweetCount:0}, {theWord:"2015年", retweetCount:0}, {theWord:"欧州諸国", retweetCount:0}, {theWord:"AR", retweetCount:0}, {theWord:"リオ", retweetCount:0}, {theWord:"有罪判決", retweetCount:0}, {theWord:"不動産鑑定士", retweetCount:0}, {theWord:"対象外", retweetCount:0}, {theWord:"エル特急", retweetCount:0}, {theWord:"東京", retweetCount:0}, {theWord:"宅配ピザ", retweetCount:0}, {theWord:"従業員", retweetCount:0}, {theWord:"モスル", retweetCount:0}, {theWord:"札幌2歳S", retweetCount:0}, {theWord:"利用者", retweetCount:0}, {theWord:"関係悪化", retweetCount:0}, {theWord:"LinkedIn", retweetCount:0}, {theWord:"わにとかげぎす", retweetCount:0}, {theWord:"ノアの箱舟", retweetCount:0}, {theWord:"公取委", retweetCount:0}, {theWord:"イタリア", retweetCount:0}, {theWord:"ミャンマー", retweetCount:0}, {theWord:"Oracle", retweetCount:0}, {theWord:"フェンネル", retweetCount:0}, {theWord:"シリコンバレー", retweetCount:0}, {theWord:"保守穏健派", retweetCount:0}, {theWord:"ヨーロッパ", retweetCount:0}, {theWord:"リオ五輪", retweetCount:0}, {theWord:"性同一性障害", retweetCount:0}, {theWord:"国税庁", retweetCount:0}, {theWord:"自民党", retweetCount:0}, {theWord:"長澤まさみ", retweetCount:0}, {theWord:"フリーキック!", retweetCount:0}, {theWord:"江東", retweetCount:0}, {theWord:"証明書", retweetCount:0}, {theWord:"国際エネルギー機関", retweetCount:0}, {theWord:"独", retweetCount:0}, {theWord:"Web", retweetCount:0}, {theWord:"ロハニ", retweetCount:0}, {theWord:"経営者", retweetCount:0}, {theWord:"シャラポワ", retweetCount:0}, {theWord:"喫煙者", retweetCount:0}, {theWord:"自民", retweetCount:0}, {theWord:"清宮", retweetCount:0}, {theWord:"Fess", retweetCount:0}, {theWord:"再生可能エネルギー", retweetCount:0}, {theWord:"回復の兆し", retweetCount:0}, {theWord:"野田稔", retweetCount:0}, {theWord:"依存症", retweetCount:0}, {theWord:"バブル期", retweetCount:0}, {theWord:"評価額", retweetCount:0}, {theWord:"ロッキード", retweetCount:0}, {theWord:"強硬派", retweetCount:0}, {theWord:"ボランチ", retweetCount:0}, {theWord:"下院", retweetCount:0}, {theWord:"サウジアラビア", retweetCount:0}, {theWord:"武装勢力", retweetCount:0}, {theWord:"白岡", retweetCount:0}, {theWord:"May", retweetCount:0}, {theWord:"元夫", retweetCount:0}, {theWord:"ロシア正教会", retweetCount:0}, {theWord:"横浜", retweetCount:0}, {theWord:"ベネズエラ", retweetCount:0}, {theWord:"財務局", retweetCount:0}, {theWord:"ハーバード大", retweetCount:0}, {theWord:"AMO’S STYLE", retweetCount:0}, {theWord:"高城幸司", retweetCount:0}, {theWord:"突然死", retweetCount:0}, {theWord:"無効化", retweetCount:0}, {theWord:"7月", retweetCount:0}, {theWord:"大西英男", retweetCount:0}, {theWord:"大串", retweetCount:0}, {theWord:"東急プラザ", retweetCount:0}, {theWord:"スローフード", retweetCount:0}, {theWord:"眞子さま", retweetCount:0}, {theWord:"東証", retweetCount:0}, {theWord:"キモ", retweetCount:0}, {theWord:"過激派", retweetCount:0}, {theWord:"シンシナティ動物園", retweetCount:0}, {theWord:"フジテレビ", retweetCount:0}}

set bList to sortRecListByLabel(aList, "retweetCount", false) of me –昇順ソート

–リストに入れたレコードを、指定の属性ラベルの値でソート
on sortRecListByLabel(aRecList as list, aLabelStr as string, ascendF as boolean)
  –ListからNSArrayへの型変換
  
set aArray to current application’s NSArray’s arrayWithArray:aRecList
  
  
–ソート
  
set sortDesc to current application’s NSSortDescriptor’s alloc()’s initWithKey:aLabelStr ascending:ascendF
  
set sortDescArray to current application’s NSArray’s arrayWithObjects:sortDesc
  
set sortedArray to aArray’s sortedArrayUsingDescriptors:sortDescArray
  
  
–NSArrayからListに型変換して返す
  
set bList to (sortedArray) as list
  
return bList
end sortRecListByLabel

★Click Here to Open This Script 

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

asoc_レコード内の計算(平均)v2

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:asoc_レコード内の計算(平均)v2
— Created 2014-11-19 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aCompanyRec to {employees:{{age:20, nameStr:"A"}, {age:23, nameStr:"B"}, {age:19, nameStr:"C"}}}

set aDic to current application’s NSDictionary’s dictionaryWithDictionary:aCompanyRec
set aveAge to (aDic’s valueForKeyPath:"employees.@avg.age")
set aveAgeNum to aveAge as real
–> 20.666666666667

★Click Here to Open This Script 

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

asoc_レコード内の計算(カウント)v2

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:asoc_レコード内の計算(カウント)v2
— Created 2014-11-19 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aCompanyRec to {employees:{{age:20, nameStr:"A"}, {age:23, nameStr:"B"}, {age:19, nameStr:"C"}}}

set aDic to current application’s NSDictionary’s dictionaryWithDictionary:aCompanyRec
set aveAge to (aDic’s valueForKeyPath:"employees.@count.age")
set aveAgeNum to aveAge as real
–> 3.0

★Click Here to Open This Script 

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

asoc_レコード内の計算(最大)v2

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:asoc_レコード内の計算(最大)v2
— Created 2014-11-19 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aCompanyRec to {employees:{{age:20, nameStr:"A"}, {age:23, nameStr:"B"}, {age:19, nameStr:"C"}}}

set aDic to current application’s NSDictionary’s dictionaryWithDictionary:aCompanyRec
set aveAge to (aDic’s valueForKeyPath:"employees.@max.age")
set aveAgeNum to aveAge as real
–> 23.0

★Click Here to Open This Script 

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

asoc_レコード内の計算(最小)v2

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:asoc_レコード内の計算(最小)v2
— Created 2014-11-19 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aCompanyRec to {employees:{{age:20, nameStr:"A"}, {age:23, nameStr:"B"}, {age:19, nameStr:"C"}}}

set aDic to current application’s NSDictionary’s dictionaryWithDictionary:aCompanyRec
set aveAge to (aDic’s valueForKeyPath:"employees.@min.age")
set aveAgeNum to aveAge as real
–> 19.0

★Click Here to Open This Script 

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

asoc_レコード内の計算(合計)v2

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:asoc_レコード内の計算(合計)v2
— Created 2014-11-19 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aCompanyRec to {employees:{{age:20, nameStr:"A"}, {age:23, nameStr:"B"}, {age:19, nameStr:"C"}}}

set aDic to current application’s NSDictionary’s dictionaryWithDictionary:aCompanyRec
set aveAge to (aDic’s valueForKeyPath:"employees.@sum.age")
set aveAgeNum to aveAge as real
–> 62.0

★Click Here to Open This Script 

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

指定リストの次元を取得する v3

Posted on 2月 7, 2018 by Takaaki Naganoya

任意のリスト(配列)変数の次元を取得するAppleScriptです。

手軽に多次元配列を宣言してアクセスできるAppleScriptですが、作成した配列変数の次元を確認する方法は用意されていません。

そこで、指定リスト(配列)の次元数を取得するものを書いてみました。

日常的に2次元配列とか3次元配列は使いますが、4次元配列まではあまり使ったことがありません。実用上は3次元配列ぐらいでしょうか。

たまに2次元配列が使えない言語とか、実用上は2次元配列ぐらいまでしか直接宣言できない言語があって驚かされます。

AppleScript名:指定リストの次元を取得する v3
use AppleScript version "2.4"
use scripting additions

set aList to {{1, 2, 3}, {4, 5, 6}} –2D List
set aDim to getDimension given tArray:aList
–> 2

set bList to {{{1, 2}, {2, 3}, {3, 4}}, {{1, 2}, {2, 3}, {3, 4}}, {{1, 2}, {2, 3}, {3, 4}}} –3D List
set bDim to getDimension given tArray:bList
–> 3

set cList to {1, 2, 3, 4, 5, 6} –1D List
set cDim to getDimension given tArray:cList
–> 1

set dList to {{{{1, 2}, {2, 3}}, {{1, 2}, {2, 3}}, {{1, 2}, {2, 3}}}} –4D List
set dDim to getDimension given tArray:dList
–> 4

–指定Listの次元を再帰で取得する
on getDimension given tArray:aList as list : {}, curDim:aNum as integer : 1
  
  
set anItem to contents of first item of aList
  
set aClass to class of anItem
  
  
if aClass = list then
    set aNum to aNum + 1
    
set aRes to getDimension given tArray:anItem, curDim:aNum
  else
    return aNum
  end if
  
end getDimension

★Click Here to Open This Script 

Posted in list recursive call | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

2D Listをユニーク化

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:2D Listをユニーク化(asoc)
— Created 2017-05-25 23:27:42 +0900 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aList to {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {64620, 537, 32893}, {64620, 537, 32893}, {64620, 537, 32893}, {64620, 537, 32893}}

set bList to uniquifyList(aList) of me
–> {​​​​​{​​​​​​​0, ​​​​​​​0, ​​​​​​​0​​​​​}, ​​​​​{​​​​​​​64620, ​​​​​​​537, ​​​​​​​32893​​​​​}​​​}

on uniquifyList(aList as list)
  set aArray to current application’s NSArray’s arrayWithArray:aList
  
set bArray to aArray’s valueForKeyPath:"@distinctUnionOfObjects.self"
  
return bArray as list
end uniquifyList

★Click Here to Open This Script 

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

1D Listをユニーク化 v2

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:1D Listをユニーク化 v2
— Created 2014-11-25 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

–set aList to {{aName:"Apple", aNum:1}, {aName:"Orange", aNum:1}, {aName:"Apple", aNum:1}}
set aList to {1, 1, 1, 3}

set aRes to uniquify1DList(aList, true)
–> {1, 10, 90, 100, 300}

–1D/2D Listをユニーク化
on uniquify1DList(theList as list, aBool as boolean)
  set aArray to current application’s NSArray’s arrayWithArray:theList
  
set bArray to aArray’s valueForKeyPath:"@distinctUnionOfObjects.self"
  
if aBool = true then
    return bArray as list
  else
    return bArray
  end if
end uniquify1DList

★Click Here to Open This Script 

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

listの項目をフィルタリング(項目文字長)

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:listの項目をフィルタリング(項目文字長)
— Created 2014-11-21 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aList to {"piyomaru", "Piyomaru Software", "Naganoya", "Takaaki", "MacBook Pro Retina mid 2012"}

set bList to filterListUsingPredicate(aList, "length > 8") –文字列長が8文字より長い項目を返す
–> {"MacBook Pro Retina mid 2012", "Piyomaru Software"}

set cList to filterListUsingPredicate(aList, "SELF MATCHES ’.*e$’") –正規表現で末尾が"e"
–> {"Piyomaru Software"}

set dList to filterListUsingPredicate(aList, "SELF LIKE ’piyo*’")
–> {"piyomaru"}

set eList to filterListUsingPredicate(aList, "SELF LIKE[c] ’piyo*’")
–> {"piyomaru", "Piyomaru Software"}

set fList to filterListUsingPredicate(aList, "SELF CONTAINS[c] ’Piyo’")
–> {"piyomaru", "Piyomaru Software"}

on filterListUsingPredicate(aList as list, aPredicateStr as string)
  –ListからNSArrayへの型変換
  
set setKey to current application’s NSMutableSet’s setWithArray:aList
  
  
–抽出
  
set aPredicate to current application’s NSPredicate’s predicateWithFormat:aPredicateStr
  
set aRes to (setKey’s filteredSetUsingPredicate:aPredicate)
  
set bRes to aRes’s allObjects()
  
  
–NSArrayからListに型変換して返す
  
set cRes to bRes as {list, list of string or string}
  
return cRes
end filterListUsingPredicate

★Click Here to Open This Script 

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

listの項目をフィルタリング(キーワードを含む)

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:listの項目をフィルタリング(キーワードを含む)
— Created 2014-11-21 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "ASObjCExtras"

set aList to {"piyomaru", "Naganoya", "Takaaki", "MacBook Pro Retina mid 2012", "piyomarusoft"}
set bList to filterListUsingPredicate(aList, "SELF contains[cd] %@", "Piyo") –部分一致
–> {"piyomaru", "piyomarusoft"}

set cList to filterListUsingPredicate(aList, "SELF matches[cd] %@", "piyomaru") –完全一致
–> {"piyomaru"}

set dList to filterListUsingPredicate(aList, "SELF like[c] %@", "*soft") –後方一致
–> {"piyomarusoft"}

on filterListUsingPredicate(aList as list, aPredicateStr as string, targStr as string)
  set setKey to current application’s NSMutableSet’s setWithArray:aList
  
set aPredicate to current application’s NSPredicate’s predicateWithFormat_(aPredicateStr, targStr)
  
set aRes to (setKey’s filteredSetUsingPredicate:aPredicate)
  
set bRes to aRes’s allObjects()
  
set cRes to bRes as {list, list of string or string}
  
return cRes
end filterListUsingPredicate

–2Dリストから、指定インデックスアイテムで、指定データが該当する最初のものを返す
on searchInListByIndexItem(aList as list, itemNum as integer, hitData as string)
  –ListからNSMutableSetへの型変換
  
set setKey to current application’s NSMutableSet’s setWithArray:aList
  
  
–Predicate Stringを組み立てる
  
if itemNum < 1 then return {}
  
set aPredicateStr to ("SELF[" & (itemNum – 1) as string) & "] == ’" & hitData & "’"
  
  
–抽出
  
set aPredicate to current application’s NSPredicate’s predicateWithFormat:aPredicateStr
  
set aRes to (setKey’s filteredSetUsingPredicate:aPredicate)
  
set bRes to aRes’s allObjects()
  
  
–NSArrayからListに型変換して返す
  
set cRes to bRes as list
  
  
if cRes is not equal to {} then
    set cRes to contents of first item of cRes
  end if
  
  
return cRes
end searchInListByIndexItem

★Click Here to Open This Script 

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

listをフィルターする(指定数以上の要素)

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:listをフィルターする(指定数以上の要素)
— Created 2014-12-28 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set theArray to current application’s NSArray’s arrayWithArray:{8, 2, 7, 3, 9, 1, 6, 4}
set thePred to current application’s NSPredicate’s predicateWithFormat:"self > 6"
set bArray to (theArray’s filteredArrayUsingPredicate:thePred) as list
–> {8, 7, 9}

★Click Here to Open This Script 

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

listをフィルターする(指定数以外の要素)

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:listをフィルターする(指定数以外の要素)
— Created 2014-12-28 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set theArray to current application’s NSArray’s arrayWithArray:{8, 2, 7, 3, 9, 1, 6, 4}
set thePred to current application’s NSPredicate’s predicateWithFormat:"(self != 2) AND (self != 4)"
set bArray to (theArray’s filteredArrayUsingPredicate:thePred) as list
–> {8, 7, 3, 9, 1, 6}

★Click Here to Open This Script 

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

listをフィルターする(指定文字ではじまる要素)

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:listをフィルターする(指定文字ではじまる要素)
— Created 2014-12-28 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set stringArray to current application’s NSArray’s arrayWithArray:{"adobe", "Apple", "microsoft", "google"}
set thePred to current application’s NSPredicate’s predicateWithFormat:"self BEGINSWITH ’a’"
set bArray to (stringArray’s filteredArrayUsingPredicate:thePred) as list
–> {"adobe"}

★Click Here to Open This Script 

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

2D listをフィルターする

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:2D listをフィルターする
— Created 2014-12-28 by Takaaki Naganoya
— 2014 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set theArray to current application’s NSArray’s arrayWithArray:{{8, 2}, {7, 3}, {9, 1}, {6, 4}, {10, 10}}
set thePred to current application’s NSPredicate’s predicateWithFormat:"(self[0] >5) AND (self[1] > 3)"
set bArray to (theArray’s filteredArrayUsingPredicate:thePred) as list
–> {8, 7, 3, 9, 1, 6}

★Click Here to Open This Script 

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

入れ子のリストをフラット化v03

Posted on 2月 7, 2018 by Takaaki Naganoya

2次元や3次元の多次元リスト(多次元配列)を1次元配列化するAppleScriptです。

AppleScriptのリスト型変数(配列変数)は簡単に多次元配列を作れるものの、リスト内の要素の検索などはとくに処理系に用意されていないほか、多次元配列を1次元配列に変換する機能は用意されていません。

そのため、このルーチンを用いて変換しています。Cocoaの機能を呼び出すよりも高速に処理できるため、このまま使っています。AppleScriptの処理系においては、本ルーチンよりも高速に処理できるものは存在していません。

# データ量が増える(1万項目以上)と、Cocoaの機能を利用したもののほうが高速ですが、このFlattenListのようにイレギュラーな次元数の多次元配列を1次元配列化できるものは見かけたことがありません

多次元配列の中に指定要素が入っているかを確認する場合など、本ルーチンで1次元配列に変換してからis inで存在確認を行うことになります。

AppleScript名:入れ子のリストをフラット化v03
set aList to {{"item 1", "item 2", {"item 1", "item 2", "item 3"}}, {"item1", "item 2", "item 3"}, "item 3"}
set aRes to FlattenList(aList) of me
–> {"item 1", "item 2", "item 1", "item 2", "item 3", "item1", "item 2", "item 3", "item 3"}

–By Paul Berkowitz
–2009年1月27日 2:24:08:JST
–Re: Flattening Nested Lists
on FlattenList(aList)
  set oldDelims to AppleScript’s text item delimiters
  
set AppleScript’s text item delimiters to {"????"}
  
set aString to aList as text
  
set aList to text items of aString
  
set AppleScript’s text item delimiters to oldDelims
  
return aList
end FlattenList

★Click Here to Open This Script 

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

リストからフィールド内容を指定して抽出

Posted on 2月 7, 2018 by Takaaki Naganoya

リスト(配列)に入れたレコードから、属性値ラベルと値を指定してしぼりこみを行うAppleScriptです。

{{label1:"data", label2:"data", label3:"data"},{label1:"XXXX", label2:"YYYYY", label3:"ZZZZ"}}

このようなデータの絞り込みは、従来はDatabase Events(macOS標準搭載のSQLiteラッパー、AppleScriptのフィルタ参照でデータの絞り込みを行う専用ツール)を利用したり、サードパーティのデータベースアプリケーションを併用する必要があったわけですが、前者はデータベースファイルを作成する必要があり、後者は購入する必要がありました。

# データベースファイルの作成をScripterに意識させない作りになっていれば、もう少し使い勝手がよかったはずですし、サンプルScriptが希少すぎ。海外の技術誌のバックナンバーをあさってようやくサンプルを見つけた時にはアゴが外れそうな勢いで驚きました

macOS 10.10以降でCocoaの機能が利用できるようになり、こうした配列に入れたレコードからデータを抽出するのに他のアプリケーションの機能を借りてくる必要がなくなりました。

正確にいえば、すべての配列要素を順次読み出して、指定の属性ラベルの値を調べて抽出といった地道な処理は昔からやっていましたが、そういうやり方だと、より高度な記述をしにくいところです。

AppleScript名:リストからフィールド内容を指定して抽出
— Created 2017-05-22 by Takaaki Naganoya
— 2017 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aList to {{partOfSpeechLevel1:"名詞", baseForm:"北朝鮮", pronunciation:"キタチョーセン", position:0, partOfSpeechLevel3:"地域", reading:"キタチョウセン", surface:"北朝鮮", known:true, allFeatures:"名詞,固有名詞,地域,国,*,*,北朝鮮,キタチョウセン,キタチョーセン", conjugationType:"*", partOfSpeechLevel2:"固有名詞", conjugationForm:"*", allFeaturesArray:{"名詞", "固有名詞", "地域", "国", "*", "*", "北朝鮮", "キタチョウセン", "キタチョーセン"}, partOfSpeechLevel4:"国"}, {partOfSpeechLevel1:"記号", baseForm:"*", pronunciation:"*", position:3, partOfSpeechLevel3:"*", reading:"*", surface:":", known:false, allFeatures:"記号,一般,*,*,*,*,*,*,*", conjugationType:"*", partOfSpeechLevel2:"一般", conjugationForm:"*", allFeaturesArray:{"記号", "一般", "*", "*", "*", "*", "*", "*", "*"}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"接頭詞", baseForm:"正", pronunciation:"セイ", position:4, partOfSpeechLevel3:"*", reading:"セイ", surface:"正", known:true, allFeatures:"接頭詞,名詞接続,*,*,*,*,正,セイ,セイ", conjugationType:"*", partOfSpeechLevel2:"名詞接続", conjugationForm:"*", allFeaturesArray:{"接頭詞", "名詞接続", "*", "*", "*", "*", "正", "セイ", "セイ"}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"名詞", baseForm:"恩", pronunciation:"オン", position:5, partOfSpeechLevel3:"*", reading:"オン", surface:"恩", known:true, allFeatures:"名詞,一般,*,*,*,*,恩,オン,オン", conjugationType:"*", partOfSpeechLevel2:"一般", conjugationForm:"*", allFeaturesArray:{"名詞", "一般", "*", "*", "*", "*", "恩", "オン", "オン"}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"名詞", baseForm:"氏", pronunciation:"シ", position:6, partOfSpeechLevel3:"人名", reading:"シ", surface:"氏", known:true, allFeatures:"名詞,接尾,人名,*,*,*,氏,シ,シ", conjugationType:"*", partOfSpeechLevel2:"接尾", conjugationForm:"*", allFeaturesArray:{"名詞", "接尾", "人名", "*", "*", "*", "氏", "シ", "シ"}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"記号", baseForm:"「", pronunciation:"「", position:7, partOfSpeechLevel3:"*", reading:"「", surface:"「", known:true, allFeatures:"記号,括弧開,*,*,*,*,「,「,「", conjugationType:"*", partOfSpeechLevel2:"括弧開", conjugationForm:"*", allFeaturesArray:{"記号", "括弧開", "*", "*", "*", "*", "「", "「", "「"}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"名詞", baseForm:"北極星", pronunciation:"ホッキョクセイ", position:8, partOfSpeechLevel3:"一般", reading:"ホッキョクセイ", surface:"北極星", known:true, allFeatures:"名詞,固有名詞,一般,*,*,*,北極星,ホッキョクセイ,ホッキョクセイ", conjugationType:"*", partOfSpeechLevel2:"固有名詞", conjugationForm:"*", allFeaturesArray:{"名詞", "固有名詞", "一般", "*", "*", "*", "北極星", "ホッキョクセイ", "ホッキョクセイ"}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"名詞", baseForm:"2", pronunciation:"ニ", position:11, partOfSpeechLevel3:"*", reading:"ニ", surface:"2", known:true, allFeatures:"名詞,数,*,*,*,*,2,ニ,ニ", conjugationType:"*", partOfSpeechLevel2:"数", conjugationForm:"*", allFeaturesArray:{"名詞", "数", "*", "*", "*", "*", "2", "ニ", "ニ"}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"記号", baseForm:"」", pronunciation:"」", position:12, partOfSpeechLevel3:"*", reading:"」", surface:"」", known:true, allFeatures:"記号,括弧閉,*,*,*,*,」,」,」", conjugationType:"*", partOfSpeechLevel2:"括弧閉", conjugationForm:"*", allFeaturesArray:{"記号", "括弧閉", "*", "*", "*", "*", "」", "」", "」"}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"名詞", baseForm:"量産", pronunciation:"リョーサン", position:13, partOfSpeechLevel3:"*", reading:"リョウサン", surface:"量産", known:true, allFeatures:"名詞,サ変接続,*,*,*,*,量産,リョウサン,リョーサン", conjugationType:"*", partOfSpeechLevel2:"サ変接続", conjugationForm:"*", allFeaturesArray:{"名詞", "サ変接続", "*", "*", "*", "*", "量産", "リョウサン", "リョーサン"}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"名詞", baseForm:"指示", pronunciation:"シジ", position:15, partOfSpeechLevel3:"*", reading:"シジ", surface:"指示", known:true, allFeatures:"名詞,サ変接続,*,*,*,*,指示,シジ,シジ", conjugationType:"*", partOfSpeechLevel2:"サ変接続", conjugationForm:"*", allFeaturesArray:{"名詞", "サ変接続", "*", "*", "*", "*", "指示", "シジ", "シジ"}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"記号", baseForm:" ", pronunciation:" ", position:17, partOfSpeechLevel3:"*", reading:" ", surface:" ", known:true, allFeatures:"記号,空白,*,*,*,*, , , ", conjugationType:"*", partOfSpeechLevel2:"空白", conjugationForm:"*", allFeaturesArray:{"記号", "空白", "*", "*", "*", "*", " ", " ", " "}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"名詞", baseForm:"ミサイル", pronunciation:"ミサイル", position:18, partOfSpeechLevel3:"*", reading:"ミサイル", surface:"ミサイル", known:true, allFeatures:"名詞,一般,*,*,*,*,ミサイル,ミサイル,ミサイル", conjugationType:"*", partOfSpeechLevel2:"一般", conjugationForm:"*", allFeaturesArray:{"名詞", "一般", "*", "*", "*", "*", "ミサイル", "ミサイル", "ミサイル"}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"名詞", baseForm:"成功", pronunciation:"セイコー", position:22, partOfSpeechLevel3:"*", reading:"セイコウ", surface:"成功", known:true, allFeatures:"名詞,サ変接続,*,*,*,*,成功,セイコウ,セイコー", conjugationType:"*", partOfSpeechLevel2:"サ変接続", conjugationForm:"*", allFeaturesArray:{"名詞", "サ変接続", "*", "*", "*", "*", "成功", "セイコウ", "セイコー"}, partOfSpeechLevel4:"*"}, {partOfSpeechLevel1:"名詞", baseForm:"発表", pronunciation:"ハッピョー", position:24, partOfSpeechLevel3:"*", reading:"ハッピョウ", surface:"発表", known:true, allFeatures:"名詞,サ変接続,*,*,*,*,発表,ハッピョウ,ハッピョー", conjugationType:"*", partOfSpeechLevel2:"サ変接続", conjugationForm:"*", allFeaturesArray:{"名詞", "サ変接続", "*", "*", "*", "*", "発表", "ハッピョウ", "ハッピョー"}, partOfSpeechLevel4:"*"}}

set anArray to current application’s NSMutableArray’s arrayWithArray:aList
set aRes to (my filterRecListByLabel1(anArray, "allFeaturesArray contains[cd] ’固有名詞’"))’s baseForm

–リストに入れたレコードを、指定の属性ラベルの値で抽出
on filterRecListByLabel1(aRecList as list, aPredicate as string)
  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
  
return filteredArray
end filterRecListByLabel1

★Click Here to Open This Script 

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

配列の指定要素を検索する(テキスト)

Posted on 2月 7, 2018 by Takaaki Naganoya

配列(リスト)のうち、指定要素が何番目に登場するかを検索するAppleScriptです。

もともと、AppleScriptの配列に該当するリスト(list)は、非常に機能が素朴で、要素数を数える(length、count every item of)ほかはループで順次要素を取り出すとか、指定データが配列中に入っているかのチェックを行うとか(is in)、1番目の要素を取り出して元の配列から削除するといった程度の機能しかありません。「検索」については、データベース(FileMaker Proなど)に処理を依頼してね、というのが当初の立ち位置でした。

ただ、それだとたいした処理が書けないので、自力で配列の全要素をループして照合する、といった力技が全世界的に使われてきました。高速化を考慮しているとか、高度な技術を使っているとか、外部のOSAX(プラグイン形式の命令語拡張書類。macOS 10.14で廃止に)を利用するといっても「高級な力技」の域を出るものではありませんでした。

set aList to {9, 4, 2, 6, 4, 7}
set aTarg to 7
set aCount to 1

repeat with i in aList
  set j to contents of i
  
if j = aTarg then
    exit repeat
  end if
  
set aCount to aCount + 1
end repeat

return aCount

★Click Here to Open This Script 

macOS 10.6でXcode上記述するAppleScriptでCocoaの機能が利用できるようになり、macOS 10.10で通常のAppleScript上でもCocoaの機能が呼び出せるようになると、AppleScriptからCocoaの機能を利用することが検討されはじめました。

Cocoaの配列であるNSArray、NSMutableArrayは、多次元配列の作成や操作に難を抱えています(正直なところ、2次元配列の操作は補助プログラムを使わないとやりたくないレベル)。多次元配列の作成や操作ならCocoaの機能を使わずにAppleScriptだけで行なったほうが数億倍簡単です。

# その後、多次元配列専用のクラス「MLMultiArray」がCoreML.frameworkに用意されることになりました。AppleScriptからは直接アクセスできないんで、用はないんですが、、、

ただ、これらのCocoaの配列オブジェクトには検索や抽出などの機能があるため、複数キーによる検索程度なら少ない行数で記述することが可能です。さらに、いくつかの前提条件を満たせば、速度的なメリットもあります。

(1)AppleScriptの配列をCocoaの配列に変換するのに若干時間がかかる

まったく世界観が異なる世界の配列を変換するのに、若干時間がかかります。そのため、AppleScriptからCocoaの配列を使う目的が「スピードアップ」だとしたら、それに見合った「巨大なデータ」が処理対象であることが前提条件です。目安としては、AppleScriptの配列のアクセスが遅くなってくる(高速化処理を行えば、そのかぎりではありませんが)4,000項目以上、もう少しいえば10,000項目の配列の処理ぐらいでないと速度向上のメリットを感じにくいところです。

また、Cocoaの配列が持っている条件抽出や正規表現による抽出を使うぐらいでないと、「ただ漫然とループする」ぐらいでは使う価値がありません。

(2)Cocoaの配列にAppleScriptの世界のアプリケーションのオブジェクトを入れられない

Cocoaの配列には、AppleScript上で普通に扱っている「Photoshopの最前面のドキュメント」とか「iTunesで選択中の音楽トラック」といったオブジェクトを直接入れることはできません。これらのオブジェクトのIDを取り出して、「単なる数値」として扱うのであれば別ですが、これらのアプリケーションのオブジェクトをCocoaの配列に入れることはできません。

(3)AppleScriptの配列(リスト)とCocoaの配列(NSArray/NSMutableArray)はアイテムの開始値が違う

普通、配列といえば0番目の要素から始まりますが、AppleScriptでは1番目から始まります。そのため、Cocoaの配列の機能を利用するときには、これらの仕様の違いを念頭におく必要があります。

ここで紹介するのは、Cocoaの配列を作ってCocoaの配列の機能を利用して指定要素の登場位置を求めるものです。さらに、Cocoaのバグ(OSのバグ)に対処するために若干の処理を追加してあります。macOS 10.12〜10.13の間、定数「NSNotFound」の定義が間違ったまま出荷されていました。その値がAppleScriptで扱える範囲を超える巨大な定義値だったために、そのバグの影響を受けました。

過去の情報を調べてみたところ、AppleがNSNotFoundの定義値を間違えてOSを出荷するというのはこれが初めてのことではありません(2度目か3度目)。そんな基礎的かつ重要な値の定義を間違えるなんて●●としか思えないのですが、そういうことのようです。

AppleがNSNotFoundの定義値を今後も間違える可能性があるため、本来シンプルで済むはずの記述でもこの程度の対処が必要となります。

AppleScript名:AppleScript名:配列の指定要素を検索する(テキスト)
— Created 2015-09-02 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aList to {"AAAAAAAAAAAAAAAAAAA", "BBBBBBBBBBBBBBBBBBBBB", "CCCCCCCCCCCCCCCCCCCCCCCC"}
set anArray to current application’s NSArray’s arrayWithArray:aList
–>  (NSArray) {"AAAAAAAAAAAAAAAAAAA", "BBBBBBBBBBBBBBBBBBBBB", "CCCCCCCCCCCCCCCCCCCCCCCC"}

–指定要素を検索する
set aInd to anArray’s indexOfObject:"CCCCCCCCCCCCCCCCCCCCCCCC"
if (aInd = current application’s NSNotFound) or (aInd > 9.999999999E+9) then
  return false
else
  return aInd
  
–>  2
end if

★Click Here to Open This Script 

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

1D List内の文字検索(完全一致)

Posted on 2月 7, 2018 by Takaaki Naganoya
AppleScript名:1D List内の文字検索(完全一致)
— Created 2015-09-02 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

property |NSURL| : a reference to current application’s |NSURL|
property NSArray : a reference to current application’s NSArray
property NSPredicate : a reference to current application’s NSPredicate
property NSFileManager : a reference to current application’s NSFileManager
property NSMutableArray : a reference to current application’s NSMutableArray
property NSSortDescriptor : a reference to current application’s NSSortDescriptor
property NSURLIsDirectoryKey : a reference to current application’s NSURLIsDirectoryKey
property NSDirectoryEnumerationSkipsHiddenFiles : a reference to current application’s NSDirectoryEnumerationSkipsHiddenFiles
property NSDirectoryEnumerationSkipsPackageDescendants : a reference to current application’s NSDirectoryEnumerationSkipsPackageDescendants
property NSDirectoryEnumerationSkipsSubdirectoryDescendants : a reference to current application’s NSDirectoryEnumerationSkipsSubdirectoryDescendants

set aFol to choose folder
set aList to my getFilesByIncludedStringInName:("txt") fromDirectory:(POSIX path of aFol) exceptPackages:(true)
–return aList

–set aList to {"AAAAAAAAAAAAAAAAAAA", "BBBBBBBBBBBBBBBBBBBBB", "CCCCCCCCCCCCCCCCCCCCCCCC"}
set anArray to current application’s NSArray’s arrayWithArray:aList
–>  (NSArray) {​​​​​1, ​​​​​2, ​​​​​3​​​}

–指定要素を検索する
set aInd to anArray’s indexOfObject:"N7663CT-673.txt"
if (aInd = current application’s NSNotFound) or (aInd > 9.999999999E+9) then
  return false
else
  return aInd
  
–>  2
end if

–指定フォルダ内の指定文字列を含むファイル名のファイルをPOSIX pathのlistで抽出する
on getFilesByIncludedStringInName:(fileNameStr as string) fromDirectory:(sourceFolder) exceptPackages:(packageF as boolean)
  set fileManager to NSFileManager’s defaultManager()
  
set aURL to |NSURL|’s fileURLWithPath:sourceFolder
  
set theOptions to ((NSDirectoryEnumerationSkipsPackageDescendants) as integer) + ((NSDirectoryEnumerationSkipsHiddenFiles) as integer) + ((NSDirectoryEnumerationSkipsSubdirectoryDescendants) as integer)
  
set directoryContents to fileManager’s contentsOfDirectoryAtURL:aURL includingPropertiesForKeys:{} options:theOptions |error|:(missing value)
  
set findPredicates to NSPredicate’s predicateWithFormat_("lastPathComponent CONTAINS %@", fileNameStr)
  
set foundItemList to directoryContents’s filteredArrayUsingPredicate:findPredicates
  
  
–Remove Folders From found URL Array
  
set anArray to NSMutableArray’s alloc()’s init()
  
repeat with i in foundItemList
    set j to contents of i
    
set {theResult, isDirectory} to (j’s getResourceValue:(reference) forKey:(NSURLIsDirectoryKey) |error|:(missing value))
    
    
–Collect files
    
if (isDirectory as boolean = false) then
      (anArray’s addObject:j)
      
    else if (packageF = false) then
      –Allow Package files?
      
set {theResult, isPackage} to (j’s getResourceValue:(reference) forKey:(current application’s NSURLIsPackageKey) |error|:(missing value))
      
if (isPackage as boolean) = true then
        (anArray’s addObject:j)
      end if
    end if
    
  end repeat
  
  
return (anArray’s valueForKey:"lastPathComponent") as list
end getFilesByIncludedStringInName:fromDirectory:exceptPackages:

★Click Here to Open This Script 

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

Post navigation

  • Older posts
  • Newer posts

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

Google Search

Popular posts

  • Numbersで選択範囲のセルの前後の空白を削除
  • macOS 26, Tahoe
  • macOS 15でも変化したText to Speech環境
  • KagiのWebブラウザ、Orion
  • Script Debuggerの開発と販売が2025年に終了
  • 【続報】macOS 15.5で特定ファイル名パターンのfileをaliasにcastすると100%クラッシュするバグ
  • macOS 15 リモートApple Eventsにバグ?
  • NSObjectのクラス名を取得 v2.1
  • 2024年に書いた価値あるAppleScript
  • 有害ではなくなっていたSpaces
  • macOS 15:スクリプトエディタのAppleScript用語辞書を確認できない
  • Xcode上のAppleScriptObjCのプログラムから、Xcodeのログ欄へのメッセージ出力を実行
  • (確認中)AppleScript Dropletのバグっぽい動作が解消?
  • AVSpeechSynthesizerで読み上げテスト
  • AppleScript Dropletのバグっぽい動作が「復活」(macOS 15.5β)
  • Apple、macOS標準搭載アプリ「写真」のバージョン表記を間違える
  • 指定フォルダ以下の画像のMD5チェックサムを求めて、重複しているものをピックアップ
  • macOS 26, 15.5でShortcuts.app「AppleScriptを実行」アクションのバグが修正される
  • Script Debuggerがフリーダウンロードで提供されることに
  • Numbersで選択中の2列のセルを比較して並べ直して書き戻す v2

Tags

10.11savvy (1101) 10.12savvy (1242) 10.13savvy (1391) 10.14savvy (587) 10.15savvy (438) 11.0savvy (283) 12.0savvy (212) 13.0savvy (204) 14.0savvy (159) 15.0savvy (156) CotEditor (66) Finder (52) Keynote (119) 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 (56) Pixelmator Pro (20) 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
  • Newt On Project
  • Noification
  • Notarization
  • Number
  • Object control
  • OCR
  • OSA
  • parallel processing
  • PDF
  • Peripheral
  • process
  • 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
  • Scripting Additions
  • 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年10月
  • 2025年9月
  • 2025年8月
  • 2025年7月
  • 2025年6月
  • 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