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

月: 2018年2月

郵便専門ネットでXML-RPC経由で郵便番号に対応する世界測地系(WGS84)の緯度経度コード(Geocode)を返す

Posted on 2月 11, 2018 by Takaaki Naganoya
AppleScript名:郵便専門ネットでXML-RPC経由で郵便番号に対応する世界測地系(WGS84)の緯度経度コード(Geocode)を返す
tell application "http://yubin.senmon.net/service/xmlrpc/"
  call xmlrpc {method name:"yubin.postcodeToGeocode", parameters:{"1760024"}}
end tell
–> {35.0345563, 135.7476776}

★Click Here to Open This Script 

Posted in Network XML-RPC | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

郵便専門ネットでXML-RPC経由でJISコード(5桁、6桁どちらでも)から、その市区町村に属している郵便番号のリストを取得

Posted on 2月 11, 2018 by Takaaki Naganoya
AppleScript名:郵便専門ネットでXML-RPC経由でJISコード(5桁、6桁どちらでも)から、その市区町村に属している郵便番号のリストを取得
tell application "http://yubin.senmon.net/service/xmlrpc/"
  call xmlrpc {method name:"yubin.postcodeFromJiscode", parameters:{"011037"}}
end tell

–> {"0070001", "0070002", "0070003", "0070004", "0070005", "0070006", "0070011", "0070030", "0070031", "0070032", "0070033", "0070034", "0070801", "0070802", "0070803", "0070804", "0070805", "0070806", "0070807", "0070808", "0070809", "0070810", "0070811", "0070812", "0070813", "0070814", "0070815", "0070819", "0070820", "0070821", "0070822", "0070823", "0070824", "0070825", "0070826", "0070827", "0070828", "0070829", "0070834", "0070835", "0070836", "0070837", "0070838", "0070839", "0070840", "0070841", "0070842", "0070843", "0070844", "0070845", "0070846", "0070847", "0070848", "0070849", "0070850", "0070851", "0070852", "0070861", "0070862", "0070863", "0070864", "0070865", "0070866", "0070867", "0070868", "0070869", "0070870", "0070871", "0070872", "0070873", "0070874", "0070880", "0070881", "0070882", "0070883", "0070884", "0070885", "0070886", "0070890", "0070891", "0070892", "0070893", "0070894", "0070895", "0078501", "0078503", "0078505", "0078507", "0078508", "0078553", "0078585", "0078632", "0600905", "0600906", "0600907", "0600908", "0600909", "0608569", "0608576", "0608582", "0650000", "0650004", "0650005", "0650006", "0650007", "0650008", "0650009", "0650010", "0650011", "0650012", "0650013", "0650014", "0650015", "0650016", "0650017", "0650018", "0650019", "0650020", "0650021", "0650022", "0650023", "0650024", "0650025", "0650026", "0650027", "0650028", "0650030", "0650031", "0650032", "0650033", "0650041", "0650042", "0650043", "0658501", "0658508", "0658510", "0658511", "0658518", "0658522", "0658533", "0658543", "0658550", "0658555", "0658558", "0658567", "0658578", "0658601", "0658609", "0658610", "0658611", "0658612", "0658633", "0658639"}

★Click Here to Open This Script 

Posted in Network XML-RPC | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

郵便専門ネットでバージョン番号を取得

Posted on 2月 11, 2018 by Takaaki Naganoya
AppleScript名:郵便専門ネットでバージョン番号を取得
–http://yubin.senmon.net/service/xmlrpc/
tell application "http://yubin.senmon.net/service/xmlrpc/"
  call xmlrpc {method name:"yubin.getVersion", parameters:{}}
end tell
–>"18.01a"

★Click Here to Open This Script 

Posted in Network XML-RPC | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

ドメイン名からIPアドレスを取得

Posted on 2月 11, 2018 by Takaaki Naganoya
AppleScript名:ドメイン名からIPアドレスを取得
— Created 2016-04-03 by Takaaki Naganoya
— 2016 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set anIP to ((current application’s NSHost’s hostWithName:"www.google.com")’s address()) as string
–>  "216.58.200.196"

★Click Here to Open This Script 

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

インターネット接続確認

Posted on 2月 11, 2018 by Takaaki Naganoya
AppleScript名:インターネット接続確認
— Created 2015-12-16 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aRes to hasInternetConnection() of me
–>  true

on hasInternetConnection()
  set aURL to current application’s |NSURL|’s alloc()’s initWithString:"http://www.google.com"
  
set aReq to current application’s NSURLRequest’s alloc()’s initWithURL:aURL cachePolicy:(current application’s NSURLRequestReloadIgnoringLocalCacheData) timeoutInterval:5.0
  
set urlRes to (current application’s NSURLConnection’s sendSynchronousRequest:aReq returningResponse:(missing value) |error|:(missing value))
  
if urlRes = missing value then
    return false
  else
    return true
  end if
end hasInternetConnection

★Click Here to Open This Script 

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

Twitter投稿

Posted on 2月 11, 2018 by Takaaki Naganoya

macOS 10.13まではTwitter投稿やFacebook連携などもOSに組み込まれていたので、手軽にこうした機能を利用でき、macOS 10.13までの環境ではこのように呼び出せるようになっていました。

macOS 10.14から方針が変わり、これらの機能はOSに組み込まれなくなりました。いまだと、REST API経由で投稿を行うことになるでしょうか。

AppleScript名:Twitter投稿
— Created 2015-01-24 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"

set aString to "ぴよ〜"

set twService to current application’s NSSharingService’s sharingServiceNamed:(current application’s NSSharingServiceNamePostOnTwitter)
set twService’s delegate to me

set shareItems to current application’s NSMutableArray’s alloc()’s initWithObjects:aString
tell twService to performWithItems:shareItems

★Click Here to Open This Script 

Posted in Network System | Tagged 10.11savvy 10.12savvy 10.13savvy Twitter

AirDropでファイルを送信する

Posted on 2月 11, 2018 by Takaaki Naganoya

Sharing Utilitiesを用いてAirDrop経由のファイル送信を行うAppleScriptです。

さすがに、Sharing Utilitiesは仕様も古いので、最新の環境に合わせて書き換えた「AirSharingLib Script Library」を配布、そちらを用いて同様の機能を実現するAppleScriptも掲載しています。

