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

タグ: 15.0savvy

macOS 15.7.2 スクリプトメニューから実行できなくなった地図系ライブラリ?

Posted on 10月 11 by Takaaki Naganoya

macOS 15.7.2やmacOS 26.x上のスクリプトメニューで地図表示系のライブラリ呼び出し、とくにchoose location libが動作しません。

てっきり「スクリプトメニューで地図系のAPIへのアクセスが禁止されたのか?」と思っていたのですが、

同じく地図系APIにアクセスしているdisplay locationライブラリはスクリプトメニューから呼び出せています。

不思議。

以下に、AppleScriptライブラリの呼び出しが可能なAppleScript実行環境の一覧を示し、呼び出しの検証が行えているものは「Yes」を、検証して動かないことを確認したものに「No」と記入しています。

Program Name Can Call choose location Libraries?
Script Debugger 8 Yes
Script Editor Yes
Mail.app (rule–> Run AppleScript)
Shortcuts.app No Can not load map image
Shortcuts Events No Can not load map image
Script Menu (macOS 10.14 or later) No Can not execute
Terminal.app (osascript) Yes
Service Station
elgato Stream Deck
BBEdit No Can not execute
Jedit Ω
Adobe Indesign
Adobe Illustrator
Music (Script Menu) No Can not execute
Microsoft Excel
Microsoft Word
Microsoft PowerPoint
Keyboard Maestro
EventScript
FastScript 3 Yes
LaunchPalette
Visual Studio Code extension Yes
Dropzone 4
ScreenFloat
Xojo 2025 No Error
Live Code
Posted in Library Map | Tagged 15.0savvy 26.0savvy | Leave a comment

階層を指定したlistからOutLineViewで表示できるデータ形式に変換 v4(3階層対応)

Posted on 10月 10 by Takaaki Naganoya

入れ子のlist(2D List)で {{インデント階層+タイトル}…} 指定したデータを、NSOutlineViewで表示できるデータ形式に変換するAppleScriptです。

Keynoteに各スライドのインデント・レベルをAppleScriptに返す機能が存在しないため、各スライドのマスタースライド名から「このスライドマスターは、この階層に使いがち」といったルールをもとに階層関係を推測して処理しています。

主に、Keynote書類の各スライド(ページ)上のタイトルを、そのマスタースライド名をもとにインデントレベルを仮想的に判定し、PDFのTOCを作成する際の「プレビュー」を行うべく、NSOutLineViewで表示するために作成したものです。

これ自体は、2d ListからNSOutLineView表示用のデータを作成するだけのScriptです。

n階層をサポートしています。0がトップ階層。1がタブ1個と等価。2がタブ2個インデントと等価です。


{{0, "表紙"}, {0, "目次"}, {0, "1章"}, {1, "セクション1"}, {2, "項目1"}, {3, "コラム1"}, {2, "項目2"}, {3, "コラム2"}, {1, "セクション2"}, {2, "項目3"}, {0, "2章"}, {1, "セクションA"}, {2, "項目A1"}, {2, "項目A2"}, {1, "セクションB"}, {0, "裏表紙"}}

こんなデータを、

{{|name|:"表紙", isLeaf:true, children:{}}, {|name|:"目次", isLeaf:true, children:{}}, {|name|:"1章", isLeaf:false, children:{{|name|:"セクション1", isLeaf:false, children:{{|name|:"項目1", isLeaf:false, children:{{|name|:"コラム1", isLeaf:true, children:{}}}}, {|name|:"項目2", isLeaf:false, children:{{|name|:"コラム2", isLeaf:true, children:{}}}}}}, {|name|:"セクション2", isLeaf:false, children:{{|name|:"項目3", isLeaf:true, children:{}}}}}}, {|name|:"2章", isLeaf:false, children:{{|name|:"セクションA", isLeaf:false, children:{{|name|:"項目A1", isLeaf:true, children:{}}, {|name|:"項目A2", isLeaf:true, children:{}}}}, {|name|:"セクションB", isLeaf:true, children:{}}}}, {|name|:"裏表紙", isLeaf:true, children:{}}}

のように変換します。

NSOutlineViewをダイアログ表示するAppleScriptライブラリを作りかけて、データ作成部分もライブラリに組み込まないと使い物にならないと気づき、ChatGPTに作らせたものです。

AppleScript名:階層を指定したlistからOutLineViewで表示できるデータ形式に変換 v4(3階層対応).scpt
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/10/10
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.8"
use framework "Foundation"
use scripting additions

— サンプル入力(3階層以上)
set srcList to {{0, "表紙"}, {0, "目次"}, {0, "1章"}, {1, "セクション1"}, {2, "項目1"}, {3, "コラム1"}, {2, "項目2"}, {3, "コラム2"}, {1, "セクション2"}, {2, "項目3"}, {0, "2章"}, {1, "セクションA"}, {2, "項目A1"}, {2, "項目A2"}, {1, "セクションB"}, {0, "裏表紙"}}

set aRec to convlistToStructuredRec(srcList) of me
–> {{|name|:"表紙", isLeaf:true, children:{}}, {|name|:"目次", isLeaf:true, children:{}}, {|name|:"1章", isLeaf:false, children:{{|name|:"セクション1", isLeaf:false, children:{{|name|:"項目1", isLeaf:false, children:{{|name|:"コラム1", isLeaf:true, children:{}}}}, {|name|:"項目2", isLeaf:false, children:{{|name|:"コラム2", isLeaf:true, children:{}}}}}}, {|name|:"セクション2", isLeaf:false, children:{{|name|:"項目3", isLeaf:true, children:{}}}}}}, {|name|:"2章", isLeaf:false, children:{{|name|:"セクションA", isLeaf:false, children:{{|name|:"項目A1", isLeaf:true, children:{}}, {|name|:"項目A2", isLeaf:true, children:{}}}}, {|name|:"セクションB", isLeaf:true, children:{}}}}, {|name|:"裏表紙", isLeaf:true, children:{}}}

on convlistToStructuredRec(allLines)
  set topList to {} — 最終出力
  
set stack to {} — 階層ごとの親ノードを保持
  
  
repeat with aLine in allLines
    copy aLine to {tabCount, lineStr}
    
set lineNS to (current application’s NSString’s stringWithString:(lineStr as text))
    
set contentText to (lineNS’s stringByTrimmingCharactersInSet:(current application’s NSCharacterSet’s whitespaceAndNewlineCharacterSet())) as text
    
if contentText is "" then
      — 空行スキップ
    else
      — 新しいレコード
      
set newRec to {|name|:contentText, isLeaf:true, children:{}}
      
      
if tabCount = 0 then
        — トップレベル
        
set end of topList to newRec
        
set stack to {newRec}
      else
        — stack を tabCount に合わせて切り詰め
        
if (count of stack) ≥ tabCount then
          set stack to items 1 thru tabCount of stack
        end if
        
        
— 親ノード取得
        
set parentRec to item tabCount of stack
        
        
— 親の children に追加
        
set parentChildren to parentRec’s children
        
set end of parentChildren to newRec
        
set parentRec’s children to parentChildren
        
        
— 親の isLeaf を false に
        
set parentRec’s isLeaf to false
        
        
— stack に追加
        
set end of stack to newRec
      end if
    end if
  end repeat
  
  
return topList
end convlistToStructuredRec

★Click Here to Open This Script 

Posted in list Record | Tagged 15.0savvy 26.0savvy | Leave a comment

タブでインデントしたテキストをOutLineViewで表示できるデータ形式に変換 v4(3階層対応)

Posted on 10月 10 by Takaaki Naganoya

タブでインデントしたテキストを、NSOutlineViewで表示できるデータ形式に変換するAppleScriptの改良版です。

主に、Keynote書類の各スライド(ページ)上のタイトルを、そのマスタースライド名をもとにインデントレベルを仮想的に判定し、PDFのTOCを作成する際の「プレビュー」を行うべく、NSOutLineViewで表示するために作成したものです。

ChatGPTにオーダーを出して、エラー内容と処理結果をそのまま差し返すことで、数回このフローを繰り返して正しい処理内容を取得できました。

これ自体は、テストデータ(テキスト)からNSOutLineView表示用のデータを作成するだけのScriptです。

Tab n個のn階層をサポートしています。

表紙
目次
1章
	セクション1
		項目1
			コラム1
		項目2
			コラム2
	セクション2
		項目3
2章
	セクションA
		項目A1
		項目A2
	セクションB
裏表紙

こんなデータを、

