找回密码
 加入
搜索
查看: 2506|回复: 1

[原创] 批量写网易微博代码

[复制链接]
发表于 2010-7-31 13:25:48 | 显示全部楼层 |阅读模式
自已写的一段代码,可以自动复制记事本里的内容到网易微博上的代码,很简单,网页控件获取方式和帮助文档里的不同(参考某大神的)
#include <IE.au3>
$oIE = _IECreate ("http://t.163.com/#home")
_IELoadWait($oIE)

$oText = _IEGetObjByID($oIE, "sendinfo");通过工具查询到得输入框ID值

$OK = _IEGetObjByID($oIE, "sendinfoBtn");通过工具查询到得按钮ID值

$file = FileOpen("t.txt", 0)

; 检查打开的文件是否可读
If $file = -1 Then
    MsgBox(0, "错误", "不能打开文件.")
    Exit
EndIf

; 每次读取一行文本,直到文件结束.
While 1
    $line = FileReadLine($file)
 
 If StringLen($line)>12 And StringLen($line)<164 Then
  Sleep(1100)
 $oText.value =$line 
 $OK.click 
 _IELoadWait($oIE)
 
EndIf

    If @error = -1 Then ExitLoop
Wend

FileClose($file)

 
发表于 2010-8-1 13:37:09 | 显示全部楼层
很不错啊,加油
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-5 01:50 , Processed in 0.068013 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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