AppleScript名:AirDropでファイルを送信する
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use shareLib : script "Sharing Utilities" –https://macosxautomation.com/mavericks/libraries/examples.html

set anItem to choose file with prompt "Select File to send via AirDrop"
set aaList to {anItem}
begin AirDrop with aaList

★Click Here to Open This Script 

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

LAN上のHDDをマウントする v2

Posted on 2月 11, 2018 by Takaaki Naganoya
AppleScript名:LAN上のHDDをマウントする v2
–SMB経由でマウント
set userAccount to "maro" –ユーザー名(環境に応じて書き換え)
set userPass to "xxxxxx" –パスワード(環境に応じて書き換え)
set aMachine to "smb://MBA11._smb._tcp.local/Macintosh HD" –11インチMacBook Air (10.9.2)でSMBのみ有効にしてテスト
mountVolume(aMachine, userAccount, userPass) of me –通常実行

–AFP経由でマウント
set userAccount to "maro" –ユーザー名(環境に応じて書き換え)
set userPass to "xxxxxx" –パスワード(環境に応じて書き換え)
set aMachine to "afp://MBA13._afpovertcp._tcp.local/Macintosh SSD" –13インチMacBook Air (10.7.5)でAFPとSMBの両方を有効にしてテスト
mountVolumeAsync(aMachine, userAccount, userPass) of me –非同期実行

–指定のネットワーク上のディスクをマウントする
on mountVolume(aMachine, userAccount, userPass)
  
  
try
    with timeout of 100 seconds
      mount volume aMachine as user name userAccount with password userPass
    end timeout
  on error
    return false
  end try
  
  
return true
  
end mountVolume

–指定のネットワーク上のディスクをマウントする(非同期実行)
on mountVolumeAsync(aMachine, userAccount, userPass)
  
  
try
    ignoring application responses
      mount volume aMachine as user name userAccount with password userPass
    end ignoring
  on error
    —
  end try
  
end mountVolumeAsync

★Click Here to Open This Script 

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

無線LANデバイスのMACアドレスを取得する

Posted on 2月 11, 2018 by Takaaki Naganoya
AppleScript名:無線LANデバイスのMACアドレスを取得する
— Created 2015-08-18 by Takaaki Naganoya
— Created 2015-08-18 by Shane Stanley
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "CoreWLAN"

set aRes to retWiFiMACaddress()
–>  "XX:XX:XX:XX:XX:XX"

–WiFi DeviceのMAC ADDRESSを返す
on retWiFiMACaddress()
  
  
–Get WLAN Device Name
  
set allNames to current application’s CWInterface’s interfaceNames()’s allObjects()
  
–>  (NSArray) {​​​​​"en0"​​​} –@MacBook Pro Retina 2012
  
  
set hitF to false
  
repeat with i from 1 to allNames’s |count|()
    set aInterface to (current application’s CWInterface’s interfaceWithName:(allNames’s objectAtIndex:(i – 1)))
    
if aInterface’s serviceActive() as boolean then
      set hitF to true
      
exit repeat
    end if
  end repeat
  
if hitF = false then return false –There is No WiFi Device (Broken or illigal configuration or Hackintosh)
  
  
set aHWAddress to aInterface’s hardwareAddress() as text
  
–>  "b8:xx:xx:xx:xx:xx"–MAC Address
  
  
return aHWAddress
  
end retWiFiMACaddress

★Click Here to Open This Script 

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

無線LANの各種情報を取得する v2.2

Posted on 2月 11, 2018 by Takaaki Naganoya
AppleScript名:無線LANの各種情報を取得する v2.2
— Created 2015-08-18 by Shane Stanley
— Modified 2015-08-18 by Takaaki Naganoya
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "CoreWLAN"

–Get WLAN Device Name
set allNames to current application’s CWInterface’s interfaceNames()’s allObjects()
log allNames as list of string or string
–>  (NSArray) {​​​​​"en0"​​​} –@MacBook Pro Retina 2012

set hitF to false
repeat with i from 1 to allNames’s |count|()
  set aInterface to (current application’s CWInterface’s interfaceWithName:(allNames’s objectAtIndex:(i – 1)))
  
if aInterface’s serviceActive() as boolean then
    set hitF to true
    
exit repeat
  end if
end repeat
if hitF = false then return false –There is No WiFi Device

–WiFi device is Power On ?
repeat 10 times
  
  
set aPower to (aInterface’s powerOn()) as boolean
  
  
if aPower = false then
    –ActiveなWLANがない場合(WiFiをオフにしている)にはWiFiパワーオン
    
set wRes to aInterface’s setPower:true |error|:(missing value)
    
delay 1
  else
    exit repeat
  end if
end repeat

if aPower = false then return false –I could not power on WiFi deveice

set aChan to aInterface’s wlanChannel()
–>  (CWChannel) <CWChannel: 0x60000040cdd0> [channelNumber=1(2GHz), channelWidth={20MHz}]

set chanNumber to aChan’s channelNumber()
log chanNumber
–> 52
set chanBand to aChan’s channelBand() — 0 = unknown, 1 = 2GHz, 2 = 5GHz
log chanBand
–> 2
set chanWidth to aChan’s channelWidth() — 0 = unknown, 1 = 20MHz, 2 = 40MHz
log chanWidth
–> 2
set aTransRate to aInterface’s transmitRate()
log aTransRate
–>  162.0

set aChannnels to aInterface’s supportedWLANChannels()
–>  (NSSet) {​​​​​(CWChannel) <CWChannel: 0x60800020fad0> [channelNumber=1(2GHz), channelWidth={20MHz}, active], ​​​​​(CWChannel) <CWChannel: 0x60800020fb90> [channelNumber=2(2GHz), channelWidth={20MHz}, active], ​​​​​……………​​​​​(CWChannel) <CWChannel: 0x608000208410> [channelNumber=64(5GHz), channelWidth={20MHz}, DFS], ​​​​​(CWChannel) <CWChannel: 0x60800020f9e0> [channelNumber=136(5GHz), channelWidth={20MHz}, DFS]​​​}

set aSSIDdata to aInterface’s ssidData()
–>  (NSData) <45787472 xxxxxxxx xxxxxxxx xxxx>

