ie中的彈框我會解..但gui調用ie中的彈框就解不了
袜子.(386361551) 下午 02:24:24
這個在GUI中貌似不行,我試過了,除非你多線程!在GUI中一彈出那個框程序就卡在那里了,
不會執行下面的代碼 除非多線程
楚留香(860050450) 下午 02:23:55
是啊 难道真的没解?#AutoIt3Wrapper_Run_Debug_Mode=Y
#include <IE.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <Debug.au3>
;快速鍵
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{f8}", "Terminate")
Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
ToolTip('腳本"暫停"', 0, 0)
WEnd
ToolTip("")
EndFunc ;==>TogglePause
Func Terminate()
Exit 0
EndFunc ;==>Terminate
$oIE = ObjCreate("Shell.Explorer.2")
$Form1 = GUICreate("IE", 1024, 715, -1, -1)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 10, 1000, 600)
$oIE.navigate(" https://login.i-part.com.tw/signup.php")
GUISetState(@SW_SHOW)
AutoItSetOption("TrayIconHide", 0)
_IELoadWait($oIE)
$oform = _IEFormGetObjByName($oIE, "frmLogin")
$oformele = _IEFormElementGetObjByName($oform, "username")
$ouser = _IEFormElementSetValue($oformele, "kkk0933")
Sleep(500)
$oformele2 = _IEFormElementGetObjByName($oform, "password")
$ops = _IEFormElementSetValue($oformele2, "0933kkk")
Sleep(500)
_IENavigate($oIE, "javascript:fnChkLogin(0)")
Sleep(1000)
For $i = 5 To 3000000
_IENavigate($oIE, " http://www.i-part.com.tw/file/file_guestbook.php?u=" & $i,0)
Send("{ENTER}")
Sleep(1000)
Send("{ENTER}")
Sleep(1000)
Next
|