Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Switch search locations via keyboard shortcut' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Switch search locations via keyboard shortcut
Authored by: pauldy on May 16, '08 09:43:19AM

One that used to get me was searching by filename esp for remote volumes. Holding the shift key down while pressing command F starts that for you, still haven't found a way around clicking the current directory button however.



[ Reply to This | # ]
10.5: Switch search locations via keyboard shortcut
Authored by: NovaScotian on May 16, '08 02:38:22PM
I search a rather large Scripts folder fairly often for bits and pieces, but this script could be easily modified to search anywhere:
tell application "Finder"
	activate
	set {Btn, toFind} to {button returned, text returned} of (display dialog "Enter the word(s) to find in Scripts." default answer "" buttons {"Cancel", "In Content", "In File Name"} default button "In Content" with icon 1) -- will find File names from "In Content".
	open (path to scripts folder from user domain)
end tell
-- Now GUI script that window for a search.
delay 0.5 -- wait for the Finder to get on with it.
tell application "System Events" to tell process "Finder"
	set value of text field 1 of group 1 of tool bar 1 of window "Scripts" to toFind
	delay 0.5 -- wait for Sys Events to get to the right place before clicking.
	click radio button 2 of radio group 1 of group 1 of group 1 of splitter group 1 of window 1
	if Btn contains "File" then click radio button 2 of radio group 2 of group 1 of group 1 of splitter group 1 of window 1
end tell


[ Reply to This | # ]
10.5: Switch search locations via keyboard shortcut
Authored by: fastred1 on May 17, '08 01:43:36AM

Cmmd Shift F lets you search by Name Contains, but you are still doing a Contents search. Why this instead of switching to a File Name search? It seems like the results would be the same, but a Contents search would potentially be slower.



[ Reply to This | # ]
10.5: Switch search locations via keyboard shortcut
Authored by: hombre on May 19, '08 04:28:01AM

They are not the same. If you search for "test" raw query for Name contains is (((kMDItemDisplayName = "*test*"cd))) && (true), while for Filename is ((true) && (true)) && ((kMDItemDisplayName = "test*"cdw)). The former gets 251 results in my home directory, the latter 165. The difference (I think) is the filename search only gets matches at the beginning of a word, so, e.g., "25 Greatest Sun Recordings" shows up in the Name search but not in the Filename search.



[ Reply to This | # ]
10.5: Switch search locations via keyboard shortcut
Authored by: hombre on May 19, '08 04:40:25AM

Just to be clear, even though "Contents" is highlighted the "Name contains" search is not a search of contents. Also, "Name matches" seems to be the same as the Filename search.



[ Reply to This | # ]