找回密码
 加入
搜索
查看: 3324|回复: 6

[AU3基础] 请教下,我是win8.1的系统

  [复制链接]
发表于 2014-8-31 11:20:17 | 显示全部楼层 |阅读模式
我用AU3跑一些IE web界面,在win7 正常, win8.1 开始正常,后来就不行了!脚本没有任何变动!!求教是不是win8.1有问题? 还有就是 如何让让AU3 用360浏览器打开来操作,之前可以的,之后也不行了!搞不懂。360是默认的!
发表于 2014-8-31 11:47:48 | 显示全部楼层
32还是64的?

64位系统最好编译成x64
发表于 2014-8-31 11:48:38 | 显示全部楼层
上代码,光说谁也不知道啥情况。
发表于 2014-8-31 19:42:29 | 显示全部楼层
上代码,光说谁也不知道啥情况。

确实是,口说无凭~~
发表于 2014-9-2 06:53:54 | 显示全部楼层
谢谢分享!!!!
发表于 2014-9-5 12:15:11 | 显示全部楼层
x64有个重定向问题
 楼主| 发表于 2014-9-28 18:22:14 | 显示全部楼层
#include <IE.au3>
#include <Excel.au3>
HotKeySet("{Esc}", "_Exit")
Local $path = @ScriptDir & "\ECAT.xlsx"
$oExcel = _ExcelBookOpen($path,0)
_ExcelSheetActivate($oExcel, "ECAT")
For $x = 1 To 2 Step 1
        $ip  = _ExcelReadCell($oExcel,$x,1)
        $ip1 = _ExcelReadCell($oExcel,$x,2)
        $ip2 = _ExcelReadCell($oExcel,$x,3)
        $ip3 = _ExcelReadCell($oExcel,$x,4)
        $ip4 = _ExcelReadCell($oExcel,$x,5)
        $id  = _ExcelReadCell($oExcel,$x,6)
        $fq  =_ExcelReadCell($oExcel,$x,7)
$oIE = _IECreate($ip)
WinSetState("[CLASS:IEFrame]","",@SW_MAXIMIZE)
$oForm = _IEFormGetObjByName($oIE, "loginForm")
Local $oQuery = _IEFormElementGetObjByName($oForm, "username")
_IEFormElementSetValue($oQuery, "admin")
Local $oQuery = _IEFormElementGetObjByName($oForm, "passwd")
_IEFormElementSetValue($oQuery, "admin")
Local $oQuery = _IEFormElementGetObjByName($oForm, "loginbtn")
_IEAction($oQuery, "click")
_IELoadWait($oIE)
;;;;;;;;;;;;;;;;
Local $zFrame = _IEFrameGetObjByName($oIE, "contents")
_IELinkClickByIndex($zFrame,1)
_IELoadWait($zFrame)
Local $ipFrame = _IEFrameGetObjByName($oIE, "main_screen")
_IELoadWait($ipFrame)
_IELinkClickByIndex($ipFrame, 1)
$frmForm = _IEFormGetObjByName($ipFrame, "frmSetup")
;;;;;;;;;;;;;;
Local $oForm = _IEFormGetObjByName($frmForm, "frmSetup")
Local $frmQuery = _IEFormElementGetObjByName($frmForm, "DeviceID")
_IEFormElementSetValue($frmQuery, $id)
Local $frmQuery = _IEFormElementGetObjByName($frmForm, "VMAddress",0)
_IEFormElementSetValue($frmQuery, "52")
Local $frmQuery = _IEFormElementGetObjByName($frmForm, "VMAddress",1)
_IEFormElementSetValue($frmQuery, "18")
Local $frmQuery = _IEFormElementGetObjByName($frmForm, "VMAddress",2)
_IEFormElementSetValue($frmQuery, "2")
If $fq= "南白" Then
        Local $frmQuery = _IEFormElementGetObjByName($frmForm, "VMAddress",3)
        _IEFormElementSetValue($frmQuery, "21")
ElseIf $fq = "汇川区" Then
        Local $frmQuery = _IEFormElementGetObjByName($frmForm, "VMAddress",3)
        _IEFormElementSetValue($frmQuery, "11")
Else
        MsgBox(4096,"是哪个区",$fq)
EndIf
_IELoadWait($frmForm)
;~ ;改好设置以后点击确定
Sleep(300)
$oSubmit = _IEGetObjByName($frmForm, "okbtn")
Local $hwnd = _IEPropertyGet($frmForm, "hwnd")
_IEAction($oSubmit, "focus")
Sleep(300)
Send("{Enter}")
Sleep(300)
Send("{Enter}")
;~ _IELoadWait($frmForm)
;~ MsgBox(4096,"下一个","5秒以后开始",5)
Sleep(5000)
_ExcelWriteCell($oExcel,"OK",$x,9)
WinClose("[CLASS:IEFrame]")
Next
_ExcelBookClose($oExcel,1,0)
Func _Exit()
        _ExcelBookClose($oExcel,1,0)            
        Exit
EndFunc
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-27 21:23 , Processed in 0.083195 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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