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


on usingID (appid) { <<launch the app if possible, bring to front
	<<returns true if it worked, false otherwise
	local (path = file.findApplication (appid));
	if path == "" {
		scriptError ("Couldn't locate an application whose id is '" + appid + "'.")};
	if not sys.appIsRunning (appid) {
		if not launch.anything (path) {
			return (false)};
		while not sys.appIsRunning (appid) {
			sys.systemTask ()}}; <<surrender the processor
	return (sys.bringAppToFront (file.fileFromPath (path)))}

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.