Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Help - Delphi] Web Form Filling

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Flabbergasted
Expert Cheater
Reputation: 0

Joined: 11 Oct 2007
Posts: 231
Location: I have alzheimer's.

PostPosted: Tue Jan 27, 2009 3:35 am    Post subject: [Help - Delphi] Web Form Filling Reply with quote

Hi, this is my code to fill out the first raidobutton for number 1 on http://www.quizjungle.com/?act_id=3&gid=236&pid=84&cid=910&aid=3074&sid=CD7809_2175z683271, but it doesn't work.

Code:
procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject;
  const pDisp: IDispatch; var URL: OleVariant);
var iDoc: IHtmlDocument2;
  i: integer;
  ov: OleVariant;
  iDisp: IDispatch;
  iColl: IHTMLElementCollection;
  iInputElement: IHTMLInputElement;

begin

  WebBrowser1.ControlInterface.Document.QueryInterface(IHtmlDocument2, iDoc);
  if not assigned(iDoc) then begin
    ShowMessage(' !!!??? Nothing dowloaded ... ');
    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(IHTMLInputElement, iInputElement);
        if assigned(iInputElement) then begin
          if iInputElement.Get_name = 'q37_1_1'
          then iInputElement.Set_value('1');
        end;
      end;
    end;
  end;
end;
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites