procedure TForm1.HandleParams(S: string);
var cmdline:TStringList;
begin
str1 := S;
if trim(str1)='' then exit;
cmdline:=TStringList.Create;
StrToStrings(str1,'~`ß',cmdline,false);
if CmdLine.Count <=0 then exit;
if StrFind('?',cmdline.Strings[0])>0 then begin
if lowercase(cmdline.Strings[0])='?wikipedia' then form2.EncyclopediaStartPage1Click(form2.EncyclopediaStartPage1);
if lowercase(cmdline.Strings[0])='?wikimedia' then form2.MultimediaStartPage1Click(form2.MultimediaStartPage1);
if lowercase(cmdline.Strings[0])='?wikidict' then form2.DictionaryStartPage1Click(form2.DictionaryStartPage1);
if lowercase(cmdline.Strings[0])='?wikibooks' then form2.BooksandDocumentsStartPage1Click(form2.BooksandDocumentsStartPage1);
if lowercase(cmdline.Strings[0])='?wikinews' then form2.NewsStartPage1Click(form2.NewsStartPage1);
if lowercase(cmdline.Strings[0])='?wikiquotes' then form2.QuotesStartPage1Click(form2.QuotesStartPage1);
if lowercase(cmdline.Strings[0])='?wikisource' then form2.UncyclopediaStartPage1Click(form2.UncyclopediaStartPage1);
if lowercase(cmdline.Strings[0])='?wikispecies' then form2.UncyclopediaIndex1Click(form2.UncyclopediaIndex1);
exit;
end;
if StrIsDigit(Trim(CmdLine.Strings[0])) then form2.notebook1.PageIndex:=StrToInt(Trim(CmdLine.Strings[0]))
else if Trim(CmdLine.Strings[0])<>'' then begin
form2.FlatComboBox1.TExt:=CmdLine.Strings[0];
form2.oxGraphicButton1Click(form2.oxGraphicButton1);
exit;
end;
if Trim(CmdLine.Strings[1])<>'' then begin
form2.FlatComboBox1.TExt:=CmdLine.Strings[1];
form2.oxGraphicButton1Click(form2.oxGraphicButton1);
end;
End; |