I'm still tweaking these searches (which I'm using
all the time, so useful

).
How would I search for different specified document types, but as well as searching for the file name also search the tags, Spotlight comments, text content etc. At the moment they only search for the file names.
Here's what I have for a couple of them.
Code: Select all
set thecmd to "mdfind -onlyin ~/ 'kMDItemDisplayName == " & quote & thequery & "*" & quote & "wc" & " && (kMDItemContentType == \"com.adobe.photoshop-image\"||kMDItemContentType == \"com.adobe.illustrator.ai-image\"||kMDItemContentType == \"com.bohemiancoding.sketch.drawing\")'"
Code: Select all
set thecmd to "mdfind -onlyin ~/ 'kMDItemDisplayName == " & quote & thequery & "*" & quote & "wc" & " && (kMDItemContentType == \"com.apple.iwork.pages.pages\"||kMDItemContentType == \"public.rtf\"||kMDItemContentType == \"com.microsoft.word.doc\"||kMDItemContentType == \"org.openxmlformats.wordprocessingml.document\")'"