I found the following script and changed the name to main, thinking it would enable me to pause keywords. However, it is not doing anything. I have a list of keywords I would like to pause. I'm not sure of a withCondition to use that would pick from a list. Would this work in Java "Text IN [ 'best movies','keyword2']"?
Thanks,
function main() {
var adGroupIterator = AdsApp.adGroups()
.withCondition('Name = "Test"')
.get();
//Logger.log(adGroupIterator);
if (adGroupIterator.hasNext()) {
var adGroup = adGroupIterator.next();
var keywordIterator = adGroup.keywords()
.withCondition('Text="best movies"').get();
//Logger.log(keywordIterator);
while (keywordIterator.hasNext()) {
var keyword = keywordIterator.next();
Logger.log(keyword);
keyword.pause();
}
}
}