{{|name|:"表紙", isLeaf:true, children:{}}, {|name|:"目次", isLeaf:true, children:{}}, {|name|:"1章", isLeaf:false, children:{{|name|:"セクション1", isLeaf:false, children:{{|name|:"項目1", isLeaf:false, children:{{|name|:"コラム1", isLeaf:true, children:{}}}}, {|name|:"項目2", isLeaf:false, children:{{|name|:"コラム2", isLeaf:true, children:{}}}}}}, {|name|:"セクション2", isLeaf:false, children:{{|name|:"項目3", isLeaf:true, children:{}}}}}}, {|name|:"2章", isLeaf:false, children:{{|name|:"セクションA", isLeaf:false, children:{{|name|:"項目A1", isLeaf:true, children:{}}, {|name|:"項目A2", isLeaf:true, children:{}}}}, {|name|:"セクションB", isLeaf:true, children:{}}}}, {|name|:"裏表紙", isLeaf:true, children:{}}}

のように変換します。

NSOutlineViewをダイアログ表示するAppleScriptライブラリを作りかけて、データ作成部分もライブラリに組み込まないと使い物にならないと気づき、ChatGPTに作らせたものです。

AppleScript名:タブでインデントしたテキストをOutLineViewで表示できるデータ形式に変換 v4(3階層対応).scpt
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/10/10
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.8"
use framework "Foundation"
use scripting additions

— サンプル入力(3階層以上)
set srcText to "表紙
目次
1章
  セクション1
    項目1
      コラム1
    項目2
      コラム2
  セクション2
    項目3
2章
  セクションA
    項目A1
    項目A2
  セクションB
裏表紙"

set aRec to convStrToStructuredRec(srcText) of me
–> {{|name|:"表紙", isLeaf:true, children:{}}, {|name|:"目次", isLeaf:true, children:{}}, {|name|:"1章", isLeaf:false, children:{{|name|:"セクション1", isLeaf:false, children:{{|name|:"項目1", isLeaf:false, children:{{|name|:"コラム1", isLeaf:true, children:{}}}}, {|name|:"項目2", isLeaf:false, children:{{|name|:"コラム2", isLeaf:true, children:{}}}}}}, {|name|:"セクション2", isLeaf:false, children:{{|name|:"項目3", isLeaf:true, children:{}}}}}}, {|name|:"2章", isLeaf:false, children:{{|name|:"セクションA", isLeaf:false, children:{{|name|:"項目A1", isLeaf:true, children:{}}, {|name|:"項目A2", isLeaf:true, children:{}}}}, {|name|:"セクションB", isLeaf:true, children:{}}}}, {|name|:"裏表紙", isLeaf:true, children:{}}}

on convStrToStructuredRec(srcText)
  set nsText to current application’s NSString’s stringWithString:srcText
  
set allLines to nsText’s componentsSeparatedByCharactersInSet:(current application’s NSCharacterSet’s newlineCharacterSet())
  
  
set topList to {} — 最終出力
  
set stack to {} — 階層ごとの親ノードを保持
  
  
repeat with aLine in allLines
    set lineNS to (current application’s NSString’s stringWithString:(aLine as text))
    
set trimmedStr to (lineNS’s stringByTrimmingCharactersInSet:(current application’s NSCharacterSet’s whitespaceAndNewlineCharacterSet())) as text
    
if trimmedStr is "" then
      — 空行スキップ
    else
      — 行頭タブ数
      
set len to lineNS’s |length|()
      
set tabCount to 0
      
repeat with i from 0 to (len – 1)
        set ch to (lineNS’s characterAtIndex:i)
        
if (ch as integer) = 9 then
          set tabCount to tabCount + 1
        else
          exit repeat
        end if
      end repeat
      
      
— タブ除去文字列
      
if len > tabCount then
        set contentText to (lineNS’s substringFromIndex:tabCount) as text
      else
        set contentText to ""
      end if
      
      
— 新しいレコード
      
set newRec to {|name|:contentText, isLeaf:true, children:{}}
      
      
if tabCount = 0 then
        — トップレベル
        
set end of topList to newRec
        
set stack to {newRec}
      else
        — stack を tabCount に合わせて切り詰め
        
if (count of stack) ≥ tabCount then
          set stack to items 1 thru tabCount of stack
        end if
        
— 親ノード取得
        
set parentRec to item tabCount of stack
        
— 親の children に追加
        
set parentChildren to parentRec’s children
        
set end of parentChildren to newRec
        
set parentRec’s children to parentChildren
        
— 親の isLeaf を false に
        
set parentRec’s isLeaf to false
        
— stack に追加
        
set end of stack to newRec
      end if
    end if
  end repeat
  
  
return topList
end convStrToStructuredRec

★Click Here to Open This Script 

Posted in list Record Text | Tagged 15.0savvy 26.0savvy | Leave a comment

FaceTimeカメラから取り込み v1

Posted on 10月 8 by Takaaki Naganoya

MacBook Air/Pro/iMac搭載のFaceTime HDカメラから静止画を取り込むAppleScriptです。

QRコードの画像を取り込んで、QRコードを認識させて、URLを含んでいる場合にはWebブラウザでオープンするといったワークフローを作っておこうかと考えて書いてみました。

ただ、まだ調べ始めて日がないため、取り込み中の画像のプレビューは表示されません。FaceTime HDカメラが点灯して2秒ぐらいで何も言わずに画像取り込みされる無愛想なプログラムになっています。

本当はAVCaptureViewを用いてプレビュー表示が行われることがベストです。アラートダイアログ上にプレビューが表示できれば……そのうち、できるようになるのではないかと。

AppleScript名:FaceTimeカメラから取り込み v1.scptd
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/10/07
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.8"
use framework "Foundation"
use framework "AVFoundation"
use scripting additions

property captureSession : missing value
property stillOutput : missing value
property saveURL : missing value

on run
  set aPath to POSIX path of (choose file name)
  
my captureStillImage(aPath)
end run

on captureStillImage(aPath)
  set saveURL to current application’s |NSURL|’s fileURLWithPath:aPath
  
  
— セッション作成
  
set captureSession to current application’s AVCaptureSession’s alloc()’s init()
  
captureSession’s setSessionPreset:(current application’s AVCaptureSessionPresetPhoto)
  
  
— カメラデバイスを取得
  
set device to (current application’s AVCaptureDevice’s defaultDeviceWithMediaType:(current application’s AVMediaTypeVideo))
  
if device = missing value then
    display dialog "カメラが見つかりません。" buttons {"OK"} default button 1
    
return
  end if
  
  
— 入力設定
  
set input to (current application’s AVCaptureDeviceInput’s deviceInputWithDevice:device |error|:(missing value))
  
if input = missing value then
    display dialog "カメラ入力を初期化できません。" buttons {"OK"} default button 1
    
return
  end if
  
  
if (captureSession’s canAddInput:input) as boolean then
    captureSession’s addInput:input
  else
    display dialog "入力を追加できません。" buttons {"OK"} default button 1
    
return
  end if
  
  
  
— 出力設定
  
set stillOutput to current application’s AVCapturePhotoOutput’s alloc()’s init()
  
if (captureSession’s canAddOutput:stillOutput) as boolean then
    captureSession’s addOutput:stillOutput
  else
    display dialog "出力を追加できません。" buttons {"OK"} default button 1
    
return
  end if
  
  
  
— セッション開始
  
captureSession’s startRunning()
  
delay 1 — カメラ起動待機
  
  
— 写真設定
  
set photoSet to (current application’s AVCapturePhotoSettings’s photoSettings)
  
  
— 撮影
  (
stillOutput’s capturePhotoWithSettings:photoSet delegate:me)
  
  
delay 2
  
captureSession’s stopRunning()
end captureStillImage

on captureOutput:(output) didFinishProcessingPhoto:(photo) |error|:err
  if err ≠ missing value then
    display dialog "撮影エラー: " & (err’s localizedDescription() as text)
    
return
  end if
  
set imageData to photo’s fileDataRepresentation()
  
imageData’s writeToURL:saveURL atomically:true
  
display notification "画像を保存しました。" with title "カメラキャプチャ"
end captureOutput:didFinishProcessingPhoto:|error|:

★Click Here to Open This Script 

Posted in Image System | Tagged 15.0savvy 26.0savvy | Leave a comment

指定日が所属する週のうち、最終日の日付を求める v2

Posted on 10月 7 by Takaaki Naganoya

指定日を基準として「今週末」までの日付を求めるAppleScriptです。

日付の範囲指定で「今週」という指定を行った場合、+7日を足して相対的に1週間先の日付を返すという処理方法もありますが、(日本国内の)常識的には週末までの日付を返すことでしょう。

そして、今週末といった場合に、日曜日はじまりのカレンダーであれば土曜日が該当するわけですが、全世界的に考えると「日曜日はじまりではない」カレンダーを採用しているエリア(国)も存在しています。

月曜日はじまりのカレンダーを採用している国には、ヨーロッパ全域(EU諸国?)などがあるようです。

「今週末」というキーワードをmacOSの自然言語処理系の機能を用いて具体的な日付に変換することは可能ですが、OSアップデートのたびにAppleがバグを作りやすい機能なので(こんなところにまでバグを作るAppleのエンジニアが信じられない)、もうちょっと安心して計算できるプログラムがあったほうがいいと考えました。

