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

iWork Apps Update v10.0

Posted on 4月 1, 2020 by Takaaki Naganoya

Keynote、Pages、Numbersのv10.0が配信されました。Keynoteの前バージョンはv9.2、Pagesはv8.2、Numbersはv6.2.1でしたが、バージョン番号を別々に採番することがめんどくさくなったのか、内部のエンジンが一新されたのか、バージョン番号をそろえてきました。

おそらく、マーケティング的な要請やユーザーサポートの手間を省くために番号をそろえてきたのでしょう。

Pages/NumbersについてはmacOS 10.14以上が対象。KeynoteはmacOS 10.15.4が必要とのことですが、いろいろ致命的なバグの修正を含んでいるため、後日macOS 10.14.6向けのKeynoteアップデートが配信されることを期待したいところです。

# アップデートに出てこないだけで、Mac App Storeから個別にKeynote v10.0のダウンロードが(macOS 10.14.6上でも)できました。なんででしょう?

v10.0 UpdateのAppleScript的な変更の有無

■Keynote v10.0:2か所

■Pages v10.0:1か所

■Numbers v10.0:変更点なし
Numbers v6.2で「特定の行数の表を作るとエラーになる」というバグがありましたが、これはv6.2.1で修正されました。これが修正されています(記憶違いだったので、記事を修正しておきます)。

Pages v10.0の変更点

documentにfacing pagesというプロパティが新設されました。見開き表示時にページの左右(奇数ページ、偶数ページ)を考慮して2ページ表示のペアを変更するという機能のようです。

AppleScript名:Pages v10.0で追加されたfacing pagesの操作を行う
tell application "Pages"
  tell front document
    set curStat to facing pages
    
    
set facing pages to not curStat –反転
    
delay 2
    
set facing pages to curStat –元に戻す
  end tell
end tell

★Click Here to Open This Script 

全言語的に普遍的な内容ではあるのですが、日本語ユーザー的には縦書き/横書きの設定属性値を持ってくれたほうがありがたいところです。たぶん、自分は使うことはないと思います。

Keynote v10.0の変更点

Keynoteは前バージョンでかなりおかしなバグが発覚していたので、その修正が行われているかどうか、というのが見所です。

結論からいえば、バグは修正されています。macOSに関して久しぶりに前向きなニュースといえます。彼らにバグを修正する意思と能力が残されていたことについては喜びたいところです。同時に残念なニュースとして、この修正に関連して新たなバグが生まれています(このあたりがいかにもAppleらしい)。

Keynoteバグ1:表(table)作成時に行数によってはエラーになる

5行の表を作るとエラーになり、他の行数でもいろいろエラーになる組み合わせが確認されていました。テスト用のAppleScriptを書いて、行数を2〜100行で変更しつつ作成、列数を2〜30列で変更しつつ作成、行数および列数を順次ループで2〜20まで変更しつつ新規作成するなどのテストを実施。無事、修正を確認できました。

ただし、本テストは表の新規作成についてのみ確認したものであり、既存の表の行数/列数の変更を確認したものではありません。Appleの仕事に関しては、修正点の周囲に新たなバグを生む可能性が高く、修正時と修正後が一番危険な状態です。彼らに「自分の作った機能を動作確認する」という能力を期待してはいけません。信じてもいけません。つねに、疑いの目で見ることが重要です。

AppleScript名:Keynote書類上に表を作成、行数を2から100まで可変
tell application "Keynote"
  tell front document
    tell current slide
      repeat with i from 2 to 100
        set aTable to make new table with properties {header column count:0, header row count:0, row count:i, column count:3}
        
delay 1
        
delete aTable
      end repeat
    end tell
  end tell
end tell

★Click Here to Open This Script 

AppleScript名:Keynote書類上に表を作成、列数を2から30まで可変
tell application "Keynote"
  tell front document
    tell current slide
      repeat with i from 2 to 30
        set aTable to make new table with properties {header column count:0, header row count:0, row count:5, column count:i}
        
delay 1
        
delete aTable
      end repeat
    end tell
  end tell
end tell

★Click Here to Open This Script 

AppleScript名:Keynote書類上に表を作成、行数および列数を2から20まで可変
tell application "Keynote"
  tell front document
    tell current slide
      repeat with x from 2 to 20
        repeat with y from 2 to 20
          set aTable to make new table with properties {header column count:0, header row count:0, row count:y, column count:x}
          
delay 0.01
          
delete aTable
        end repeat
      end repeat
    end tell
  end tell
end tell

★Click Here to Open This Script 

Keynoteバグ2:書類(document)のムービーexport optionsにバグ

数値ではじまる予約語や記号を含む予約語はAppleScriptの言語処理系では宣言できません。エラーになります。それをAppleの(おそらくKeynoteの)担当者がKeynote v7.1のアップデート時に、従来の「small」「midium」「large」といったEnumによる指定から、「360p」「540p」「720p」「1080p」「2160p」という指定を行えるように変更を加えました。

より大きな解像度の書き出しに対処したことは評価できると思いますが、そもそもAppleScriptの処理系で認識できない「数字で始まる予約語」に変えたのはダメダメです(スクリプトエディタ上で構文確認を行うとエラーになる=使えない)。つまり、この担当者はsdefの改変を行なっただけで、実際にコードを書いて動作確認を行っていないことがわかります。

Appleにバグレポートを書きつつ、このような処理が必要な場合にはnative sizeで書き出して、そのあとでムービーをリサイズするような処理で回避していました(GUI Scriptingで乗り切ったScripterもいるようですが)。

