Monday, November 08, 2010 at 12:04 AM.


on anything (path) {
		<<05/11/01; 6:55:14 PM by JES
			<<Implemented for Windows in script, using file.findApplication to find the app, and launch.appWithDocument to open the file. Executible files (.exe, .com, and .bat) are launched using launch.application.
	on kernelCall (path) {
		kernel (launch.anything)};
	case true {
		system.environment.isMac {
			kernelCall (path)};
		system.environment.isWindows {
			if file.isFolder (path) {
				file.openFolder (path)}
			else {
				local (extension = string.nthField (path, ".", string.countFields (path, ".")));
				case string.lower (extension) {
					"bat" {
						return (launch.application (path))}}
				else {
					return (launch.appWithDocument (file.findApplication (extension), path))}}}}}
<<bundle //test code
	<<launch.anything ("C:\\test.txt")

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.