そこで、すでに作ってあるさまざまな日付計算系のルーチンを組み合わせて計算してみました。

AppleScript名:指定日が所属する週のうち、最終日の日付を求める v2.scpt
— Created 2015-02-02 by Shane Stanley
— Modified 2015-02-02 by Takaaki Naganoya
— Modified 2025-10-01 by Takaaki Naganoya

— v2 最終週で、カレンダーが途中で途切れているケースに対応

use AppleScript
use scripting additions
use framework "Foundation"

set targY to 2025
set targM to 9
set targD to 21

set theLastDay to calcLastDayFromTheTargetDay(targY, targM, targD) of me
–> date "2025年9月27日 土曜日 0:00:00"

–指定日が所属する週のうち、最終日の日付を求める
on calcLastDayFromTheTargetDay(targY, targM, targD)
  –指定日が月内で何週目に該当するかを算出
  
set targWN to getDatesWeekNumberWithinAMonth(targY, targM, targD) of me
  
–> 4
  
  
–指定日の当該週の日付を1D Listで返す
  
set wRes to getWeekDatesWithinAWNinAMonth(targY, targM, targWN) of me
  
–> {21, 22, 23, 24, 25, 26, 27}
  
  
–1D List(当該週の日付)内における指定日の登場インデックスを算出
  
set cRes to offsetOf(wRes, targD) of me
  
  
–1D List(当該週の日付)内の末尾までの日付を返す
  
set restDays to items cRes thru -1 of wRes
  
–> {28, 29, 30, missing value, missing value, missing value, missing value}
  
  
–指定日が所属する週のうち、最終日の日付を求める
  
set revList to reverse of restDays –逆順で末尾から数字が入っている場所をシーケンシャルサーチ
  
repeat with i in revList
    set j to contents of i
    
if j is not equal to missing value then
      exit repeat
    end if
  end repeat
  
  
set targDate to getDateInternational(targY, targM, j, 23, 59, 59, "JST") of me
  
  
return targDate
end calcLastDayFromTheTargetDay

–日曜日はじまりのカレンダーにおいて、指定年月内の指定週目の日付を配列で返す
on getWeekDatesWithinAWNinAMonth(targY, targM, targWN)
  set mRen to getMlenInternational(targY, targM) of me
  
  
set aList to make2DBlankArray(7, 5) of me –1か月分の2次元配列を求める
  
  
set aCount to 1
  
repeat with i from 1 to mRen
    set tmpDO to getDateInternational(targY, targM, i, 23, 59, 59, "JST") of me –当初、00:00:00に指定していたが、週末(土曜日)を指定したときに、範囲が00:00;00〜00:00:00になると具合がよくないので00:00:00〜23:59:59になるようこの時間に変更し
    
set aWD to weekday of tmpDO as number
    
    
set aList to setItemByXY(aWD, aCount, aList, i) of me
    
    
if aWD = 7 then
      set aCount to aCount + 1
    end if
  end repeat
  
  
return item targWN of aList
end getWeekDatesWithinAWNinAMonth

–日曜日はじまりのカレンダーにおいて、指定年月日の日付が月内の何週目にあたるかを算出
on getDatesWeekNumberWithinAMonth(targY, targM, targD)
  set mRen to getMlenInternational(targY, targM) of me
  
  
set aList to make2DBlankArray(7, 5) of me
  
  
set aCount to 1
  
repeat with i from 1 to mRen
    set tmpDO to getDateInternational(targY, targM, i, 23, 59, 59, "JST") of me –当初、00:00:00に指定していたが、週末(土曜日)を指定したときに、範囲が00:00;00〜00:00:00になると具合がよくないので00:00:00〜23:59:59になるようこの時間に変更した
    
set aWD to weekday of tmpDO as number
    
    
set aList to setItemByXY(aWD, aCount, aList, i) of me
    
    
if i = targD then return aCount
    
    
if aWD = 7 then
      set aCount to aCount + 1
    end if
    
  end repeat
  
  
return false
end getDatesWeekNumberWithinAMonth

–現在のカレンダーで指定年月の日数を返す
on getMlenInternational(aYear, aMonth)
  set theNSCalendar to current application’s NSCalendar’s currentCalendar() — do *not* use initWithCalendarIdentifier:
  
set theDate to theNSCalendar’s dateWithEra:1 |year|:aYear |month|:aMonth |day|:1 hour:0 minute:0 |second|:0 nanosecond:0
  
set theResult to theNSCalendar’s rangeOfUnit:(current application’s NSDayCalendarUnit) inUnit:(current application’s NSMonthCalendarUnit) forDate:theDate
  
–>  {location:1, length:31}
  
return |length| of theResult
end getMlenInternational

–Make a GMT Date Object with parameters from a given time zone.
on getDateInternational(aYear, aMonth, aDay, anHour, aMinute, aSecond, timeZoneAbbreviation)
  set theNSCalendar to current application’s NSCalendar’s currentCalendar()
  
theNSCalendar’s setTimeZone:(current application’s NSTimeZone’s timeZoneWithAbbreviation:(timeZoneAbbreviation))
  
set theDate to theNSCalendar’s dateWithEra:1 |year|:aYear |month|:aMonth |day|:aDay hour:anHour minute:aMinute |second|:aSecond nanosecond:0
  
return theDate as date
end getDateInternational

–Listに配列的な添字を使ってアクセスするルーチン群
on xFill(aX, aY, aList, aVal, aRepNum)
  repeat with x from aX to (aX + aRepNum – 1)
    set aList to setItemByXY(x, aY, aList, aVal) of me
  end repeat
  
return aList
end xFill

on yFill(aX, aY, aList, aVal, aRepNum)
  repeat with y from aY to (aY + aRepNum – 1)
    set aList to setItemByXY(aX, y, aList, aVal) of me
  end repeat
  
return aList
end yFill

on getItemByXY(aX, aY, aList, aBlankItem)
  try
    set aContents to contents of (item aX of item aY of aList)
  on error
    set aContents to aBlankItem
  end try
  
return aContents
end getItemByXY

on setItemByXY(aX, aY, aList, aContents)
  try
    set (item aX of item aY of aList) to aContents
  end try
  
return aList
end setItemByXY

–空白の2D Array を出力する
on make2DBlankArray(curLen, curMax)
  set outArray to {}
  
repeat curMax times
    set aList to {}
    
repeat curLen times
      set the end of aList to missing value –オリジナルの""(ヌル文字)からmissing valueに変更
    end repeat
    
set the end of outArray to aList
  end repeat
  
return outArray
end make2DBlankArray

–1D Listのoffsetを求める
on offsetOf(aList as list, aTarg)
  set aArray to current application’s NSArray’s arrayWithArray:aList
  
set aIndex to aArray’s indexOfObjectIdenticalTo:aTarg
  
return (aIndex + 1)
end offsetOf

★Click Here to Open This Script 

Posted in Calendar | Tagged 15.0savvy 26.0savvy | Leave a comment

テキストベースの棒グラフ取得

Posted on 9月 27 by Takaaki Naganoya

テキストで作成した棒グラフの生成AppleScriptです。

比較的どうでもいいデータの傾向を知りたい場合に棒グラフ表示させて全体の傾向を把握することが、よくあります。そんなときに、文字だけで作成した棒グラフを生成します。何回か書いたことがあるような気もするのですが、簡単なものを作っておきます。

本Scriptで生成するグラフのタイプは2種類。


▲モノクロ表示用の、同じ文字を重ねて棒グラフを表示するタイプ


▲カラー(色分け)表示用の、絵文字を用いて色分けして棒グラフを表示するタイプ

項目名の最大文字数を求めて、他の項目で文字数が足りない箇所には不足分のスペースを足して、グラフの位置揃えを行なっていますが、このあたりタブで処理するべきなのか。

実際には、Pages書類上で選択しておいたオブジェクトから画像(image)のみピックアップして、それらの幅を集計してグラフ表示するような用途に使っています。

AppleScript名:テキストベースの棒グラフ取得.scptd
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/09/27
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.4" — Yosemite (10.10) or later
use framework "Foundation"
use scripting additions
use radioLib : script "displayTextView"

set bList to {12, 21, 15, 26}
set labelList to {"Aaaa", "Bbb", "Cc", "D"}

set aStr to retCharBarChart(labelList, bList, "|") of me
set aStr to "Name" & tab & tab & "Data" & tab & tab & "Number" & return & return & aStr
display text view aStr main message "Bar chart Sample 1" sub message "Sub Message" with properties {font name:"Courier", size:32, width:800, height:300, color:{0, 255, 128}}
(*
"Name    Data    Number

Aaaa    |||||||||||| 12
Bbb     ||||||||||||||||||||| 21
Cc     ||||||||||||||| 15
D     |||||||||||||||||||||||||| 26
"
*)

set bStr to retCharBarChart(labelList, bList, false) of me
(*
"Aaaa    
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 12
Bbb     
🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦 21
Cc     
🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 15
D     
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 26
"
*)

set bStr to "Name" & tab & tab & "Data" & tab & tab & "Number" & return & return & bStr
display text view bStr main message "Bar chart Sample 2" sub message "Sub Message" with properties {font name:"Courier", size:16, width:800, height:150, color:{0, 255, 128}}

–文字ベースで棒グラフを作成するための文字グラフルーチン
on retCharBarChart(labelList, bList, charFlag)
  –ラベル文字の長さをそろえる(文字種類については不問、単に文字数をそろえるだけ)
  
set tMax to maximumItemLengthFromList(labelList) of me
  
  
set resText to ""
  
–set aChar to "■"
  
set aCharList to {"🟥", "🟦", "🟨", "🟩", "🟧", "🟪", "🟫", "⬛️", "❤️", "💙", "💛", "💚", "🧡", "💜", "🤎", "🩶", "🖤", "🔴", "🔵", "🟡", "🟢", "🟠", "🟣", "🟤", "⚫️"}
  
set aCharLLen to length of aCharList
  
  
set iCounter to 1
  
set aCharPointer to 1
  
  
if charFlag = false then
    –ローテーション方式の色文字グラフ
    
repeat with i in bList
      set j to contents of i
      
set aLabel to (contents of item iCounter of labelList) as string
      
set aLabel to paddingSpacesAfter(aLabel, tMax, " ") of me
      
      
set tmpChar to contents of item aCharPointer of aCharList
      
set resText to (resText & aLabel & tab & tab & makeCharRep(j, tmpChar) of me & " " & j as string) & return
      
      
set iCounter to iCounter + 1
      
set aCharPointer to aCharPointer + 1
      
if aCharPointer > aCharLLen then
        set aCharPointer to 1
      end if
    end repeat
  else
    –指定文字で作成する文字グラフ
    
repeat with i in bList
      set j to contents of i
      
      
set aLabel to (contents of item iCounter of labelList) as string
      
set aLabel to paddingSpacesAfter(aLabel, tMax, " ") of me
      
      
set resText to (resText & aLabel & tab & tab & makeCharRep(j, charFlag) of me & " " & j as string) & return
      
      
set iCounter to iCounter + 1
      
set aCharPointer to aCharPointer + 1
      
if aCharPointer > aCharLLen then
        set aCharPointer to 1
      end if
    end repeat
  end if
  
  
return resText
end retCharBarChart

–指定文字を指定回数連結したテキストを返す
on makeCharRep(aNum, aChar)
  set aText to ""
  
repeat aNum times
    set aText to aText & aChar
  end repeat
  
return aText
end makeCharRep

–指定文字列に、指定の長さまで空白文字列を追加
on paddingSpacesAfter(aDat as string, targLen as integer, padStr as {boolean, string})
  set dLen to length of aDat
  
if dLen > targLen then error "Logical error: Target length is shorter than data length"
  
copy aDat to aStr
  
  
set padStr to makeCharRep(targLen – dLen, padStr) of me
  
return aStr & padStr
end paddingSpacesAfter

–1D Listで最長の文字列の文字数を返す
on maximumItemLengthFromList(nList as list)
  script o
    property nl : nList
    
property itemNo : 1
  end script
  
  
set max to length of (item 1 of o’s nl)
  
  
repeat with i from 2 to (count nList)
    set n to length of (item i of o’s nl)
    
if n > max then
      set max to n
      
set o’s itemNo to i
    end if
  end repeat
  
return length of (contents of (item (o’s itemNo) of nList))
end maximumItemLengthFromList

★Click Here to Open This Script 

Posted in dialog | Tagged 13.0savvy 14.0savvy 15.0savvy 26.0savvy | Leave a comment

MacBook Air/MacBook Proのディスプレイ開閉角度を取得

Posted on 9月 23 by Takaaki Naganoya

samhenrigold氏によるLid Angle SensorをCocoa Framework化して呼び出して、MacBook Air/MacBook Proのディスプレイ開閉角度を取得するAppleScriptです。画面角度センサーを持たないMac miniなどで実行した場合には値を返さず処理終了します。


▲左:119度 右:90度 センサーが返してくる値と実際の画面角度の値には若干の「差」がある。0度の開始値が若干画面が開いた状態になっている?

本記事に掲載しているAppleScriptのプログラムリストだけでは実行できないため、下記のリンクからFrameworkバイナリ入りのScript Bundleをダウンロードして実行してください。

Apple Silicon Macでは実行確認していますが、Intel Macで動くかどうかは未検証です。一応、githubのsamhenrigoldの説明によると2019年のMacBook Pro以降で導入されたセンサーとのことで、Intel Macでも当該モデルであれば動作することが期待されます。

ただし、M1 MacBook Air/Proで問題が発生することが報告されているようです(自分は実機で確認していません。センサー値の取得だけなら問題が起きないのか、センサー値の取得で問題が起きているのか)。

同プログラムをCocoa Framework化して呼び出しているため(Universal Binary)、Script Debuggerおよび同環境で書き出したEnhanced Appletなどで実行可能です。

→ Download Script Bundle with Framework

→ Download angleSensorKit Xcode Project

AppleScript名:画面開閉角度センサーの値を取得.scptd
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/09/07
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.4" — Yosemite (10.10) or later
use framework "Foundation"
use framework "angleSensorKit" — Created by Sam on 2025-09-06. https://github.com/samhenrigold/LidAngleSensor
use scripting additions

set anASensor to current application’s LidAngleSensor’s alloc()’s init()

set aRes to anASensor’s isAvailable() as boolean
if aRes = false then return —Maybe not MacBook Air/Pro
set sensorVal to anASensor’s lidAngle()

return sensorVal

★Click Here to Open This Script 

Posted in System | Tagged 15.0savvy 26.0savvy | Leave a comment

スクリプトメニューでAirDropが使えない?

Posted on 9月 23 by Takaaki Naganoya

macOS 15/26にて、AirDropをAppleScriptから利用するAirSharing Libを、スクリプトメニューに入れたAppleScriptから呼び出せないという現象に直面しています。

スクリプトエディタ上で動かすと動作するのですが、スクリプトメニューから動かすとまったく動作しません。一般ユーザー向けのAppleScript実行環境であるスクリプトメニューで動作しないのはかなり問題です。

AirSharing LibはもともとSal Soghoianが書いたプログラムにWiFi制御系のコードを追加して書いたものですが、現状のmacOS 15上で動作する最低限の記述だとこんな感じ(↓)です。

スクリプトメニュー上で動作するために、何かの「おまじない」が必要なのか、そもそもスクリプトメニューの仕様上それが禁止されるようになったのか? なかなか不思議なところです。

動作確認できたAppleScript実行環境:
スクリプトエディタ、Script Debugger、Switch Control、Automator、Claris FileMaker Pro 2025、FastScript 3、Xojo 2025

AppleScript名:AirDropTest.scptd
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/09/23
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.8"
use framework "Foundation"
use framework "AppKit"
use scripting additions

property airDropService : missing value

set theFile to POSIX path of (choose file with prompt "AirDropで共有するファイルを選んでください:")

my performSelectorOnMainThread:"shareWithAir:" withObject:(theFile) waitUntilDone:true
–my shareWithAir:theFile–for debug

on shareWithAir:thePOSIXFile
  set theFile to thePOSIXFile as string
  
set fileURL to current application’s NSURL’s fileURLWithPath:(theFile)
  
  
— AirDrop用の共有サービスを取得
  
set airDropService to current application’s NSSharingService’s sharingServiceNamed:(current application’s NSSharingServiceNameSendViaAirDrop)
  
  
if airDropService ≠ missing value then
    airDropService’s performSelectorOnMainThread:"performWithItems:" withObject:{fileURL} waitUntilDone:true
  else
    display dialog "AirDrop共有サービスが利用できません。" buttons {"OK"} default button 1
  end if
end shareWithAir:

★Click Here to Open This Script 

Posted in AirDrop Bug Library | Tagged 15.0savvy 26.0savvy | Leave a comment

各種GUIアプリ書類のオープン速度を向上するためにUIアニメーションの一時停止を

Posted on 9月 22 by Takaaki Naganoya

AppleScriptから各種GUIアプリを操作すると、各種GUIアプリ上の操作に要する時間がそのまま必要になります。端的なところでいえば、書類のオープン時のアニメーションも毎回行われるわけで、割と無意味なアニメーションに、そこそこの時間が消費されています。

そのUIアニメーションを無効化する処理について調査したところ、割と簡単に情報が見つかりました。

