找回密码
 加入
搜索
查看: 2320|回复: 2

[网络通信] [自己解决了]自动搜索不能埴写关键词。用www.google.com又可以

[复制链接]
发表于 2010-8-29 09:42:17 | 显示全部楼层 |阅读模式
本帖最后由 yang3114 于 2010-8-31 16:05 编辑

#include <IE.au3>
$oIE = _IECreate ("http://58.ieeie.com/sogou.aspx?u=xhswb")
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery = _IEFormElementGetObjByName ($oForm, "q")
_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
_IEFormSubmit ($oForm)

用这个又可以
#include <IE.au3>
$oIE = _IECreate ("www.google.com")
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery = _IEFormElementGetObjByName ($oForm, "q")
_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
_IEFormSubmit ($oForm)

请高手帮我改一下。
 楼主| 发表于 2010-8-30 21:36:07 | 显示全部楼层
有没有高手啊。帮我改一下上面那段代码
发表于 2010-8-31 16:14:51 | 显示全部楼层
看了一下你的网页
那个form是sf
输入框是query
但以下代码不响应,不知哪里出错了
#include <IE.au3>
$oIE = _IECreate ("http://58.ieeie.com/sogou.aspx?u=xhswb")
$oForm = _IEFormGetObjByName ($oIE, "sf")
$oQuery = _IEFormElementGetObjByName ($oForm, "query")
;~ $OK = _IEGetObjByID($oIE, "stb");通过工具查询到得按钮ID值

_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
Send("AutoIt IE.au3")
Send("{enter}")
_IEFormSubmit ($oForm)
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-10-3 08:31 , Processed in 0.080389 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表