set aSSID to aInterface’s ssid() as text
–>  "Extreme net_5G"

set aActive to aInterface’s serviceActive()
–>  true

set aSecurity to aInterface’s security()
–>  4

set aRSSIval to aInterface’s rssiValue()
–>  -72

set aPower to aInterface’s powerOn()
–>  true

set aNoise to aInterface’s noiseMeasurement()
–>  -91

set aIFname to aInterface’s interfaceName() as text
–>  "en0"

set aMode to aInterface’s interfaceMode()
–>  1

set aHWAddress to aInterface’s hardwareAddress() as text
–>  "b8:xx:xx:xx:xx:xx"–MAC Address

set aCountry to aInterface’s countryCode() as text
–>  "JP"

set aConfig to aInterface’s configuration()
–>  (CWConfiguration) <CWConfiguration: 0x6100002348e0>

set aCacheRes to aInterface’s cachedScanResults()
–>  (NSSet) {​​​​​(CWNetwork) <CWNetwork: 0x618000402740> ……………… [channelNumber=11(2GHz), channelWidth={20MHz}], ibss=0]​​​}

set aBSSID to aInterface’s bssid() as text
–>  "10:XX:XX:XX:XX:XX"

set aPhyMode to aInterface’s activePHYMode()
–>  4

★Click Here to Open This Script 

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

WiFiデバイスのパワーをオンに

Posted on 2月 11, 2018 by Takaaki Naganoya
AppleScript名:WiFiデバイスのパワーをオンに
— Created 2015-08-18 by Shane Stanley
— Modified 2015-08-18 by Takaaki Naganoya
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "CoreWLAN"

set wRes to powerOnEveryWiFiDevices() of me

on powerOnEveryWiFiDevices()
  set allNames to current application’s CWInterface’s interfaceNames()’s allObjects() as list
  
if allNames = {} then return false
  
  
set powerList to {}
  
repeat with i in allNames
    set j to contents of i
    
set aInterface to (current application’s CWInterface’s interfaceWithName:j)
    
set wRes to (aInterface’s setPower:true |error|:(missing value))
    
set aPower to (aInterface’s powerOn()) as boolean
    
if aPower = false then
      display notification "Error occured in enabling an Wifi deviece ( " & j & " )…."
    end if
    
set the end of powerList to aPower
  end repeat
  
  
return ({true} is in powerList) –return whether some WiFi interface is on
end powerOnEveryWiFiDevices

★Click Here to Open This Script 

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

LAN上のファイルサーバー(smb)のホスト名を取得する

Posted on 2月 11, 2018 by Takaaki Naganoya
AppleScript名:LAN上のファイルサーバー(smb)のホスト名を取得する
— Created 2015-12-24 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

property foundHosts : {}
property myHostName : ""

findHostsViaBonjour("_smb._tcp") of me –smb’s port:445
–> {"MBA13"}

on findHostsViaBonjour(aType)
  
  
set foundHosts to {}
  
set myHostName to (current application’s NSHost’s currentHost()’s localizedName()) as string
  
  
set aBrowser to current application’s NSNetServiceBrowser’s alloc()’s init()
  
aBrowser’s setDelegate:me
  
  
aBrowser’s searchForServicesOfType:aType inDomain:""
  
  
repeat 1000 times
    if foundHosts is not equal to {} then exit repeat
    
delay 0.01
  end repeat
  
  
aBrowser’s setDelegate:(missing value)
  
  
return foundHosts
  
end findHostsViaBonjour

on netServiceBrowser:aNetServiceBrowser didFindService:aNetService moreComing:aMoreComing
  set aDesc to aNetServiceBrowser’s |description|()
  
set bDesc to aNetService’s |description|()
  
set cDesc to (aNetService’s |name|()) as text
  
  
if cDesc is not in foundHosts and cDesc is not equal to myHostName then
    set the end of foundHosts to cDesc
  end if
end netServiceBrowser:didFindService:moreComing:

★Click Here to Open This Script 

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

LAN上のファイルサーバー(afp)のホスト名を取得する

Posted on 2月 11, 2018 by Takaaki Naganoya
AppleScript名:LAN上のファイルサーバー(afp)のホスト名を取得する
— Created 2015-12-24 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

property foundHosts : {}
property myHostName : ""

findHostsViaBonjour("_afpovertcp._tcp") of me –AFP’s port:548
–> {"MBA13", "Mini_2", "MBA11"}

on findHostsViaBonjour(aType)
  
  
set foundHosts to {}
  
set myHostName to (current application’s NSHost’s currentHost()’s localizedName()) as string
  
  
set aBrowser to current application’s NSNetServiceBrowser’s alloc()’s init()
  
aBrowser’s setDelegate:me
  
  
aBrowser’s searchForServicesOfType:aType inDomain:""
  
  
repeat 1000 times
    if foundHosts is not equal to {} then exit repeat
    
delay 0.01
  end repeat
  
  
aBrowser’s setDelegate:(missing value)
  
  
return foundHosts
  
end findHostsViaBonjour

on netServiceBrowser:aNetServiceBrowser didFindService:aNetService moreComing:aMoreComing
  set aDesc to aNetServiceBrowser’s |description|()
  
set bDesc to aNetService’s |description|()
  
set cDesc to (aNetService’s |name|()) as text
  
  
if cDesc is not in foundHosts and cDesc is not equal to myHostName then
    set the end of foundHosts to cDesc
  end if
end netServiceBrowser:didFindService:moreComing:

★Click Here to Open This Script 

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

RTF本文内の色を置換 v2

Posted on 2月 11, 2018 by Takaaki Naganoya

指定のRTF書類の本文中の色を置換するAppleScriptです。

指定のRTF書類内のカラーをざっくりとした色に分類し、同じくざっくりとした色名で置換対象を指定し(blue, green)、指定色(black)に色置換。結果をデスクトップ上に別名で保存します。

AppleScript名:RTF本文内の色を置換 v2
— Created 2018-01-13 by Takaaki Naganoya
— 2018 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"