ここに掲載しているサンプルAppleScript(要・Metadata Lib)では、Finder上の最前面のウィンドウで選択中のフォルダ以下にあるPages書類をSpotlightの機能を用いてすべてピックアップし、それらを「UIアニメーションあり」「UIアニメーションなし」の条件でオープン/クローズだけ行うものです。

結論をいうと、M2 MacBook Air上で通常のUIアニメーションつきの処理では68秒かかっていたものが、UIアニメーションを無効化するだけで43秒で処理できました(125個のPages書類で実験)。

これはちょうど、M1 MacからM4 Macに買い替えるぐらいの処理速度の向上が、ただUIアニメーションを無効にするだけで実現できたということを意味します。

1書類あたり0.2秒の処理速度向上が見られたわけですが、これが400個の書類を処理するとなれば80秒も変わってくるわけで、割と洒落にならない速度向上が実現できます。もっと早く調べておけばよかったと思うことしきりです。

AppleScript名:UI アニメーションの無効化による速度向上実験.scptd
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/09/22
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.4" — Yosemite (10.10) or later
use framework "Foundation"
use scripting additions
use mdLib : script "Metadata Lib"

tell application "Finder"
  set aSel to (selection as alias list)
  
if aSel = {} then
    set origPath to choose folder
  else
    set origPath to (first item of aSel)
  end if
end tell

–SpotlightでPages書類を検出
set aResList to perform search in folders {origPath} predicate string "kMDItemContentType == %@ || kMDItemContentType == %@" search arguments {"com.apple.iwork.pages.sffpages", "com.apple.iwork.pages.pages"}
–return aResList

–UI Animationを許可
set a1Dat to current application’s NSDate’s timeIntervalSinceReferenceDate()
openClosePagesDocs(aResList, true) of me
set b1Dat to current application’s NSDate’s timeIntervalSinceReferenceDate()
set c1Dat to b1Dat – a1Dat

–UI Animationを禁止
set a2Dat to current application’s NSDate’s timeIntervalSinceReferenceDate()
openClosePagesDocs(aResList, false) of me
set b2Dat to current application’s NSDate’s timeIntervalSinceReferenceDate()
set c2Dat to b2Dat – a2Dat

return {c1Dat, c2Dat, length of aResList}

on openClosePagesDocs(aResList, animationF)
  if animationF = true then
    –UI Animationをオンにする
    
try
      do shell script "defaults delete NSGlobalDomain NSAutomaticWindowAnimationsEnabled"
    end try
  else –UI Animationをオフにする
    do shell script "defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO"
  end if
  
  
–Pages書類を順次オープンしてタイトル(?)を取得
  
set pagesTitleList to {}
  
repeat with i in aResList
    set aFile to POSIX file i
    
    
tell application "Pages"
      open (aFile as alias)
    end tell
    
    
tell application "Pages"
      close front document saving no
    end tell
    
  end repeat
  
  
if animationF = false then
    –UI Animationをオンにする
    
try
      do shell script "defaults delete NSGlobalDomain NSAutomaticWindowAnimationsEnabled"
    end try
  end if
end openClosePagesDocs

★Click Here to Open This Script 

Posted in shell script Spotlight | Tagged 13.0savvy 14.0savvy 15.0savvy Pages | Leave a comment

指定フォルダ内から指定拡張子のファイルを取得し、エイリアスだったらオリジナルのパスをPOSIX pathで取得

Posted on 9月 20 by Takaaki Naganoya

指定フォルダから、指定拡張子のファイルを取得し、取得したファイルがエイリアス書類だったらオリジナルのパスを返すAppleScriptです。

AppleScriptを指定スケジュールで実行するAppleScriptを作成しており、スケジュールフォルダ以下に「毎月15日 15時」といった名前のフォルダを作っておき、その中に入れたAppleScriptを指定スケジュールで実行するようにしてありました。

ただ、フォルダ内に入れるのが「AppleScript書類そのもの」だと、運用上いろいろまずい(同じScriptの複製が大量にできてしまうとか)ので、エイリアスを入れても反応するように、本Scriptを書いてみた次第です。

割とちゃんと動いているように見えます。

2025/9/29修正:
処理対象にエイリアス書類「ではなく」本物のファイルが指定されていた(=エイリアス書類ではなかった)場合にエラーになっていました。作成・使用目的は「エイリアス書類の実体の追跡」ではあったものの、実体のファイルに行き当たった場合にエラーになるのは意図しない動作です。

このため、掲載リストを一部修正しました。

AppleScript名:指定フォルダ内から指定拡張子のファイルを取得し、エイリアスだったらオリジナルのパスをPOSIX pathで取得.scptd
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/09/19
–  Modified on: 2025/09/29
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.8"
use framework "Foundation"
use scripting additions

set aRoot to choose folder

set scptList to getFilePathListWithResolveAlias(aRoot, "scpt") of me
–> {"/Users/me/Documents/sample2.scpt", "/Users/me/Documents/sample1.scpt"}

on getFilePathListWithResolveAlias(aFol, aExt)
  set aURL to current application’s |NSURL|’s fileURLWithPath:(POSIX path of aFol)
  
# 指定フォルダの直下のファイルを取得
  
set filePaths to current application’s NSFileManager’s defaultManager’s ¬
    contentsOfDirectoryAtURL:aURL ¬
      includingPropertiesForKeys:{current application’s NSURLNameKey} ¬
      
options:(current application’s NSDirectoryEnumerationSkipsHiddenFiles) ¬
      
|error|:(missing value)
  set f0List to filePaths as list
  
if f0List = {} then return {}
  
  
set f2List to {}
  
repeat with i in f0List
    set tmpPath1 to POSIX path of i
    
set tmpPath2 to (my fullpathOfOriginalFileForAlias:tmpPath1)
    
set tmpPath to (current application’s NSString’s stringWithString:(tmpPath2))
    
set the end of f2List to tmpPath as string
  end repeat
  
  
return f2List
end getFilePathListWithResolveAlias

–エイリアスファイルのパスからオリジナルのファイルパス(POSIX Path)を返す
on fullpathOfOriginalFileForAlias:posixPath
  tell current application’s |NSURL|
    set anNSURL to its fileURLWithPath:posixPath
    
set theData to its bookmarkDataWithContentsOfURL:anNSURL |error|:(missing value)
    
set theResult to its resourceValuesForKeys:{current application’s NSURLPathKey} fromBookmarkData:theData
  end tell
  
  
if theResult = missing value then return posixPath
  
  
return (theResult’s objectForKey:(current application’s NSURLPathKey)) as text
end fullpathOfOriginalFileForAlias:

★Click Here to Open This Script 

Posted in File path | Tagged 13.0savvy 14.0savvy 15.0savvy 26.0savvy | Leave a comment

macOS 15.xで自作AppleScriptライブラリの一部がScript Menuから使えなくなったので修正

Posted on 9月 19 by Takaaki Naganoya

X(旧Twitter)上でPiyomaru SoftwareのAppleScriptライブラリについてフィードバックをいただきました。おおよそ改修が済んでいるため、ドキュメントを書き次第、最新版をBlogからダウンロードできるようにしておきます。

こうしたフィードバックを得るために公開しているので、動作しないとか、予想外の動作を行った場合にはフィードバックしていただきたいところです(すぐに対処できる保証はないのですが)。

確認された現象

Piyomaru Software制作のAppleScriptライブラリの一部で、macOS 15.xのスクリプトメニューに呼び出しScriptを入れた場合に実行できないものがありました。その一方で、スクリプトエディタ/Script Debugger上では実行できます。

・AirSharing Lib
・Choose location Lib
・Display Youtube Lib
・Pickup Color Lib

修正して動作するようになった事例

CheckboxLibについては、SDEF中のdocumentからのムービーおよび画像へのリンクを削除。

Enumをas stringでstringにcast処理していた箇所が、スクリプトメニュー上では動作しなくなっていた(→ stringへのcastをやめることで問題解消)。

choose color Libも同様に、Enumをas stringでstringにcast処理していた場所で、スクリプトメニュー上では動作しなくなっていたので修正。

動作条件そのものが変更になったライブラリ

・Display youtube Lib
macOS 15上ではInfo.plistにNSAppTransportSecurityのエントリを追加してアプレット書き出しが必要です。
ただし、macOS 26上ではスクリプトメニュー上で呼び出しScriptを実行しても、問題なくYouTubeムービーの再生が可能です。

問題を解消できていないライブラリ

目下、スクリプトメニューから呼び出すと動作しないライブラリは以下の通り。

・AirSharing Lib
・Choose location Lib

Posted in Library | Tagged 15.0savvy 26.0savvy | Leave a comment

シンプルな文字置換

Posted on 9月 13 by Takaaki Naganoya

AppleScriptで文字置換を行う場合には、いくつかの方法があります。

①text item delimitersを利用する

