incepator Posted August 27, 2014 Share Posted August 27, 2014 Hi guysI 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! expandcollapse popup#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 More sharing options...
tlman12 Posted August 27, 2014 Share Posted August 27, 2014 look at _IEFormElementCheckBoxSelect in the help file. I think that's what your gonna want. Link to comment Share on other sites More sharing options...
incepator Posted August 27, 2014 Author Share Posted August 27, 2014 Yes ...but not working for this. Link to comment Share on other sites More sharing options...
MikahS Posted August 27, 2014 Share Posted August 27, 2014 can you show us what you tried with _IEFormElementCheckBoxSelect? Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy 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 More sharing options...
incepator Posted August 27, 2014 Author Share Posted August 27, 2014 Sure, but not working, because "emai" name is not valid. Case $3 $oForm2 = _IEFormGetObjByName($oIE, "email") _IEFormElementCheckBoxSelect($oForm2, "on") Link to comment Share on other sites More sharing options...
MikahS Posted August 27, 2014 Share Posted August 27, 2014 (edited) well is "email" the form object? If not, then you'll need to find what is. Edited August 27, 2014 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy 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 More sharing options...
incepator Posted August 27, 2014 Author Share Posted August 27, 2014 Tell me if you know Link to comment Share on other sites More sharing options...
Inververs Posted August 27, 2014 Share Posted August 27, 2014 (edited) 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 August 27, 2014 by Inververs incepator 1 Link to comment Share on other sites More sharing options...
MikahS Posted August 27, 2014 Share Posted August 27, 2014 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 ~ getENVvarsMy 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 More sharing options...
incepator Posted August 27, 2014 Author Share Posted August 27, 2014 Thanks! Link to comment Share on other sites More sharing options...
incepator Posted August 27, 2014 Author Share Posted August 27, 2014 $checkbox = _IEGetObjByName($oIe, 'remember') MsgBox(0,"Checkbox:",$checkbox) I want to know when that checkbox is checked or not.I do not return True and False ... as I thought I Link to comment Share on other sites More sharing options...
Solution Inververs Posted August 27, 2014 Solution Share Posted August 27, 2014 $checkbox = _IEGetObjByName($oIe, 'remember') MsgBox(0,"Checkbox:",$checkbox.checked) incepator 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now