2013-06-26 73 views
0

我曾嘗試取消標記根元素在InDesign下面的代碼如何使用AppleScript

tell application "Adobe InDesign CS5.5" 

select text of XML element 1 of active document 

set xmlelem to item 1 of associated XML elements of selection 

untag xmlelem 

end tell 

我得到一個錯誤

"Adobe InDesign CS5.5 got an error: This element cannot be deleted." 

有什麼辦法取消標記根元素?

回答

0

我不認爲你可以。即使通過UI打開Structure窗格,也不能刪除或取消標記根元素(View -> Structure -> Show Structure)。

tell application "Adobe InDesign CS5.5" 
    set doc to active document 
    untag XML element 1 of doc 
end tell 
-- Error: This element cannot be deleted. 

可以雖然改變的根元素的名稱:

​​
+0

是喬希您的權利,感謝您的答覆 – robin