AppleScriptの登場以来、利用されてきた方法です。AppleScriptの処理系では最速といってよい方法ですが、複数の箇所を一気に置換するのでやや過剰なのと処理方法が独特なので敬遠する人もいるようです。

また、処理対象の文字列のサイズが数Mバイト以上になると、処理が終了しなかったりします。巨大な文字列の置換には⑤が推奨されます。CotEditorのようなScriptableなテキストエディタの機能を利用するのもアリでしょう。

AppleScript名:文字置換(最短).scpt
set origText to "abcdefg"
set targStr to "de"
set repStr to "xx"

set a to repChar(origText, targStr, repStr) of me
–> "abcxxfg"

–Written By Philip Aker
–文字置換ルーチン
on repChar(origText as string, targStr as string, repStr as string)
  set {txdl, AppleScript’s text item delimiters} to {AppleScript’s text item delimiters, targStr}
  
set temp to text items of origText
  
set AppleScript’s text item delimiters to repStr
  
set res to temp as text
  
set AppleScript’s text item delimiters to txdl
  
return res
end repChar

★Click Here to Open This Script 

②shellコマンドを利用する

do shell scriptコマンド経由で置換コマンドを利用する方法です。Mac OS X以降後に利用できるようになったものですが、日本語に対して正確に置換できるのか不安が残るので、個人的にはあまり積極的には利用していません。

③OSAXを利用する

macOS 10.15でサードパーティのOSAX(Scripting Additions)が廃止されたため、現在では利用できません。

④AppleScript Librariesを利用する

Shane StanleyのRegexAndStuffLibなどのライブラリを用いて正規表現を用いた文字置換を利用するものです。

⑤Cocoaの機能を利用する

Cocoaの機能を呼び出して文字置換を行うものです。いくつも利用できる機能があります。正規表現を使うものなど、お好きなものを利用してください。

AppleScript名:ASOCで文字置換5.scptd
— Created 2015-06-30 by Takaaki Naganoya
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set a to "あいうえお++かきくけこ"
set b to cleanUpText(a, "+", "●")
–> "あいうえお●●かきくけこ"

on cleanUpText(someText, targStr, repStr)
  set theString to current application’s NSString’s stringWithString:someText
  
set targString to current application’s NSString’s stringWithString:targStr
  
set repString to current application’s NSString’s stringWithString:repStr
  
  
set theString to theString’s stringByReplacingOccurrencesOfString:targString withString:repString options:(current application’s NSRegularExpressionSearch) range:{location:0, |length|:length of someText}
  
return theString as text
end cleanUpText

★Click Here to Open This Script 

これらに加えて、もっと簡単な方法がないかと探してみたら、

⑥offset ofで文字列検索して置換を行う

offset ofで置換対象の文字列を検索して置換を行います。オリジナル文字列に対して置換対象の文字列の位置が「冒頭ではない」「末尾ではない」という条件がそろっていて、かつ置換対象が0ないし1回しか対象文字列中に存在しないことが事前に分かりきっている場合にのみ使えます。

set urlData to "https://www.amazon.co.jp/gp/css/summary/print.html/ref=oh_aui_ajax_invoice"

set anOffset to offset of "/gp/" in urlData
set newURL to (text 1 thru (anOffset + (length of "/gp/") – 1) of urlData) & "legacy" & (text (anOffset + (length of "/gp/") – 1) thru -1 of urlData)

–> "https://www.amazon.co.jp/gp/legacy/css/summary/print.html/ref=oh_aui_ajax_invoice"

★Click Here to Open This Script 

このぐらいで使えますが、本当にすべてのパターンを利用するには、場合分けしつつ書く必要があります。シンプルなはずなのに、シンプルになっていないという。

AppleScript名:単純文字置換.scpt
set urlData1 to "https://www.amazon.co.jp/gp/css/summary/print.html/ref=oh_aui_ajax_invoice"
set newURL1 to replaceOne(urlData1, "/gp/", "/gp/legacy/") of me
–> "https://www.amazon.co.jp/gp/legacy/css/summary/print.html/ref=oh_aui_ajax_invoice"

set urlData2 to "https://www.amazon.co.jp/css/summary/print.html/ref=oh_aui_ajax_invoice/gp/"
set newURL2 to replaceOne(urlData2, "/gp/", "/gp/legacy/") of me
–> "https://www.amazon.co.jp/css/summary/print.html/ref=oh_aui_ajax_invoice/gp/legacy/"

set urlData3 to "https://www.amazon.co.jp/css/summary/print.html/ref=oh_aui_ajax_invoice/gp/"
set newURL3 to replaceOne(urlData3, "https://", "http://") of me
–> "http://www.amazon.co.jp/css/summary/print.html/ref=oh_aui_ajax_invoice/gp/"

on replaceOne(origStr as string, targStr as string, repStr as string)
  set anOffset to offset of targStr in origStr
  
if anOffset = 0 then return origStr
  
set {aLen, bLen} to {length of origStr, length of targStr}
  
  
if anOffset + bLen > aLen then
    –置換対象文字が末尾にある場合
    
set newStr1 to (text 1 thru (anOffset – 1) of origStr)
    
set newStr2 to ""
  else if anOffset = 1 then
    –置換対象文字が先頭にある場合
    
set newStr2 to (text (anOffset + ((length of targStr))) thru -1 of origStr)
    
set newStr1 to ""
  else
    –通常パターン
    
set newStr1 to (text 1 thru (anOffset – 1) of origStr)
    
set newStr2 to (text (anOffset + ((length of targStr))) thru -1 of origStr)
  end if
  
return newStr1 & repStr & newStr2
end replaceOne

★Click Here to Open This Script 

Posted in Text | Tagged 13.0savvy 14.0savvy 15.0savvy 26.0savvy | Leave a comment

暗黙のuseコマンド

Posted on 9月 2 by Takaaki Naganoya

かつてAppleScript関連で大きな議論を呼んだ話題に「暗黙のrunハンドラ」というものがありました。

何も書かないAppleScriptのプログラムに暗黙のrunハンドラが存在している(ように動く)という話です。

現在でも同様に、

「明確に仕様として明記されていないものの、おそらくこういう動作になっているだろう」

と推測して書いているものがあります。それが、暗黙のuseコマンドです。

useコマンドはデフォルトで指定されている

何もuseコマンドを書かなくても、仮にuseコマンドを記述しても、パラメータを指定しない場合にはデフォルト値が

use AppleScript
無指定時には、現在実行中のバージョンのAppleScriptで動作するようになっているようです。

use scripting additions
macOS 10.15以降はサードパーティのScripting Additionのサポートが廃止されたため、Apple純正のStandard Additionsのオン/オフ設定コマンドという位置付けになっているようです。

use framework
この記述では、とくに無指定時のデフォルト値というものはないようです。

ただし、Vanilla ScriptとCocoa Scriptで動作が異なっています。また、Script Object内に記述したAppleScriptでも動作が変わります。

AppleScript名:scripting additions 1.scpt
display dialog "TEST"

★Click Here to Open This Script 

AppleScript名:scripting additions in script object.scpt

testScript’s testMes("TEST")

script testScript
  on testMes(aMes as string)
    display dialog aMes
  end testMes
end script

★Click Here to Open This Script 

AppleScript名:scripting additions 2.scpt
use AppleScript
use framework "Foundation"

–display dialog "TEST"–構文チェック自体できない

★Click Here to Open This Script 

AppleScript名:scripting additions in script object.scpt
use AppleScript
use framework "Foundation"

testScript’s testMes("TEST")

script testScript
  use AppleScript
  
use framework "Foundation"
  
use scripting additions –ないと、構文確認をパスできない
  
property parent : AppleScript –なくても動く。Scriptオブジェクトの階層を増やすと必須になったりする
  
  
on testMes(aMes as string)
    display dialog aMes
  end testMes
  
  
on testMes2(aMes as string)
    using terms from scripting additions —どの用語辞書の予約語かを明示的に指定するよう構文確認時に求められるケースがある
      display dialog aMes
    end using terms from
  end testMes2
end script

★Click Here to Open This Script 

Posted in Scripting Additions | Tagged 13.0savvy 14.0savvy 15.0savvy | Leave a comment

開始時刻から終了時刻までhh:mm形式の文字列を15分単位でリスト出力

Posted on 8月 13 by Takaaki Naganoya

指定の開始時刻から終了時刻まで、hh:mm形式の文字列を15分間隔でリスト出力するAppleScriptです。

ありもののサブルーチンを組み合わせて即席で作ったCocoa版のルーチンと、ChatGPT(GPT-5)に書かせた非Cocoa版のルーチンの2つがあり(ChatGPTにCocoa使用を指定せず)、速度を比較してみたら……

非Cocoa版のルーチンのほうが6倍ぐらい高速でした。データが小さすぎるとか、処理内容が小さすぎる場合にはCocoaの機能を利用しないほうが高速に処理できる場合があります。

