Jump to content

write in et IE form ? (not with send fonc)


hutch
 Share

Recommended Posts

hello

i m french so sorry for my poor english

I have made a little web site in PHP

I want to get some information about the computer who launch my PHP IE form (like windows version , ip adresse...)

and put it directly in the input called "hidden" but not whith the "send" command

that is my index.htm

<FORM action="traitement.php"; " method="post">
Merci de saisir votre identifiant courtage "couxxxxx"<br><br>
       <INPUT name="text" VALUE="cou" size="13" MAXLENGTH=12>
     <INPUT type="submit" value="Envoyer"><INPUT type="reset">
  <INPUT name="hidden" TYPE="password" size="20">
</FORM>

and i open it in this script

#include <GUIConstants.au3>
#include <IE.au3>
Opt("GUIOnEventMode", 1)  ; Change to OnEvent mode
Opt("GUICloseOnESC", 1)         ;1=ESC  closes, 0=ESC won't close


$Form1 = GUICreate("installation activex", 600, 200, 10, 10);,  $WS_POPUP )

GUISetOnEvent($GUI_EVENT_CLOSE, "terminate")
Func terminate()
  exit
EndFunc

$Obj = _IECreateEmbedded ( )
$browser = GUICtrlCreateObj($Obj, 0, 0, 600, 200 )
GUISetState(@SW_SHOW)
_IENavigate ($Obj, 'about:blank')
$sHTML = "<h1>test...</h1>"
_IEBodyWriteHTML ($Obj, $sHTML)

$online = 1
$wasonline = 0
_IENavigate ($Obj, 'c:\index.htm')

While 1
    sleep (3000)
WEnd

thanks a lot

and thanks for autoit (this software has changed my life)

Edited by hutch
Link to comment
Share on other sites

You could use _IEFormElementSetValue , you have to give a name to your FORM.

From help file:

#include <IE.au3>
$oIE = _IECreate ("http://www.google.com")
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery = _IEFormElementGetObjByName ($oForm, "q")
_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
_IEFormSubmit ($oForm)
Link to comment
Share on other sites

You could use _IEFormElementSetValue , you have to give a name to your FORM.

From help file:

#include <IE.au3>
$oIE = _IECreate ("http://www.google.com")
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery = _IEFormElementGetObjByName ($oForm, "q")
_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
_IEFormSubmit ($oForm)

thanks a lot

very easy

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...