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


Click here to return to the '10.4: A script to view Spotlight metadata in text files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: A script to view Spotlight metadata in text files
Authored by: jporten on Jun 18, '05 07:23:45PM
Liked the script. Didn't like that TextEdit wrapped the resulting windows. Modified the script so it resizes each window as it is opened. (Note: if your default editor is NOT TextEdit, well, don't use this.)

tell application "Finder"
	set miTem to selection
	repeat with i from 1 to number of items in miTem
		set this_item to item i of miTem as string
		set this_item to POSIX path of this_item
		do shell script "mdls " & quoted form of this_item & " | open -f"
		tell application "TextEdit"
			set currBounds to bounds of window 1
			set item 3 of currBounds to ((item 3 of currBounds) + 150)
			set bounds of window 1 to currBounds
		end tell
	end repeat
end tell


[ Reply to This | # ]