*** winboard-original.c Tue Mar 5 02:14:58 2002 --- winboard.c Tue Mar 5 02:24:50 2002 *************** *** 5126,5131 **** --- 5126,5140 ---- } WNDPROC consoleTextWindowProc; + + int openpage(char *string) { + + int result; + result = ShellExecute(NULL, "open", string, NULL, NULL, SW_SHOWNORMAL); + return result; + + } + void CommandX(HWND hwnd, char *command, BOOLEAN getname, BOOLEAN immediate) *************** *** 5137,5142 **** --- 5146,5153 ---- if (!getname) { SetWindowText(hInput, command); if (immediate) { + sprintf(buf, "%s %s", command, name); + SetWindowText(hInput, buf); SendMessage(hInput, WM_CHAR, '\r', 0); } else { sel.cpMin = 999999; *************** *** 5182,5190 **** --- 5193,5213 ---- SendMessage(hwnd, EM_GETSELTEXT, 0, (LPARAM) name); } if (immediate) { + + if (!strcmp(command, "weblink")) openpage(name); else + if (!strcmp(command, "thesaurus")) { + sprintf(buf, "http://www.thesaurus.com/cgi-bin/search?config=roget&words=%s", name); + openpage(buf); + } else + if (!strcmp(command, "dictionary")) { + sprintf(buf, "http://www.dictionary.com/cgi-bin/dict.pl?term=%s", name); + openpage(buf); + } + else { sprintf(buf, "%s %s", command, name); SetWindowText(hInput, buf); SendMessage(hInput, WM_CHAR, '\r', 0); + } } else { sprintf(buf, "%s %s ", command, name); /* trailing space */ SetWindowText(hInput, buf);