Chinasmoker Posted May 6, 2007 Share Posted May 6, 2007 how to fill some letters or numbers in web page 's input tag Thanks any way One is never too old to learn Link to comment Share on other sites More sharing options...
James Posted May 6, 2007 Share Posted May 6, 2007 Use the _IE functions. Its in the help file. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Chinasmoker Posted May 6, 2007 Author Share Posted May 6, 2007 Use the _IE functions. Its in the help file.I searched it in help file yesterday,but I didnt find out the function I want to useCan you tell me concrete function,thanks One is never too old to learn Link to comment Share on other sites More sharing options...
James Posted May 6, 2007 Share Posted May 6, 2007 COntrolSend? You could make it send some javascript injection to fill in the forms. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Chinasmoker Posted May 6, 2007 Author Share Posted May 6, 2007 CODE#include <GUIConstants.au3> #include <IE.au3> _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () #Region ### START Koda GUI section ### Form=C:\Documents and Settings\Administrator\桌面\AForm2.kxf $Form2 = GUICreate("Test", 764, 635, 195, 120) GUISetIcon("D:\102.ico") $Label1 = GUICtrlCreateLabel("网址:", 9, 56, 31, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $URL = GUICtrlCreateInput("", 42, 56, 633, 21) GUICtrlCreateGroup("", 0, 0, 754, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("转到", 697, 56, 43, 25) $Obj1_ctrl = GUICtrlCreateObj($oIE, 2, 96, 760, 516) $Button2 = GUICtrlCreateButton("首页", 52, 16, 75, 25) $Button3 = GUICtrlCreateButton("后退", 175, 16, 75, 25) $Button4 = GUICtrlCreateButton("前进", 306, 16, 75, 25) $Button5 = GUICtrlCreateButton("停止", 424, 16, 75, 25) $Group1 = GUICtrlCreateGroup("", 0, 48, 760, 41) GUICtrlCreateGroup("", -99, -99, 1, 1) $MenuItem1 = GUICtrlCreateMenu("设置(&Y)") $MenuItem3 = GUICtrlCreateMenuItem("设定参数", $MenuItem1) $MenuItem2 = GUICtrlCreateMenu("注册(&Z)") $MenuItem4 = GUICtrlCreateMenuItem("注册", $MenuItem2) $MenuItem5 = GUICtrlCreateMenuItem("关于", $MenuItem2) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### _IENavigate ($oIE, "http://www.slashmysearch.com/earn/id/34329",0) $oInput = _IEGetObjByName ($Obj1_ctrl, "text") $oclip = _IEGetObjByName ($Obj1_ctrl, "submit") While 1 $nMsg = GUIGetMsg ( ) $readURL = GUICtrlRead ($URL) ;$oInput = _IEGetObjByName ($oIE, "query") ;$oclip = _IEGetObjByName ($oIE, "search") ;_IEAction ($oclip, "copy") ;_IEAction ($oInput, "paste") Switch $nMsg ;case $Button1 ;_IENavigate ($oIE, $readURL,0) ;Case $Button2 ;_IENavigate ($oIE, "http://www.slashmysearch.com/earn/id/34329") ;GUICtrlSetData ($URL,"http://www.slashmysearch.com/earn/id/34329") ;Case $Button3 ;_IEAction ($oIE, "back") ;Case $Button4 ;_IEAction ($oIE, "forward") ;Case $Button5 ;_IEAction ($oIE, "stop") Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd if use controlsend ,It must be a windows.otherwise ,how to know controlID on top of codes: I want to use _IEAction ($o_object,"paste"),Do you fell this way can be practicable?thanks One is never too old to learn Link to comment Share on other sites More sharing options...
James Posted May 6, 2007 Share Posted May 6, 2007 I guess it can, but using IE functions and getting the name of the input etc will be easier. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
DaleHohm Posted May 6, 2007 Share Posted May 6, 2007 You'll want _IEFormGetObjByName (or _IEFormGetCollection) and _IEFormElementGetObjByName and _IEFormElementSetValue 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...
Chinasmoker Posted May 7, 2007 Author Share Posted May 7, 2007 You'll want _IEFormGetObjByName (or _IEFormGetCollection) and _IEFormElementGetObjByName and _IEFormElementSetValueDaleI ll try it ,thanks One is never too old to learn 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