Code: Select all
$images = "<selitems <crlf>>";
//one method to determine if all selected files were / were not JPG images
if(formatlist($images, "f", "<crlf>", "!*.jpg", "f") == "") {$AllFilesNotJPG = "0";};
else {$AllFilesNotJPG = "1";}
//another method
$FileCount = gettoken($images, "count", "<crlf>");
if(gettokenindex("*.jpg", $images, "<crlf>", 'iwc') != $FileCount) {$AllFilesNotJPG = "1";}
else {$AllFilesNotJPG = "0";}
gettokenindex("*.jpg", $images, "<crlf>", '!iwc')
where the file listing (tokenlist) contains a BMP file (or any other type file) other than JPG token are in the list, the return for SC gettokenindex would return a -1 or whatever to inform you that not not all items in the tokenlist are a token. Does that make sense?