property NSData : a reference to current application’s NSData
property NSUUID : a reference to current application’s NSUUID
property NSColor : a reference to current application’s NSColor
property NSString : a reference to current application’s NSString
property NSPredicate : a reference to current application’s NSPredicate
property NSDictionary : a reference to current application’s NSDictionary
property NSMutableArray : a reference to current application’s NSMutableArray
property NSMutableAttributedString : a reference to current application’s NSMutableAttributedString
property NSForegroundColorAttributeName : a reference to current application’s NSForegroundColorAttributeName
property NSDocumentTypeDocumentAttribute : a reference to current application’s NSDocumentTypeDocumentAttribute

set targFilePath to POSIX path of (choose file of type {"public.rtf"})
set targColorNameList to {"blue", "green"} –replace target color names
set toColor to NSColor’s blackColor() –to color
set aRes to replaceRTFColorsByColorName(targFilePath, targColorNameList, toColor, 65535) of me

–指定RTF書類本文中、名称で指定した色の該当箇所を指定色(NSColor)に置換する(複数色)
on replaceRTFColorsByColorName(targFilePath as string, targColorNameList as list, toColor, aColorMax as integer)
  script spd
    property hitList : {}
  end script
  
  
set (hitList of spd) to {}
  
set aFilePath to NSString’s stringWithString:(targFilePath)
  
set aData to NSData’s dataWithContentsOfFile:aFilePath options:0 |error|:(missing value)
  
set theStyledText to NSMutableAttributedString’s alloc()’s initWithData:aData options:(missing value) documentAttributes:(missing value) |error|:(missing value)
  
  
set attrList to getAttributeRunsFromAttrString(theStyledText, aColorMax) of me
  
set attrArray to NSMutableArray’s arrayWithArray:attrList
  
  
theStyledText’s beginEditing() ——
  
repeat with ii in targColorNameList
    set jj to contents of ii
    
set thePred to NSPredicate’s predicateWithFormat_("colorName == %@", jj)
    
set (hitList of spd) to ((attrArray’s filteredArrayUsingPredicate:thePred)’s valueForKey:"rangeVal") as list
    
    
repeat with i in (hitList of spd)
      (theStyledText’s addAttribute:(NSForegroundColorAttributeName) value:toColor range:(contents of i))
    end repeat
    
  end repeat
  
theStyledText’s endEditing() ——
  
  
–Save RTF to desktop
  
set targFol to current application’s NSHomeDirectory()’s stringByAppendingPathComponent:"Desktop"
  
set aRes to saveStyledTextAsRTF(targFol, theStyledText) of me
  
return aRes as boolean
end replaceRTFColorsByColorName

–AttributedStringを書式でlist of record化
on getAttributeRunsFromAttrString(theStyledText, aColorMax)
  script aSpd
    property styleList : {}
  end script
  
  
set (styleList of aSpd) to {} —for output
  
  
set thePureString to theStyledText’s |string|() –pure string from theStyledText
  
  
set theLength to theStyledText’s |length|()
  
set startIndex to 0
  
  
repeat until (startIndex = theLength)
    set {theAtts, theRange} to theStyledText’s attributesAtIndex:startIndex longestEffectiveRange:(reference) inRange:{startIndex, theLength – startIndex}
    
    
–String
    
set aText to (thePureString’s substringWithRange:theRange) as string
    
    
–Color
    
set aColor to (theAtts’s valueForKeyPath:"NSColor")
    
if aColor is not equal to missing value then
      set aSpace to aColor’s colorSpace()
      
      
set aRed to (aColor’s redComponent()) * aColorMax
      
set aGreen to (aColor’s greenComponent()) * aColorMax
      
set aBlue to (aColor’s blueComponent()) * aColorMax
      
      
set colList to {aRed as integer, aGreen as integer, aBlue as integer} –for comparison
      
set colStrForFind to (aRed as integer as string) & " " & (aGreen as integer as string) & " " & (aBlue as integer as string) –for filtering
    else
      set colList to {0, 0, 0}
      
set colStrForFind to "0 0 0"
    end if
    
    
–Color Name
    
set cName to retColorName(aRed, aGreen, aBlue, aColorMax) of me
    
    
–Font
    
set aFont to (theAtts’s valueForKeyPath:"NSFont")
    
if aFont is not equal to missing value then
      set aDFontName to aFont’s displayName()
      
set aDFontSize to aFont’s pointSize()
    end if
    
    
set the end of (styleList of aSpd) to {stringVal:aText, colorStr:colStrForFind, colorVal:colList, fontName:aDFontName as string, fontSize:aDFontSize, rangeVal:theRange, colorName:cName}
    
    
set startIndex to current application’s NSMaxRange(theRange)
    
  end repeat
  
  
return (styleList of aSpd)
end getAttributeRunsFromAttrString

–RGB値から色名称(だいたいの色)を計算する
on retColorName(rCol as integer, gCol as integer, bCol as integer, aColMax as integer)
  set aCol to makeNSColorFromRGBAval(rCol, gCol, bCol, aColMax, aColMax) of me
  
set hueVal to aCol’s hueComponent() as real
  
set satVal to aCol’s saturationComponent() as real
  
set brightVal to aCol’s brightnessComponent() as real
  
  
if satVal ≤ 0.01 then set satVal to 0.0
  
  
if satVal = 0.0 then
    if brightVal ≤ 0.2 then
      set colName to "black"
    else if (brightVal > 0.95) then
      set colName to "white"
    else
      set colName to "gray"
    end if
  else
    if hueVal ≤ (15.0 / 360) or hueVal ≥ (330 / 360) then
      set colName to "red"
    else if hueVal ≤ (45.0 / 360) then
      set colName to "orange"
    else if hueVal < (70.0 / 360) then
      set colName to "yellow"
    else if hueVal < (150.0 / 360) then
      set colName to "green"
    else if hueVal < (190.0 / 360) then
      set colName to "cyan"
    else if (hueVal < 250.0 / 360.0) then
      set colName to "blue"
    else if (hueVal < 290.0 / 360.0) then
      set colName to "purple"
    else
      set colName to "magenta"
    end if
  end if
  
  
return colName
end retColorName

on makeNSColorFromRGBAval(redValue as integer, greenValue as integer, blueValue as integer, alphaValue as integer, aMaxVal as integer)
  set aRedCocoa to (redValue / aMaxVal) as real
  
set aGreenCocoa to (greenValue / aMaxVal) as real
  
