Autor Beitrag
BigBen4ever
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98



BeitragVerfasst: Mo 01.03.04 19:46 
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:
36:
37:
38:
39:
uses 
  MSHTML; 

var 
  iDoc: IHtmlDocument2; 
  i: integer; 
  ov: OleVariant; 
  iDisp: IDispatch; 
  iColl: IHTMLElementCollection; 
  InputImage: HTMLInputImage; 
begin 
  WebBrowser1.ControlInterface.Document.QueryInterface(IHtmlDocument2, iDoc); 
  if not Assigned(iDoc) then 
  begin 
    Exit; 
  end; 
  ov := 'INPUT'; 
  iDisp := iDoc.all.tags(ov); 
  if Assigned(IDisp) then 
  begin 
    IDisp.QueryInterface(IHTMLElementCollection, iColl); 
    if Assigned(iColl) then 
    begin 
      for i := 1 to iColl.Get_length do 
      begin 
        iDisp := iColl.item(pred(i), 0); 
        iDisp.QueryInterface(HTMLInputImage, InputImage); 
        if Assigned(InputImage) then 
        begin 
          if InputImage.Name = 'submit' then 
          // if the name is submit / falls der name submit lautet 
          begin 
            InputImage.Click;  // click it / klick es 
          end; 
        end; 
      end; 
    end; 
  end; 
end;


wo und wie übergeb ich bei diesem code zum ausfüllen von formularen mit bild button die werte der einzelnen auszufüllenden zeilen

Moderiert von user profile iconDeCodeGuru: Code- durch Delphi-Tags ersetzt
CABALxx
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 174


D7 Ent
BeitragVerfasst: Mo 01.03.04 21:50 
ich bin mir nicht 100% sicher also kann auch gut sein das ich mich irre

aber ich kann mal spekulieren:
der code hat mit dem ausfüllen von formularen ansich nix zu tun oder? also wie gesagt kann sei das ich mich irre !

aber ich glaub der code ist wirklich nur für den einen zweck das er den Submit Button ( in diesem falle eben ein bild ) klickt

aber kein gewähr
BigBen4ever Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98



BeitragVerfasst: Di 02.03.04 22:45 
ich schussel ..problem hat sich erledigt, du hattest recht