Autor Beitrag
klezmor
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 558


delphi 6 personal delphi 2005 personal
BeitragVerfasst: Sa 12.08.06 20:43 
Gibt es eine Möglichkeit dict.leo.org/ per shellexecute aufzurufen und, ein zu übersetzendes Wort, als Argument zu übergeben, so dass gleich die betreffende Seite geöffnet wird?

_________________
"Beware of bugs in the above code; I have only proved it correct, not tried it." Donald Knuth
Jakob Schöttl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: Sa 12.08.06 20:47 
Edit: Diese Antwort kannst du dir sparen, die nächste ist besser! :)
hast dus schon probiert, dass du das Wort einfach als Parameter übergibt? Vllt funktioniert das ja so einfach :nixweiss:


Zuletzt bearbeitet von Jakob Schöttl am Sa 12.08.06 21:07, insgesamt 1-mal bearbeitet
Jakob Schöttl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: Sa 12.08.06 21:04 
Ja, jetzt weiß ichs glaub ich:

wenn du ein wort eingibst bei leo, dann kommt eine seite, und die URL der seite ist zb folgende
dict.leo.org/ende?lp...Toler=on&search=berg&relink=on
das fette berg ist das wort, das ich übersetzt hab!

und wenn du jetzt diesen Link in die URLzeile vom firefox oder ie eingibst, dann kommst du direkt auf die seite!

also:
ausblenden Delphi-Quelltext
1:
ShellExecute(handle,'open',PChar('http://dict.leo.org/ende?lp=ende&lang=de&searchLoc=0&cmpType=relaxed§Hdr=on&spellToler=on&search=' + Wort + '&relink=on'),nil,nil,sw_showNOrmal)					
klezmor Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 558


delphi 6 personal delphi 2005 personal
BeitragVerfasst: Sa 12.08.06 21:07 
nein aber ich habe es trotzdem hinbekommen das ist die lösung:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,shellapi, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  const                 
firstString:string='http://dict.leo.org/ende?lp=ende&lang=de&searchLoc=0&cmpType=relaxed§Hdr=on&spellToler=on&search=';
      secondString:string='&relink=on';
  var 
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
shellexecute(application.Handle,'open',pchar(firststring+edit1.Text+secondString),nil,nil,sw_shownormal);
end;

end.

Das funktioniert einwandfrei. Man muss nur hoffen, dass Leo die Pfade der links ändert.
Schon erstaunlich wie einfach man eine große wirkung erzielen kann.

_________________
"Beware of bugs in the above code; I have only proved it correct, not tried it." Donald Knuth
Jakob Schöttl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: Sa 12.08.06 21:08 
ja, wir haben gleichzeitig das gleiche geschrieben, und so aneinander vorbei geredet :)
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Sa 12.08.06 21:24 
Es reicht übrigens http://dict.leo.org/ende?search=berg aufzurufen.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Raffo
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 300



BeitragVerfasst: So 13.08.06 07:43 
Titel: Leo Shareware
Es gibt auch von LEO eine eigene Shareware, die im Hintergrund auf z.B. mittlere Mausklick wartet und das angeklickte Wort im "Leo"-Explorer anzeigt. Das klappt fast überall, auch im Delphi Objekt Inspektor. Und kostet gerade mal 11,60 EUR. dict.leo.org/pages.e...?lp=ende&lang=de