Hi,
i'm trying to script the creation of a smart collection. But when it comes to SearchCondition object (SearchCondition(searchField, operatorType, operand)), i can't find any example of the searchField argument... I would like, for example, to specify criterias based on file name and metadatas...
Has anyone managed to script smart collections creation, and can explain it to me ?
Here is my work-in-progress script :
var myDoc=app.document;
var myScope=myDoc.visibleThumbnails[0].parent;
var whatToSearch='aString';
var searchParam01=new SearchCondition(WHAT_AM_i_ISUPPOSED_TO_WRITE_HERE, 'startsWith', whatToSearch);
var searchParam02=new SearchCondition(WHAT_AM_i_ISUPPOSED_TO_WRITE_HERE, 'contains', whatToSearch);
var mySearchSpec=new SearchSpecification ([searchParam01,searchParam02], 'or',100);
var thb_searchByRef=app.createSmartCollection ('searchByRef',myScope, mySearchSpec);
app.document.thumbnail=thb_searchByRef;