Jump to content

_IEFormGetObjByName problem


Go to solution Solved by Inververs,

Recommended Posts

Hi guys
I have a problem, you can help me to solve please?

The first button, email should automatically fill the page.
The second button should look Email the input and show if checkbox is checked.

Who can help me ... i'll buy you a beer....

Thanks!

#include <GUIConstantsEx.au3>
#include <IE.au3>
#include <WindowsConstants.au3>
#include <msgboxConstants.au3>
#include <Array.au3>
#include <ie.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


Local $oIE = _IECreateEmbedded()
$Form1_login = GUICreate("Embedded Web control Test", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, $WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
GUICtrlCreateObj($oIE, 10, 10, 620, 510)
$1 = GUICtrlCreateButton("Fill ", 10, 530, 100, 30)
$2 = GUICtrlCreateButton("Show", 120, 530, 100, 30)
$3 = GUICtrlCreateButton("", 230, 530, 100, 30)

GUISetState(@SW_SHOW) ;Show GUI

_IENavigate($oIE, "http://myseoninja.com/adminski283718/user_poster.php")

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $1
            $oForm = _IEFormGetObjByName($oIE, "form")
            $oText = _IEFormElementGetObjByName($oForm, "email")
            _IEFormElementSetValue($oText, "mailtest@mail.com")

            Local $oSubmit = _IEGetObjByName($oIE, "remember")
            _IEAction($oSubmit, "click")

        Case $2
            MsgBox(0,"Email:","")
            MsgBox(0,"Password:","")
            MsgBox(0,"Checkbox:","")

    EndSwitch
WEnd
Link to comment
Share on other sites

can you show us what you tried with _IEFormElementCheckBoxSelect?

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

well is "email" the form object? If not, then you'll need to find what is.

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

This form has no name, why are you using _IEFormGetObjByName($oIE, "form")?

You can get object by name indirect with _IEGetObjByName or _IEGetObjByID

$oName = _IEGetObjByName($oIe, 'email')
_IEFormElementSetValue($oName,'blabla@gg.blabla')

$oRemember = _IEGetObjByName($oIe, 'remember')
$oRemember.checked = True
Edited by Inververs
Link to comment
Share on other sites

Tell me if you know

 

This is for you to find out

 

This form has no name, why are you using _IEFormGetObjByName($oIE, "form")?

You can get object by name indirect with _IEGetObjByName or _IEGetObjByID

$oName = _IEGetObjByName($oIe, 'email')
_IEFormElementSetValue($oName,'blabla@gg.blabla')

$oRemember = _IEGetObjByName($oIe, 'remember')
$oRemember.checked = True

 

Good solution ;)

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

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...