リンクをクリップボードにコピー
コピー完了
お世話になっております。
AppleScriptでドキュメント設定や環境設定のウィンドウを取得したいのですが、なかなかうまくいきません。
tell application "Adobe Illustrator"
activate
execute menu command menu command string "document"
tell application "System Events"
tell process "Adobe Illustrator"
set b to title of window 1
display dialog b as string
end tell
end tell
end tell
これでは出来ませんでした。
window 1ではないのでしょうか。
教えていただきたいです。よろしくお願いします。
リンクをクリップボードにコピー
コピー完了
そもそもドキュメント設定や環境設定はモーダルダイアログなので、それが表示されている間、Illustratorは外部からの操作や命令を受けつけません。モーダルダイアログの取得と操作をするのは不可能のはずです。
リンクをクリップボードにコピー
コピー完了
monokanoさんがコメントしている通り
UIを取得できないので操作できませんね
リードオンリーの値もありますが
tell application "Adobe Illustrator"
properties
end tell
とか
tell application "Adobe Illustrator"
tell the current document
properties
get ruler units
end tell
end tell
単位系ならJAVASCRIPT経由かな?
tell application "Adobe Illustrator"
do javascript "app.preferences.getIntegerPreference(\"rulerType\"); "
end tell
リンクをクリップボードにコピー
コピー完了
ありがとうございます。
そうなんですね!勉強不足でした・・・。
リンクをクリップボードにコピー
コピー完了
設定ウインドウ自体の取得には意味がありませんので、Applicationの子であるPreferencesクラスの参照を考えれば良いのではないかと思います。
リンクをクリップボードにコピー
コピー完了
ありがとうございます。
別のやり方考えてみます!