Keynote v10.0では「format360p」「format540p」「format720p」「format1080p」「format2160p」と変更され、AppleScriptの構文確認時にエラーでハネられることはなくなりました。この点についてはバグ修正が行われたものと判断してよいと思われます。

ただし、従来動作していたEnum「native size」を指定するとエラーになるようになってしまいました。互換性のために残したが動作していない、といったコメントが書かれているわけでもないため、これはバグだと判断します。

■Keynote書類フォーマットとムービー書き出し時の解像度の対応表(Piyomaru Software独自調査による)

movie export formats 標準(4:3) ワイド(16:9)
format360p 480 × 360 640 × 360
format540p 720 × 540 960 × 540
format720p 960 × 720 1280 × 720
format1080p 1440 × 1080 1920 × 1080
format2160p 2880 × 2160 3840 × 2160
AppleScript名:Keynote 360p movie export test
set targetFileHFSPath to (choose file name) as string –かならずファイル拡張子に「.m4v」を指定する必要がある
if targetFileHFSPath does not end with ".m4v" then
  set targetFileHFSPath to targetFileHFSPath & ".m4v"
end if

with timeout of 3600 seconds
  tell application "Keynote"
    export front document to file targetFileHFSPath as QuickTime movie with properties {movie format:format360p}
  end tell
end timeout

★Click Here to Open This Script 

AppleScript名:Keynote 540p movie export test
set targetFileHFSPath to (choose file name) as string –かならずファイル拡張子に「.m4v」を指定する必要がある
if targetFileHFSPath does not end with ".m4v" then
  set targetFileHFSPath to targetFileHFSPath & ".m4v"
end if

with timeout of 3600 seconds
  tell application "Keynote"
    export front document to file targetFileHFSPath as QuickTime movie with properties {movie format:format540p}
  end tell
end timeout

★Click Here to Open This Script 

AppleScript名:Keynote 720p movie export test
set targetFileHFSPath to (choose file name) as string –かならずファイル拡張子に「.m4v」を指定する必要がある
if targetFileHFSPath does not end with ".m4v" then
  set targetFileHFSPath to targetFileHFSPath & ".m4v"
end if

with timeout of 3600 seconds
  tell application "Keynote"
    export front document to file targetFileHFSPath as QuickTime movie with properties {movie format:format720p}
  end tell
end timeout

★Click Here to Open This Script 

AppleScript名:Keynote 1080p movie export test
set targetFileHFSPath to (choose file name) as string –かならずファイル拡張子に「.m4v」を指定する必要がある
if targetFileHFSPath does not end with ".m4v" then
  set targetFileHFSPath to targetFileHFSPath & ".m4v"
end if

with timeout of 3600 seconds
  tell application "Keynote"
    export front document to file targetFileHFSPath as QuickTime movie with properties {movie format:format1080p}
  end tell
end timeout

★Click Here to Open This Script 

AppleScript名:Keynote 2160p movie export test
set targetFileHFSPath to (choose file name) as string –かならずファイル拡張子に「.m4v」を指定する必要がある
if targetFileHFSPath does not end with ".m4v" then
  set targetFileHFSPath to targetFileHFSPath & ".m4v"
end if

with timeout of 3600 seconds
  tell application "Keynote"
    export front document to file targetFileHFSPath as QuickTime movie with properties {movie format:format2160p}
  end tell
end timeout

★Click Here to Open This Script 

AppleScript名:Keynote ‌‌native size movie export test (Bug)
set targetFileHFSPath to (choose file name) as string –かならずファイル拡張子に「.m4v」を指定する必要がある
if targetFileHFSPath does not end with ".m4v" then
  set targetFileHFSPath to targetFileHFSPath & ".m4v"
end if

with timeout of 3600 seconds
  tell application "Keynote"
    –export front document to file targetFileHFSPath as QuickTime movie with properties {movie format:‌‌native size}
  end tell
end timeout

★Click Here to Open This Script 

More from my site

  • iWork Appsがv12.1にアップデートiWork Appsがv12.1にアップデート
  • iWorkアプリケーションv12に共通のバグ? 新規ファイルの保存ができないiWorkアプリケーションv12に共通のバグ? 新規ファイルの保存ができない
  • iWork Appsがバージョン12.0にアップデートでselection動作正常化iWork Appsがバージョン12.0にアップデートでselection動作正常化
  • iWorks Apps v11.2が登場iWorks Apps v11.2が登場
  • iWork Appsがv11.0にアップデート、Keynoteの恥ずかしいバグが直るiWork Appsがv11.0にアップデート、Keynoteの恥ずかしいバグが直る
  • iWork Appsのv10.2アップデートが公開されるiWork Appsのv10.2アップデートが公開される
(Visited 105 times, 1 visits today)
Posted in Bug news | Tagged 10.14savvy 10.15savvy Keynote Numbers Pages | 1 Comment

1 thoughts on “<span>iWork Apps Update v10.0</span>”

  1. 7/10/20
    4:45 PM
    2020年7月10日
    4:45 PM

    Reply

    iWork Appがv10.10にアップデートし、Movie書き出しバグの修正とPDF書き出し属性を追加 – AppleScriptの穴 says:

    […] Keynote v10.0の際のアホなバグ(native size指定時にエラー)が修正されました。 […]

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

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

Google Search

Popular posts

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

Tags

10.11savvy (1101) 10.12savvy (1242) 10.13savvy (1390) 10.14savvy (586) 10.15savvy (434) 11.0savvy (277) 12.0savvy (185) 13.0savvy (55) CotEditor (60) Finder (47) iTunes (19) Keynote (98) 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 (56) Pages (37) 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