directbuy420 Posted January 22, 2006 Share Posted January 22, 2006 (edited) I am new to using autoit, i am opening an explorer shell in a tab of a gui. I would like to communicate with this webpage...what am i doing wrong? here is my code #include <IE.au3> $Tab=GUICtrlCreateTab (0,0, 1000,700) $Tab0=GUICtrlCreateTabitem ("Database") $oIE = ObjCreate("Shell.Explorer.2") $GUIActiveX = GUICtrlCreateObj($oIE, 10, 25, 900, 670) GUICtrlSetStyle($oIE, $WS_VISIBLE) $oIE.navigate("http://directbuy420.com/admin/admin/") ; get pointers to the login form and username and password fields $o_form = _IEFormGetObjByName($oIE, "logoninfo") $o_login = _IEFormElementGetObjByName($o_form, "username") $o_password = _IEFormElementGetObjByName($o_form, "password") ; Set field values and submit the form _IEFormElementSetValue($o_login, "blank") _IEFormElementSetValue($o_password, "blank") _IEFormSubmit($o_form) Exit I relize i may need to use the ie attach function, but a m not sure as to how to do that any help would be greatly appreciated. Note - If in attempting to help someone checks the page i am loading, i understand that the form names in the above code are incorrect. Thank you in advance Edit - It returns the error that the objects declared must be valid objects, it is not finding the objects because it does not see the shell window i guess. how would i activate that window inside the tab to send functions to it? Edited January 22, 2006 by directbuy420 Link to comment Share on other sites More sharing options...
DaleHohm Posted January 22, 2006 Share Posted January 22, 2006 There are so many problems wth this code -- it doesn't use the GUI functions properly or the IE.au3 functions properly. Forget about the code for a minute and describe what you are really trying to accomplish. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
psynegy Posted January 22, 2006 Share Posted January 22, 2006 (edited) Where can IE.au3 be obtained? Edited January 22, 2006 by psynegy Link to comment Share on other sites More sharing options...
DaleHohm Posted January 22, 2006 Share Posted January 22, 2006 Where can IE.au3 be obtained?See my sig (it is here)Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
psynegy Posted January 23, 2006 Share Posted January 23, 2006 Ah, so it is! I have my script working now! Thanks! Link to comment Share on other sites More sharing options...
directbuy420 Posted January 23, 2006 Author Share Posted January 23, 2006 I would like to have a gui, with a tab interface, in one of the tabs I would like to open an internet explorer window. I would then like to be able to automate some functions of that web page. I have the tab, and the webpage in the tab, I cannoy however send commands to that webpage right now. how would i accomplish this? Link to comment Share on other sites More sharing options...
directbuy420 Posted January 23, 2006 Author Share Posted January 23, 2006 to expand on what i would like to do - i would like to use your ie.au3 functions to control the webpage embedded in the tab Link to comment Share on other sites More sharing options...
DaleHohm Posted January 23, 2006 Share Posted January 23, 2006 (edited) Most of your troubles are on the GUI side... you are missing the include for GUIConstants, you are missing the GUICreate(), you are attempting a GUICtrlSetStyle on the IE COM object instead of a GUI element, you'll need an event loop for your GUI... Also, if you use the _IENavigate() function instead of the .navigate method directly it will automatically call _IELoadWait() for you to insure the document load completes before attempting to access elements in it... That should be a start. Dale Edit: typo Edited January 23, 2006 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble 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