Posts

Post not yet marked as solved
2 Replies
713 Views
I’m getting error on last line trying to replace every placeholderText tag.I'm stuck for a couple of days trying to fix the error.Thanks a lot for any kind of help.Here's the code: var PagesApp = Application("Pages"); var theseTags = PagesApp.documents[0].placeholderTexts.tag()var uniqueTags = []for(var i=0; i < theseTags.length; i++){ var thisTag = theseTags[i]; if (!(uniqueTags.includes(thisTag))) { uniqueTags.push(thisTag); }}var theDate = "20200326"for(var i=0; i < uniqueTags.length; i++){ var thisTag = uniqueTags[i]; if (thisTag.includes("theDate")) { PagesApp.documents[0].placeholderTexts.whose({tag: thisTag}).tag = theDate; // Error: Error: Invalid key form. }}The error line in AppleScript works well : set ( everyplaceholder textwhose tag is thisTag) to theDate
Posted
by wchongo.
Last updated
.