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


Oops... | 7 comments | Create New Account
Click here to return to the 'Oops...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Oops...
Authored by: ever on Jun 14, '05 09:15:58PM
Now I see why that was probably never posted! In comparing with your script, I can see now that if its missing "quoted form of" then the script might break. So make that:

try
	tell application "Finder"
		set theFile to selection as alias
		set theFile to POSIX path of theFile
	end tell
	set AppleScript's text item delimiters to "\""
	set theInfo to (do shell script "mdls -name kMDItemWhereFroms " & quoted form of theFile)
	set url1 to (text item 2 of theInfo) as text
	set url2 to (text item 4 of theInfo) as text
	set theURLs to {url1, url2}
	set theURL to (choose from list theURLs) as string
	if theURL is not "false" then
		tell application "Safari"
			make new document at end of documents
			set URL of document 1 to theURL
		end tell
	end if
	set AppleScript's text item delimiters to ""
end try


[ Reply to This | # ]
Oops...
Authored by: mark hunte on Jun 15, '05 07:53:18PM

Hey, Nice script too, I like that a lot..

---
mh



[ Reply to This | # ]