InDesignプラグインでアンカー付きオブジェクト作成時の注意

いつも忘れてしまうのでメモ:

プラグインでアンカー付きオブジェクトを作成する時、処理は終了するが「触れないアイテム(幽霊のようなアイテム)」が出来てしまうことがある。

アンカー付きの処理をする前に、フレームを親から切り離しておく必要がある。

IHierarchyUtils->RemoveFromHierarchy

community.adobe.com

SnpManipulateInline.cpp のChangeToInline の説明:

frameUIDRef frame to be made into an inline. Note this frame must not be parented on any hierarchy(IHierarchy). If you have a frame that is process kRemoveFromHierarchyCmdBoss before calling this method.

frameUIDRef インライン化されるフレーム。 このフレームは は、どの階層(IHierarchy)の親にもなっていないこと(must)。処理中のフレームがある場合 このメソッドを呼び出す前に kRemoveFromHierarchyCmdBoss を実行してください。

iphone 復元

環境

状況

PCの iTuens (Store版)を使って、ローカルにバックアップ(iOS14の状態)。

iOS 14 から 15 へのアップデート。

の途中で iTuensがフリーズしたように見えたので、iTunesを協定停止+再起動。

support.apple.com/ipad/restore 画面が出た。

作業

iTuens (Store版) から復元しようとしても、途中でエラー。(何度か繰り返し)

不明なエラー 4010 もしくは 75

f:id:kawaishi2:20220108113640p:plain

f:id:kawaishi2:20220108113642p:plain


今回の自分のケースで役に立ったのは下記の記事。

kamabocoblog.hatenablog.com


iTuens(Store版)をアンインストールし、iTunes(インストール版)で復元したらうまくいった。

  • 1: iTuens(Store版)をアンインストール
  • 2: iTunes(インストール版) をインストール

support.apple.com

  • 3: iTunes(インストール版)で アップデート(5-10分くらい)

support.apple.com

iOS 14 から 15に更新されて起動

バックアップから復元しようとしたが、Store版でとったバックアップが、インストール版では認識されない。

  • 4: iTunes(インストール版) をアンインストール
  • 5: iTuens(Store版)をインストール
  • 6: iTuens(Store版)を使って、バックアップから復元。(5分くらい)

回復した。

助かった。

RemoveBlank 2022 リリース

連続した空白行を、保存時に1行にする。

f:id:kawaishi2:20211118172419g:plain


RemoveBlank 2022

marketplace.visualstudio.com


以下、以前のもの。

RemoveBlank 2019

marketplace.visualstudio.com


RemoveBlank(無印)

  • Visual Studio 2013 - 2017用の拡張機能
  • リンク先では、2019まで動作するように表記があるけど、2017まで。(ミスった)
  • ビルドし直してアップすれば修正できるけど、エラーが出てビルドができない・・・。

marketplace.visualstudio.com

InDesignDevEnv Ver2.0に更新

InDesignDevEnv Windows Storeアプリ

Ver2.0 に更新

  • cc2022情報を追加

www.microsoft.com


InDesignプラグインを開発する時に、開発環境(XcodeVisual Studio)と、それらが動作するOSの組み合わせが分かるアプリ

例:CC2022のプラグイン開発するなら、Xcode12.3 が必要で、Xcode12.3 は macOS 10.15 ~macOS 11 でが必要、といった感じ。

f:id:kawaishi2:20211105112820p:plain

AppleScript POSIX file

AppleScript メモ:

set testStr to "/Users/myuser/Desktop/sample2.psd" as string
set temp to POSIX file testStr

が駄目で、

set temp to POSIX file "/Users/myuser/Desktop/sample2.psd"

が動く。

set testStr to "/Users/myuser/Desktop/sample2.psd" as string
set temp to testStr as POSIX file

も動く。

・・・?

参考: stackoverflow.com

osax がよしなに してくれてたのかな?

macOS Catalina(10.15)でのApplescriptではまった(file消したら動いた)


2021/08/24:追記2

memo: 類似(as aliasで回避)

Bug details
  • 4 votes
  • 7 comments

Can't Place Images with Applescript on MacOS 10.15 Catalina

InDesign 15.0.1

The Place command now fails in Applescript, following an upgrade to Catalina.
The "Image Catalog" sample script also fails to place the images in the same manner. Image placement fails with an error 1708, <<the file string>> doesn't understand the "place" message.

indesign.uservoice.com

forum.latenightsw.com


2021/08/24:追記

10.14で OSAX の廃止が原因か…?

developer.apple.com

こやつが「よしなに」やってくれてた(か?)
/Library/ScriptingAdditions/Adobe Unit Types.osax

現象は、14>OK, 15>NG なので、違うかぁ。

でも 13>14の更新インストールだから動いたとか? うーん。


2021/08/23:追記

シンプルに書き直したら14でも15でも動作した。

下記の「"macHD:data:hoge.indd"」は、実際はこんな感じでテストしてた。

tell "Adobe InDesign xxxx" 
set myItem to  1 of all graphics of document 1

set A to  POSIX path of file (path of item link of myItem) ★ 15でエラーに…
set A to  POSIX path of (path of item link of myItem)

InDesign側の返り値が変わったのかな?



初回 記載

10.14までどちらでも大丈夫だった(気がする)

POSIX path of "macHD:data:hoge.indd"
POSIX path of file "macHD:data:hoge.indd"


10.15(Catalina) で実行したら file のある方がうまく動作しない(気がする)

POSIX path of "macHD:data:hoge.indd"
POSIX path of file "macHD:data:hoge.indd" ★ ← NGなの?

Catalina からの仕様変更なのか、Catalinaだけの不具合なのか…。

macOS 11は未検証

回避

file 消せばいいんだけど…

同じような人がチラホラいるけど・・・。

forum.xojo.com

stackoverflow.com

stackoverflow.com

developer.apple.com