- AppleScriptでEvernoteのタグを作成するときのバグ
- 親タグを指定しても反映されない
- 常に最上位のタグになってしまう
タグの作成時に親タグを指定できないバグ.scpt
tell application "Evernote"
set newTag to make tag with properties {name:"Child Tag", parent:tag "Parent Tag"}
properties of newTag
end tell
--> {class:tag, name:"Child Tag", parent:missing value}
- 上のスクリプトで最終行に
parent:missing value
とある- 親タグを指定したにもかかわらず最上位のタグになっている
- 本来なら
parent:tag "Parent Tag" of application "Evernote"
となるべき
- バグを回避する方法
- タグを作成した後に親タグを指定する
- ハンドラにしたのが下のスクリプト
makeNewTag.scpt
tell application "Evernote"
set newTag to my makeNewTag("Child Tag", tag "Parent Tag")
properties of newTag
end tell
--> {class:tag, name:"Child Tag", parent:tag "Parent Tag" of application "Evernote"}
on makeNewTag(tagName as text, parentTag)
tell application "Evernote"
set newTag to make tag with properties {name:tagName}
set parent of newTag to parentTag
end tell
return newTag
end makeNewTag
更新履歴
- 2014-07-12: Evernote for Mac 5.6.0へアップデート時に当バグ発生のため作成