Shane Stanleyの処理時間計測アプリ「ScriptGeek」が、かなりCocoa Scriptingの登場初期から存在しており、不思議に思ってきたものですが……処理内容の規模によってはCocoa Scriptingのほうが遅くなるケースがあるため、実際に書いて動かして計測してみないと、Cocoa Scriptingで高速化が達成できるかわからないところです。

このほか、AppleScriptのランタイム環境が何になるかによって実行速度は変わってきます。Xcode上で開発するCocoa Applicationなども実行特性が違うため、やはり動かして計測してみないと何がベストなのかはわかりません。

ただ、この程度の処理であれば、0.0028秒が0.4秒になったところで、何か実用上の差異が発生するわけでもありません。

追記:
追加で最速パターンを掲載しておきます。汎用性を求めて計算して出力していましたが、ほとんどの用途で毎回同じようなデータを出力することでしょう。なので、固定データを返すだけでいいだろうかと。高速版とくらべても65〜70倍ぐらい高速です(当たり前)。

AppleScript名:15分メッシュの時間文字列を生成.scptd
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/08/13
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.4" — Yosemite (10.10) or later
use framework "Foundation"
use scripting additions

set aRes to generateWorkUnitList() of me
–> {"5:15", "5:30", "5:45", "6:00", "6:15", "6:30", "6:45", "7:00", "7:15", "7:30", "7:45", "8:00", "8:15", "8:30", "8:45", "9:00", "9:15", "9:30", "9:45", "10:00", "10:15", "10:30", "10:45", "11:00", "11:15", "11:30", "11:45", "12:00", "12:15", "12:30", "12:45", "13:00", "13:15", "13:30", "13:45", "14:00", "14:15", "14:30", "14:45", "15:00", "15:15", "15:30", "15:45", "16:00", "16:15", "16:30", "16:45", "17:00", "17:15", "17:30", "17:45", "18:00", "18:15", "18:30", "18:45", "19:00", "19:15", "19:30", "19:45", "20:00", "20:15", "20:30", "20:45"}

on generateWorkUnitList()
  set hList to {}
  
  
repeat with h from 5 to 20 by 1
    repeat with m from 0 to 59 by 15
      if {h, m} is not equal to {5, 0} then
        set mStr to numToZeroPaddingStr(m, 2, "0")
        
set the end of hList to (h as string) & ":" & mStr
      end if
    end repeat
  end repeat
  
  
return hList
end generateWorkUnitList

–整数の値に指定桁数ゼロパディングして文字列で返す
on numToZeroPaddingStr(aNum as integer, aDigit as integer, paddingChar as text)
  set aNumForm to current application’s NSNumberFormatter’s alloc()’s init()
  
aNumForm’s setPaddingPosition:(current application’s NSNumberFormatterPadBeforePrefix)
  
aNumForm’s setPaddingCharacter:paddingChar
  
aNumForm’s setMinimumIntegerDigits:aDigit
  
  
set bNum to current application’s NSNumber’s numberWithInt:aNum
  
set aStr to aNumForm’s stringFromNumber:bNum
  
  
return aStr as text
end numToZeroPaddingStr

★Click Here to Open This Script 

AppleScript名:15分メッシュの時間文字列を生成(高速).scpt
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/08/13
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.4" — Yosemite (10.10) or later
use framework "Foundation"
use scripting additions

set mList to retWorkingMeshStrList() of me
–> {"5:15", "5:30", "5:45", "6:00", "6:15", "6:30", "6:45", "7:00", "7:15", "7:30", "7:45", "8:00", "8:15", "8:30", "8:45", "9:00", "9:15", "9:30", "9:45", "10:00", "10:15", "10:30", "10:45", "11:00", "11:15", "11:30", "11:45", "12:00", "12:15", "12:30", "12:45", "13:00", "13:15", "13:30", "13:45", "14:00", "14:15", "14:30", "14:45", "15:00", "15:15", "15:30", "15:45", "16:00", "16:15", "16:30", "16:45", "17:00", "17:15", "17:30", "17:45", "18:00", "18:15", "18:30", "18:45", "19:00", "19:15", "19:30", "19:45", "20:00"}

on retWorkingMeshStrList()
  set startSeconds to (5 * 3600) + (15 * 60) — 5:15 の相対秒
  
set endSeconds to (20 * 3600) — 20:00 の相対秒
  
set intervalSeconds to 15 * 60 — 15分間隔
  
  
set timeList to {}
  
  
repeat with t from startSeconds to endSeconds by intervalSeconds
    set h to t div 3600
    
set m to (t mod 3600) div 60
    
— 2桁表示に整形
    
–set hStr to text -2 thru -1 of ("0" & h)
    
set hStr to h as string
    
set mStr to text -2 thru -1 of ("0" & m)
    
set end of timeList to (hStr & ":" & mStr)
  end repeat
  
  
return timeList
end retWorkingMeshStrList

★Click Here to Open This Script 

AppleScript名:15分メッシュの時間文字列を生成(最速).scptd
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/08/10
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.4"
use framework "Foundation"
use scripting additions

set hList to generateWorkUnitList() of me

on generateWorkUnitList()
  return {"5:15", "5:30", "5:45", "6:00", "6:15", "6:30", "6:45", "7:00", "7:15", "7:30", "7:45", "8:00", "8:15", "8:30", "8:45", "9:00", "9:15", "9:30", "9:45", "10:00", "10:15", "10:30", "10:45", "11:00", "11:15", "11:30", "11:45", "12:00", "12:15", "12:30", "12:45", "13:00", "13:15", "13:30", "13:45", "14:00", "14:15", "14:30", "14:45", "15:00", "15:15", "15:30", "15:45", "16:00", "16:15", "16:30", "16:45", "17:00", "17:15", "17:30", "17:45", "18:00", "18:15", "18:30", "18:45", "19:00", "19:15", "19:30", "19:45", "20:00"}
end generateWorkUnitList

★Click Here to Open This Script 

Posted in date list Text | Tagged 14.0savvy 15.0savvy 26.0savvy ChatGPT | Leave a comment

Adobe InDesignのAppleScript実行エンジンがCarbonからCocoaベースに書き換えられる

Posted on 7月 30 by Takaaki Naganoya

最新のAdobe InDesignにおいて、AppleScriptの実行エンジンが従来のCarbonベースのものから、Cocoaベースのものに置き換えられるという情報が入ってきました。

実行エンジンの切り替えにともない、利用できる各種機能に変更点があるかどうかは未確認です。

従来のAdobe InDesignのAppleScript実行エンジンはCocoa系の機能実行に関しては最強レベルのものが搭載されており、Script Debugger並みのユーザーディレクトリ下のFramework呼び出しをはじめ、最強クラスの実行エンジンが搭載されていました。

通常のAppleScript実行はもちろんのこと、幅広い対応を行なっていたCocoa Scripting機能対応が、どの程度新エンジンに継承されているかがみどころです。評価できるといいのに。

Posted in news | Tagged 15.0savvy InDesign | Leave a comment

Claris FileMaker Pro 2025(v22)がリリースされた

Posted on 7月 12 by Takaaki Naganoya

Appleの子会社であるClarisから、Claris FileMaker Pro 2025(v22)がリリースされました。

AppleScript名:Claris FileMaker Pro 2025のバージョン番号取得.scpt
tell application "FileMaker Pro"
  version
  
–> "22.0.1"
end tell

★Click Here to Open This Script 

AppleScript用語辞書は前バージョンから変更されていません。

Posted in news | Tagged 14.0savvy 15.0savvy 26.0savvy | Leave a comment

ASCII ARTで直線を引く v3.1

Posted on 7月 8 by Takaaki Naganoya

ASCII ARTで指定の2点間に線を引くAppleScriptです。(デモ用の)文字で表現するゲームを作る場合に、基礎ルーチンを整備しておく必要性を感じて、書いておきました。

AppleScript名:ASCII ARTで直線を引く v3.1.scpt
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/07/07
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

property widthCount : 40
property heightCount : 25
property spaceChar : " "
property drawChar : "■"

— 使用例
set canvas to makeBlankCanvas() of me

set canvas to drawLine(canvas, 0, 0, 39, 24, 1) of me — 太さ1の線

set curDelim to AppleScript’s text item delimiters
set AppleScript’s text item delimiters to return
set resultText to canvas as text
set AppleScript’s text item delimiters to curDelim

return resultText

on makeBlankCanvas()
  set blankLine to ""
  
repeat widthCount times
    set blankLine to blankLine & spaceChar
  end repeat
  
set canvas to {}
  
repeat heightCount times
    set end of canvas to blankLine
  end repeat
  
return canvas
end makeBlankCanvas

on drawLine(canvas, x0, y0, x1, y1, thickness)
  script spd
    property drawnPositions : {}
    
