Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
JavaScript for Automation
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ryoichi Izumita
November 16, 2014
Programming
290
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
JavaScript for Automation
NSEG 第57回勉強会 発表資料
Ryoichi Izumita
November 16, 2014
More Decks by Ryoichi Izumita
See All by Ryoichi Izumita
モバイル開発における共通性・可変性分析入門
rizumita
0
120
Flutterアプリを生成AIで生成する勘所
rizumita
0
1.6k
FlutterアプリのテストでBuilderパターンを活用しよう
rizumita
0
800
SwiftUIの大地を駆け巡るための仕組みを作る
rizumita
0
300
VIPERアーキテクチャ
rizumita
1
860
FRPを使いはじめて3年が過ぎました。
rizumita
4
1.5k
とあるプログラマのリモートワーク
rizumita
0
400
Other Decks in Programming
See All in Programming
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
210
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.8k
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
600
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
160
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
170
最近”作らせてる” ローカルAIアプリの話
akit37
0
500
APNsからLive Activityを開始する話
yumnumm
0
180
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
9
5.2k
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
330
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
980
GraphQL の onError と Nullability のこれから
quramy
0
180
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
180
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Un-Boring Meetings
codingconduct
0
460
Deep Space Network (abreviated)
tonyrice
0
380
A designer walks into a library…
pauljervisheath
211
25k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
GraphQLとの向き合い方2022年版
quramy
50
15k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
540
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
650
Claude Code のすすめ
schroneko
67
230k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Transcript
@rizumita JavaScript for Automation Release Notes͔Β
͡Ίʹ ❖ MacͰͷࣗಈԽεΫϦϓτݴޠAppleScript ❖ AppleScript͋·Γར༻͕͍ͬͯͳ͍ ❖ AppleScriptಛघͳߏจ ❖ Yosemite͔ΒJavaScript͕ར༻Մೳʹͳͬͨ ❖
JavaScript for AutomationͱݺΕΔ
جຊ - AppleScript tell application "Safari" set theWindow to first
window set theTab to current tab of theWindow do JavaScript "alert(document.title)" in theTab end tell
جຊ - JavaScript safari = Application('Safari') window = safari.windows[0] tab
= window.currentTab safari.doJavaScript('alert(document.title)', { in: tab })
ApplicationͷΞΫηεํ๏ Application('Safari') // ໊લ Application('com.apple.safari') // όϯυϧID Application(‘/Applications/Safari.app') // ύε
Application(763) // ϓϩηεID Application(‘eppc://127.0.0.1/Safari') // ϦϞʔτϚγʔϯ Application.currentApplication() // ΧϨϯτΞϓϦ
ྻཁૉͷΞΫηε // Index window = app.windows.at(0) window = app.windows[0] //
Name window = app.windows.byName(‘New Window’) window = app.windows[‘New Window’] // ID window = app.windows.byId(256)
ྻͷϑΟϧλϦϯά windows.whose({query})Ͱߦ͏ɻ { name: 'JavaScript for Automation' } { _match:
[ hoge.tabs[0].name, 'Apple' ] }
݅ͷࢦఆ { hoge: { filter: ‘Fuga’ } } _equals /
‘=' _contains / _beginsWith / _endsWith _greaterThan / ‘>' _greaterThanEquals / ‘>=‘ _lessThan / ‘<‘ _lessThanEquals / '<='
and or not { _and: [ { name: 'Apple' },
{ size: { '<': 20 } }, ]} _and _or _not
ΦϒδΣΫτͷ࡞ message = Mail.OutgoingMessage().make() message = Mail.OutgoingMessage({ subject: 'Hello world',
visible: true }) para = TextEdit.Paragraph({}, 'Some text')
Scripting Additions app = Application.currentApplication() app.includeStandardAdditions = true app.say('Hello world')
app.displayDialog('Please enter your email address', { withTitle: 'Email', defaultAnswer: '
[email protected]
' }) // ϝιουʹ͍ͭͯϥΠϒϥϦͷStandardAdditionsΛࢀর
JavaScriptͷؔ var safari = Application('Safari'); link = makeMarkdownLink(safari); safari.includeStandardAdditions =
true safari.setTheClipboardTo(link) function makeMarkdownLink(aSafari) { var title = aSafari.doJavaScript('document.title', { in: safari.windows[0].currentTab() }); var url = aSafari.doJavaScript('document.URL', { in: safari.windows[0].currentTab() }); return '[' + title + '](' + url + ')'; }
ࢀߟURL ❖ JavaScript for Automation Release Notes https://developer.apple.com/library/mac/ releasenotes/InterapplicationCommunication/RN- JavaScriptForAutomation/index.html