set aBlueCocoa to (blueValue / aMaxVal) as real
  
set aAlphaCocoa to (alphaValue / aMaxVal) as real
  
set aColor to NSColor’s colorWithCalibratedRed:aRedCocoa green:aGreenCocoa blue:aBlueCocoa alpha:aAlphaCocoa
  
return aColor
end makeNSColorFromRGBAval

–スタイル付きテキストを指定フォルダ(POSIX path)にRTFで書き出し
on saveStyledTextAsRTF(targFol, aStyledString)
  set bstyledLength to aStyledString’s |string|()’s |length|()
  
set bDict to NSDictionary’s dictionaryWithObject:"NSRTFTextDocumentType" forKey:(NSDocumentTypeDocumentAttribute)
  
set bRTF to aStyledString’s RTFFromRange:(current application’s NSMakeRange(0, bstyledLength)) documentAttributes:bDict
  
  
set theName to (NSUUID’s UUID()’s UUIDString())
  
set thePath to NSString’s stringWithString:targFol
  
set thePath to (thePath’s stringByAppendingPathComponent:theName)’s stringByAppendingPathExtension:"rtf"
  
return (bRTF’s writeToFile:thePath atomically:true) as boolean
end saveStyledTextAsRTF

★Click Here to Open This Script 

Posted in Color RTF Text | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

rtf_rtfdからテキスト抽出

Posted on 2月 11, 2018 by Takaaki Naganoya

RTFないしRTFD(添付ファイルつきRTF)からテキストを抽出するAppleScriptです。

AppleScript名:rtf_rtfdからテキスト抽出
— Created 2018-02-10 by Takaaki Naganoya
— 2018 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

set aFile to choose file of type {"com.apple.rtfd", "public.rtf"}
set aRes to retTextFromRTF(aFile) of me

on retTextFromRTF(aFile)
  set aFilePath to current application’s NSString’s stringWithString:(POSIX path of aFile)
  
set anExt to (aFilePath’s pathExtension()) as string
  
if anExt = "rtfd" then
    set aFilePath to aFilePath’s stringByAppendingString:"TXT.rtf"
  end if
  
  set aData to current application’s NSData’s dataWithContentsOfFile:aFilePath options:0 |error|:(missing value)
  
set theStyledText to current application’s NSMutableAttributedString’s alloc()’s initWithData:aData options:(missing value) documentAttributes:(missing value) |error|:(missing value)
  
  if theStyledText is not equal to missing value then
    return (theStyledText’s |string|()) as string
  else
    return false –Not RTF file
  end if
end retTextFromRTF

★Click Here to Open This Script 

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

RTFを読み込んで書式をDictionary化 v3.0

Posted on 2月 11, 2018 by Takaaki Naganoya

指定のRTF書類の内容を読み取って、書式情報をNSDictionaryに変換するAppleScriptです。

  stringVal:文字列データ
  colorStr:RGBの色データを文字列化したもの
  colorVal:RGBの色データの数値list
  colorDomainName:おおまかな色名称
  fontName:フォント名
  fontSize:フォントサイズ

書式情報で抽出しやすくしてあります。複数要素(例:フォント名+色)を一緒にまとめて格納しておくことで、検索パフォーマンスを稼げるはずです。

AppleScript名:RTFを読み込んで書式をDictionary化 v3.0
— Created 2017-12-10 by Takaaki Naganoya
— Modified 2017-12-11 by Shane Stanley
— Modified 2017-12-11 by Nigel Garvey
— Modified 2017-12-12 by Takaaki Naganoya
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"

property NSData : a reference to current application’s NSData
property NSString : a reference to current application’s NSString
property NSAttributedString : a reference to current application’s NSAttributedString

set fRes to choose file of type {"public.rtf"}

set aFilePath to NSString’s stringWithString:(POSIX path of fRes)
set aData to NSData’s dataWithContentsOfFile:aFilePath options:0 |error|:(missing value)
set theStyledText to NSAttributedString’s alloc()’s initWithData:aData options:(missing value) documentAttributes:(missing value) |error|:(missing value)