property drawXCoords : {}
    
property canvas : {}
    
property lineChars : {}
  end script
  
  
copy canvas to (canvas of spd)
  
  
set dx to x1 – x0
  
set dy to y1 – y0
  
set lineLength to (dx * dx + dy * dy) ^ 0.5
  
  
if lineLength = 0 then
    if x0 ≥ 0 and x0 < widthCount and y0 ≥ 0 and y0 < heightCount then
      set theLine to item (y0 + 1) of (canvas of spd)
      
set newLine to replaceCharAt(theLine, x0 + 1, drawChar)
      
set item (y0 + 1) of (canvas of spd) to newLine
    end if
    
    
return (canvas of spd)
  end if
  
  
set nx to –dy / lineLength
  
set ny to dx / lineLength
  
  
set halfThickness to (thickness – 1) / 2
  
if halfThickness < 0 then set halfThickness to 0
  
  
set x to x0
  
set y to y0
  
  
set dxAbs to absNum(dx) of me
  
set dyAbs to absNum(dy) of me
  
set sx to signNum(dx) of me
  
set sy to signNum(dy) of me
  
set err to dxAbs – dyAbs
  
  
set (drawnPositions of spd) to {}
  
  
repeat
    set (drawXCoords of spd) to {}
    
repeat with t from –halfThickness to halfThickness
      set pxF to x + nx * t
      
set pxInt to pxF as integer
      
if pxInt ≥ 0 and pxInt < widthCount then
        if (drawXCoords of spd) does not contain pxInt then
          set end of (drawXCoords of spd) to pxInt
        end if
      end if
    end repeat
    
    
set pyInt to y as integer
    
if pyInt ≥ 0 and pyInt < heightCount then
      set theLine to item (pyInt + 1) of (canvas of spd)
      
set (lineChars of spd) to characters of theLine
      
      
repeat with pxInt in (drawXCoords of spd)
        set posKey to (pxInt as string) & "," & (pyInt as string)
        
        
if (drawnPositions of spd) does not contain posKey then
          set item (pxInt + 1) of (lineChars of spd) to drawChar
          
set end of (drawnPositions of spd) to posKey
        end if
        
      end repeat
      
      
set newLine to (lineChars of spd) as string
      
set item (pyInt + 1) of (canvas of spd) to newLine
    end if
    
    
if x = x1 and y = y1 then exit repeat
    
    
set e2 to 2 * err
    
if e2 > –dyAbs then
      set err to err – dyAbs
      
set x to x + sx
    end if
    
    
if e2 < dxAbs then
      set err to err + dxAbs
      
set y to y + sy
    end if
  end repeat
  
  
return (canvas of spd)
end drawLine

on replaceCharAt(str, pos, char)
  if pos < 1 or pos > (length of str) then return str
  
set prefix to text 1 thru (pos – 1) of str
  
set suffix to text (pos + 1) thru -1 of str
  
return prefix & char & suffix
end replaceCharAt

on absNum(n)
  if n < 0 then return –n
  
return n
end absNum

on signNum(n)
  if n > 0 then return 1
  
if n < 0 then return -1
  
return 0
end signNum

★Click Here to Open This Script 

Posted in Text | Tagged 13.0savvy 14.0savvy 15.0savvy 26.0savvy | Leave a comment

ASCII ARTで円を塗る

Posted on 7月 5 by Takaaki Naganoya

ASCII ARTで円を塗りつぶすAppleScriptです。(デモ用の)文字で表現するゲームを作る場合に、基礎ルーチンを整備しておく必要性を感じて、書いておきました。

AppleScript名:ASCII ARTで円を塗る.scpt
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/07/04
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.4" — Yosemite (10.10) or later
use framework "Foundation"
use scripting additions

— 円の半径 (この数値を変更すると円の大きさが変わります)
set radiusNum to 12

— キャンバスのサイズ
set canvasWidth to 80
set canvasHeight to 40

— 円の中心座標
set centerX to canvasWidth / 2
set centerY to canvasHeight / 2

— 全角文字のアスペクト比補正係数
set aspectRatio to 0.7
set aaRes to aaFillCircle(radiusNum, canvasWidth, canvasHeight, centerX, centerY, aspectRatio) of me

on aaFillCircle(radiusNum, canvasWidth, canvasHeight, centerX, centerY, aspectRatio)
  script spd
    property outputText : ""
  end script
  
  
— 描画結果を格納する変数
  
set (outputText of spd) to ""
  
  
— 描画処理 (1行ずつ文字を生成)
  
repeat with y from 1 to canvasHeight
    set currentLine to ""
    
repeat with x from 1 to canvasWidth
      — 円の方程式を使い、中心からの距離を計算
      
set distSquared to ((x – centerX) * aspectRatio) ^ 2 + (y – centerY) ^ 2
      
      
— 現在の座標が円の内側または円周上にあるか判定
      
if distSquared ≤ radiusNum ^ 2 then
        set currentLine to currentLine & "■"
      else
        set currentLine to currentLine & " "
      end if
    end repeat
    
— 1行分の文字列と改行を出力に追加
    
set (outputText of spd) to (outputText of spd) & currentLine & "
"
  end repeat
  
  
return contents of (outputText of spd)
end aaFillCircle

★Click Here to Open This Script 

Posted in Text | Tagged 13.0savvy 14.0savvy 15.0savvy | Leave a comment

ASCII ARTで円を線で描く

Posted on 7月 5 by Takaaki Naganoya

ASCII ARTで円を線で描くAppleScriptです。(デモ用の)文字で表現するゲームを作る場合に、基礎ルーチンを整備しておく必要性を感じて、書いておきました。

AppleScript名:ASCII ARTで円を線で描く.scpt
—
–  Created by: Takaaki Naganoya
–  Created on: 2025/07/04
—
–  Copyright © 2025 Piyomaru Software, All Rights Reserved
—

use AppleScript version "2.4" — Yosemite (10.10) or later
use scripting additions

set radiusNum to 12

— キャンバスのサイズ
set canvasWidth to 80
set canvasHeight to 40

— 円の中心座標
set centerX to canvasWidth / 2
set centerY to canvasHeight / 2

— 全角文字のアスペクト比補正係数
set aspectRatio to 0.7

— 描画する線の太さ
set lineWidth to 0.5
set ssRes to aaDrawCircleLine(radiusNum, canvasWidth, canvasHeight, centerX, centerY, aspectRatio, lineWidth) of me

on aaDrawCircleLine(radiusNum, canvasWidth, canvasHeight, centerX, centerY, aspectRatio, lineWidth)
  script spd
    property outputText : ""
  end script
  
  
— 描画結果を格納する変数
  
set (outputText of spd) to ""
  
  
— 描画処理 (1行ずつ文字を生成)
  
repeat with y from 1 to canvasHeight
    set currentLine to ""
    
repeat with x from 1 to canvasWidth
      — 円の方程式を使い、中心からの距離を計算
      
set distSquared to ((x – centerX) * aspectRatio) ^ 2 + (y – centerY) ^ 2
      
      
— 現在の座標が円周上にあるか判定
      
if (distSquared > (radiusNum – lineWidth) ^ 2) and (distSquared < (radiusNum + lineWidth) ^ 2) then
        set currentLine to currentLine & "■"
      else
        set currentLine to currentLine & " "
      end if
    end repeat
    
— 1行分の文字列と改行を出力に追加
    
set (outputText of spd) to (outputText of spd) & currentLine & "
"
  end repeat
  
return contents of (outputText of spd)
end aaDrawCircleLine

★Click Here to Open This Script 

Posted in Text | Tagged 13.0savvy 14.0savvy 15.0savvy | Leave a comment

Appleに買収されたPixelmator ProがAppleとしての初アップデート

Posted on 7月 2 by Takaaki Naganoya

前回の「買収されました」メッセージを表示するだけのアップデートとは異なり、Apple体制下でのそれらしいアップデート(v3.7)が行われました。

AppleScript用語辞書にも変更が加わっているのですが、

Pixelmatorの各バージョンに設定されていたコードネームを返してくるコマンドが廃止になったようです。そんな機能があったとは知りませんでした。廃止はまぁ、機能的に何も影響がないので妥当なところだろうかと。

Posted in Update | Tagged 13.0savvy 14.0savvy 15.0savvy Pixelmator Pro | Leave a comment

Post navigation

  • Older 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β)
  • 指定フォルダ以下の画像のMD5チェックサムを求めて、重複しているものをピックアップ
  • macOS 26, 15.5でShortcuts.app「AppleScriptを実行」アクションのバグが修正される
  • Numbersで選択中の2列のセルを比較して並べ直して書き戻す v2
  • Apple、macOS標準搭載アプリ「写真」のバージョン表記を間違える
  • Script DebuggerがmacOS 15.x上で起動せず→起動

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