set attrRes to getAttributeRunsFromAttrString(theStyledText) of me
(*
–>  {​​​​​{​​​​​​​stringVal:"■■■■■■■", ​​​​​​​colorStr:"0 0 0", ​​​​​​​colorVal:{​​​​​​​​​0, ​​​​​​​​​0, ​​​​​​​​​0​​​​​​​}, ​​​​​​​colorDomainName:"black", ​​​​​​​fontName:"ヒラギノ角ゴ ProN W6", ​​​​​​​fontSize:12.0​​​​​}, ​​​​​{​​​​​​​stringVal:"Xxxxxxx", ​​​​​​​colorStr:"217 11 0", ​​​​​​​colorVal:{​​​​​​​​​217, ​​​​​​​​​11, ​​​​​​​​​0​​​​​​​}, ​​​​​​​colorDomainName:"red", ​​​​​​​fontName:"ヒラギノ角ゴ ProN W6", ​​​​​​​fontSize:12.0​​​​​}, …
*)

on getAttributeRunsFromAttrString(theStyledText)
  script aSpd
    property styleList : {}
  end script
  
  
set (styleList of aSpd) to {} —for output
  
  
set thePureString to theStyledText’s |string|() –pure string from theStyledText
  
  
set theLength to theStyledText’s |length|()
  
set startIndex to 0
  
  
repeat until (startIndex = theLength)
    set {theAtts, theRange} to theStyledText’s attributesAtIndex:startIndex longestEffectiveRange:(reference) inRange:{startIndex, theLength – startIndex}
    
    
–String  
    
set aText to (thePureString’s substringWithRange:theRange) as string
    
    
–Color
    
set aColor to (theAtts’s valueForKeyPath:"NSColor")
    
if aColor is not equal to missing value then
      set aSpace to aColor’s colorSpace()
      
      
set aRed to (aColor’s redComponent()) * 255
      
set aGreen to (aColor’s greenComponent()) * 255
      
set aBlue to (aColor’s blueComponent()) * 255
      
      
set colList to {aRed as integer, aGreen as integer, aBlue as integer} –for comparison
      
set colStrForFind to (aRed as integer as string) & " " & (aGreen as integer as string) & " " & (aBlue as integer as string) –for filtering
    else
      set colList to {0, 0, 0}
      
set colStrForFind to "0 0 0"
    end if
    
    
–Color domain name
    
set cdnStr to retColorDomainNameFromNSColor(aColor) of me
    
    
–Font
    
set aFont to (theAtts’s valueForKeyPath:"NSFont")
    
if aFont is not equal to missing value then
      set aDFontName to aFont’s displayName()
      
set aDFontSize to aFont’s pointSize()
    end if
    
    
set the end of (styleList of aSpd) to {stringVal:aText, colorStr:colStrForFind, colorVal:colList, colorDomainName:cdnStr, fontName:aDFontName as string, fontSize:aDFontSize}
    
set startIndex to current application’s NSMaxRange(theRange)
    
  end repeat
  
  
return (styleList of aSpd)
  
end getAttributeRunsFromAttrString

on retColorDomainNameFromNSColor(aCol)
  set hueVal to aCol’s hueComponent()
  
set satVal to aCol’s saturationComponent()
  
set brightVal to aCol’s brightnessComponent()
  
  
if satVal ≤ 0.01 then set satVal to 0.0
  
  
set colName to ""
  
  
if satVal = 0.0 then
    if brightVal ≤ 0.2 then
      set colName to "black"
    else if (brightVal > 0.95) then
      set colName to "white"
    else
      set colName to "gray"
    end if
  else
    if hueVal ≤ (15.0 / 360) or hueVal ≥ (330 / 360) then
      set colName to "red"
    else if hueVal ≤ (45.0 / 360) then
      set colName to "orange"
    else if hueVal < (70.0 / 360) then
      set colName to "yellow"
    else if hueVal < (150.0 / 360) then
      set colName to "green"
    else if hueVal < (190.0 / 360) then
      set colName to "cyan"
    else if (hueVal < 250.0 / 360.0) then
      set colName to "blue"
    else if (hueVal < 290.0 / 360.0) then
      set colName to "purple"
    else
      set colName to "magenta"
    end if
  end if
  
  
return colName
end retColorDomainNameFromNSColor

★Click Here to Open This Script 

Posted in Color list Record RTF | Tagged 10.11savvy 10.12savvy 10.13savvy | 1 Comment

Read Safari Bookmark v2

Posted on 2月 11, 2018 by Takaaki Naganoya

Safariのブックマーク内容からURLとページタイトルを取得してテキスト書き出しするAppleScriptです。

一番のみどころは、Predicate文でURLStringがnilでなければ、という記述を行っている箇所です。AppleScriptのデータに変換するとnilはmissing valueになるので、ここでmissing valueを指定したくなるところですが、nilを指定しました。

実行のためには、AppleScriptの実行プログラム(スクリプトエディタとかScript Debugger)を「システム環境設定」の「セキュリティとプライバシー」>「プライバシー」>「フルディスクアクセス」に登録しておく必要があります。AppleScriptアプレットから実行する場合には、そのAppleScriptアプレットそのものを「フルディスクアクセス」に登録する必要があります。

AppleScript名:Read Safari Bookmark v2
— Created 2016-02-27 by Takaaki Naganoya
— Piyomaru Software 2016
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"

script spdBk
  property outList : {}
end script

set (outList of spdBk) to {}
set libPath to (POSIX path of (path to library folder from user domain)) & "Safari/Bookmarks.plist"
set aRec to retDictFromPlist(libPath) of me
set aList to aRec’s Children

set aPredicate to current application’s NSPredicate’s predicateWithFormat:"URLString != nil"
set filteredArray to (aList’s filteredArrayUsingPredicate:aPredicate) as list

repeat with i in filteredArray
  set the end of (outList of spdBk) to "■" & (Title of URIDictionary of i) & return & (URLString of i)
end repeat

set aRes to listToStringUsingTextItemDelimiter(contents of (outList of spdBk), return & return) of me

–Read plist as record
on retDictFromPlist(aPath as text)
  set thePath to current application’s NSString’s stringWithString:aPath
  
set thePath to thePath’s stringByExpandingTildeInPath()
  
set theDict to current application’s NSDictionary’s dictionaryWithContentsOfFile:thePath
  
return theDict
end retDictFromPlist

on listToStringUsingTextItemDelimiter(sourceList, textItemDelimiter)
  set anArray to current application’s NSArray’s arrayWithArray:sourceList
  
set aString to anArray’s componentsJoinedByString:textItemDelimiter
  
return (aString as string)
end listToStringUsingTextItemDelimiter

★Click Here to Open This Script 

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

Safariで表示中のURLをwebarchive保存

Posted on 2月 11, 2018 by Takaaki Naganoya

Safariで表示中の最前面のウィンドウのURLの内容をデスクトップ上にWebarchive書類として保存するAppleScriptです。

webArchiveはDeprecatedになったので、macOS 10.14あたりまでのOSで使うならOK。今後については何か別の機能が実装されるのかどうか。macOS 10.15で別の何かが紹介されるのでしょうか。

AppleScript名:Safariで表示中のURLをwebarchive保存
— Created 2014-11-13 Shane Stanley
— Modified 2018-02-11 Takaaki Naganoya
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "WebKit"

property theSender : missing value
property thePath : missing value
property loadDone : false –original was "webFrame"
property aWebView : missing value

tell application "Safari"
  if (count every document) = 0 then return
  
tell front document
    set aURL to URL
  end tell
end tell

set aPath to (POSIX path of (path to desktop)) & ((current application’s NSUUID’s UUID()’s UUIDString()) as string) & ".webarchive"
set archRes to archivePageToPathWithoutSearching(aURL, aPath, me, 10) of me

on archivePageToPathWithoutSearching(thePageURL, aPath, sender, timeoutSec)
  –Check If this script runs in foreground
  
if not (current application’s NSThread’s isMainThread()) as boolean then
    display alert "This script must be run from the main thread (Command-Control-R in Script Editor)." buttons {"Cancel"} as critical
    
error number -128
  end if
  
  
set my theSender to sender — store main script so we can call back
  
set my thePath to aPath — store path for use later
  
set my aWebView to missing value
  
set my loadDone to false
  
  
— make a WebView
  
set theView to current application’s WebView’s alloc()’s initWithFrame:{origin:{x:0, y:0}, |size|:{width:100, height:100}}
  
  
— tell it call delegate methods on me
  
theView’s setFrameLoadDelegate:me
  
  
— load the page
  
theView’s setMainFrameURL:thePageURL
  
  
–wait for download & saving
  
repeat timeoutSec * 10 times
    if my loadDone is not equal to false then
      exit repeat
    end if
    
delay 0.1
  end repeat
  
if my loadDone = false then return "timed out"
  
  
  
— the main frame is our interest
  
if (my loadDone) = aWebView’s mainFrame() then
    — get the data and write it to file
    
set theArchiveData to (my loadDone)’s dataSource()’s webArchive()’s |data|()
    
theArchiveData’s writeToFile:thePath atomically:true
    
    
— tell our script it’s all done
    
return "The webarchive was saved"
  end if
end archivePageToPathWithoutSearching

— called when our WebView loads a frame
on WebView:curWebView didFinishLoadForFrame:webFrame
  set my loadDone to webFrame
  
set my aWebView to curWebView
end WebView:didFinishLoadForFrame:

— called when there’s a problem
on WebView:WebView didFailLoadWithError:theError forFrame:webFrame
  — got an error, bail
  
WebView’s stopLoading:me
  
set my loadDone to false
  
error "The webarchive was not saved"
end WebView:didFailLoadWithError:forFrame:

★Click Here to Open This Script 

Posted in file Internet Require Control-Command-R to run | Tagged 10.11savvy 10.12savvy 10.13savvy Safari | 3 Comments

指定URLのページをwebarchive保存 v2

Posted on 2月 11, 2018 by Takaaki Naganoya

指定のURLの内容をデスクトップ上にwebarchive書類として保存するAppleScriptです。

SafariがAppleScript側にwebarchive保存機能を提供していないので、

 (1)GUI Scriptingで無理やりメニューを操作してwebarchive保存
 (2)AppleScriptでCocoaの機能を呼び出してwebarchive保存
 (3)コマンドラインツールを呼び出してwebarchive保存

といった代替策をとる必要があります。本Scriptは(2)を行なったものです。

オリジナルのAppleScriptはShane StanleyがCocoa Scripting普及初期に書いたもので、非同期で処理しておりそのままではAppleScriptのワークフローに組み込むには難がありました(処理結果が正しく実行できたかなど、結果を確実に確認できたほうがよいので)。

そこで、他のワークフローに組み込みやすいように構造を変えてみました。ただ、内部でdelegateによる通知処理を利用しているのでフォアグラウンドでの実行が必須となります(Command-Control-R)。

AppleScript名:指定URLのページをwebarchive保存 v2
— Created 2014-11-13 Shane Stanley
— Modified 2018-02-11 Takaaki Naganoya
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "WebKit"

property theSender : missing value
property thePath : missing value
property theSearchString : missing value
property loadDone : false –original was "webFrame"
property aWebView : missing value

set aPath to (POSIX path of (path to desktop)) & ((current application’s NSUUID’s UUID()’s UUIDString()) as string) & ".webarchive"
set archRes to archivePageToPath("https://www.apple.com/jp/shop/browse/home/specialdeals/mac", aPath, "Mac mini", me, 10) of me

on archivePageToPath(thePageURL, aPath, searchString, sender, timeoutSec)
  –Check If this script runs in foreground
  
if not (current application’s NSThread’s isMainThread()) as boolean then
    display alert "This script must be run from the main thread (Command-Control-R in Script Editor)." buttons {"Cancel"} as critical
    
error number -128
  end if
  
  
set my theSender to sender — store main script so we can call back
  
set my thePath to aPath — store path for use later
  
set my theSearchString to searchString — store for use later
  
set my aWebView to missing value
  
set my loadDone to false
  
  
— make a WebView
  
set theView to current application’s WebView’s alloc()’s initWithFrame:{origin:{x:0, y:0}, |size|:{width:100, height:100}}
  
  
— tell it call delegate methods on me
  
theView’s setFrameLoadDelegate:me
  
  
— load the page
  
theView’s setMainFrameURL:thePageURL
  
  
–wait for download & saving
  
repeat timeoutSec * 10 times
    if my loadDone is not equal to false then
      exit repeat
    end if
    
delay 0.1
  end repeat
  
if my loadDone = false then return "timed out"
  
  
  
— the main frame is our interest
  
if (my loadDone) = aWebView’s mainFrame() then
    
    
— get the text of the page
    
set theText to ((my loadDone)’s DOMDocument()’s documentElement()’s outerText())
    
    
— search it
    
if (theText’s rangeOfString:theSearchString)’s |length|() > 0 then
      
      
— get the data and write it to file
      
set theArchiveData to (my loadDone)’s dataSource()’s webArchive()’s |data|()
      
theArchiveData’s writeToFile:thePath atomically:true
      
      
— tell our script it’s all done
      
return "The webarchive was saved"
    else
      return "Seach string not found"
    end if
  end if
  
end archivePageToPath

— called when our WebView loads a frame
on WebView:curWebView didFinishLoadForFrame:webFrame
  set my loadDone to webFrame
  
set my aWebView to curWebView
end WebView:didFinishLoadForFrame:

— called when there’s a problem
on WebView:WebView didFailLoadWithError:theError forFrame:webFrame
  — got an error, bail
  
WebView’s stopLoading:me
  
set my loadDone to false
  
error "The webarchive was not saved"
end WebView:didFailLoadWithError:forFrame:

★Click Here to Open This Script 

Posted in file Internet Require Control-Command-R to run | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

指定URLをロードしてページ中の画像を取得 v2

Posted on 2月 11, 2018 by Takaaki Naganoya
AppleScript名:指定URLをロードしてページ中の画像を取得 v2
— Created 2015-09-07 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "WebKit"

property loadDone : false
property theWebView : missing value

set aURL to "http://piyocast.com/as/archives/1176"
set aRes to getPage(aURL)
set aList to getPageImages() of me
set theWebView to missing value –Purge

aList

–theWebViewにロードしておいたページから画像情報を取得
on getPageImages()
  set aList to {}
  
set imgNum to ((my theWebView)’s stringByEvaluatingJavaScriptFromString:"document.images.length") as integer
  
repeat with i from 0 to (imgNum – 1)
    set jsT to "document.images[" & (i as string) & "].height"
    
set aHeight to ((my theWebView)’s stringByEvaluatingJavaScriptFromString:jsT) as integer
    
    
set jsT to "document.images[" & (i as string) & "].width"
    
set aWidth to ((my theWebView)’s stringByEvaluatingJavaScriptFromString:jsT) as integer
    
    
set jsT to "document.images[" & (i as string) & "].src"
    
set aSRC to ((my theWebView)’s stringByEvaluatingJavaScriptFromString:jsT) as text
    
    
set the end of aList to {aHeight, aWidth, aSRC}
  end repeat
  
return aList
end getPageImages

–theWebViewにロードしておいたページからタイトルを取得
on getPageTitle()
  set x to ((my theWebView)’s stringByEvaluatingJavaScriptFromString:"document.title") as text
  
return x
end getPageTitle

–指定のURLの内容をtheWebViewに取得
on getPage(aURL)
  –Check If this script runs in foreground
  
if not (current application’s NSThread’s isMainThread()) as boolean then
    display alert "This script must be run from the main thread (Command-Control-R in Script Editor)." buttons {"Cancel"} as critical
    
error number -128
  end if
  
  
set my loadDone to false
  
set my theWebView to missing value
  
openURL(aURL)
  
  
set waitLoop to 1000 * 60 –60 seconds
  
  
set hitF to false
  
repeat waitLoop times
    if my loadDone = true then
      set hitF to true
      
exit repeat
    end if
    
current application’s NSThread’s sleepForTimeInterval:("0.001" as real) –delay 0.001
  end repeat
  
if hitF = false then return
  
  
return true
end getPage

–WebViewにURLを読み込む
on openURL(aURL)
  set noter1 to current application’s NSNotificationCenter’s defaultCenter()
  
set my theWebView to current application’s WebView’s alloc()’s init()
  
noter1’s addObserver:me selector:"webLoaded:" |name|:(current application’s WebViewProgressFinishedNotification) object:(my theWebView)
  
my (theWebView’s setMainFrameURL:aURL)
end openURL

–Web Viewのローディング完了時に実行
on webLoaded:aNotification
  set my loadDone to true
end webLoaded:

★Click Here to Open This Script 

Posted in file Internet JavaScript Require Control-Command-R to run | Tagged 10.11savvy 10.12savvy 10.13savvy | Leave a comment

Post navigation

  • Older posts
  • Newer posts

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

Google Search

Popular posts

  • macOS 13, Ventura(継続更新)
  • アラートダイアログ上にWebViewで3Dコンテンツを表示(WebGL+three.js)v3
  • Xcode 14.2でAppleScript App Templateを復活させる
  • macOS 13 TTS Voice環境に変更
  • UI Browserがgithub上でソース公開され、オープンソースに
  • 2022年に書いた価値あるAppleScript
  • ChatGPTで文章のベクトル化(Embedding)
  • 新発売:AppleScriptからSiriを呼び出そう!
  • iWork 12.2がリリースされた
  • 従来と異なるmacOS 13の性格?
  • 新発売:CotEditor Scripting Book with AppleScript
  • macOS 13対応アップデート:AppleScript実践的テクニック集(1)GUI Scripting
  • macOS 13でNSNotFoundバグふたたび
  • ChatGPTでchatに対する応答文を取得
  • 新発売:iWork Scripting Book with AppleScript
  • Finderの隠し命令openVirtualLocationが発見される
  • macOS 13.1アップデートでスクリプトエディタの挙動がようやくまともに
  • あのコン過去ログビューワー(暫定版)
  • AppleScriptの数値変数で指数表示にならない最大値、最小値
  • バカスタム App選手権 入賞!

Tags

10.11savvy (1101) 10.12savvy (1242) 10.13savvy (1390) 10.14savvy (586) 10.15savvy (434) 11.0savvy (277) 12.0savvy (186) 13.0savvy (59) CotEditor (60) Finder (47) iTunes (19) Keynote (99) NSAlert (60) NSArray (51) NSBezierPath (18) NSBitmapImageRep (20) NSBundle (20) NSButton (34) NSColor (51) NSDictionary (27) NSFileManager (23) NSFont (18) NSImage (41) NSJSONSerialization (21) NSMutableArray (62) NSMutableDictionary (21) NSPredicate (36) NSRunningApplication (56) NSScreen (30) NSScrollView (22) NSString (117) NSURL (97) NSURLRequest (23) NSUTF8StringEncoding (30) NSView (33) NSWorkspace (20) Numbers (57) Pages (38) Safari (41) Script Editor (20) WKUserContentController (21) WKUserScript (20) WKUserScriptInjectionTimeAtDocumentEnd (18) WKWebView (23) WKWebViewConfiguration (22)

カテゴリー

  • 2D Bin Packing
  • 3D
  • AirDrop
  • AirPlay
  • Animation
  • AppleScript Application on Xcode
  • beta
  • Bluetooth
  • Books
  • boolean
  • bounds
  • Bug
  • Calendar
  • call by reference
  • Clipboard
  • Code Sign
  • Color
  • Custom Class
  • dialog
  • drive
  • 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
  • Machine Learning
  • Map
  • Markdown
  • Menu
  • Metadata
  • MIDI
  • MIME
  • Natural Language Processing
  • Network
  • news
  • Noification
  • Notarization
  • Number
  • Object control
  • OCR
  • OSA
  • PDF
  • Peripheral
  • PRODUCTS
  • QR Code
  • Raw AppleEvent Code
  • Record
  • rectangle
  • recursive call
  • regexp
  • Release
  • Remote Control
  • Require Control-Command-R to run
  • REST API
  • Review
  • RTF
  • Sandbox
  • Screen Saver
  • Script Libraries
  • sdef
  • search
  • Security
  • selection
  • shell script
  • Shortcuts Workflow
  • Sort
  • Sound
  • Spellchecker
  • Spotlight
  • SVG
  • System
  • Tag
  • Telephony
  • Text
  • Text to Speech
  • timezone
  • Tools
  • Update
  • URL
  • UTI
  • Web Contents Control
  • WiFi
  • XML
  • XML-RPC
  • イベント(Event)
  • 未分類

アーカイブ

  • 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