mtvtop 发表于 2011-10-26 01:12:46

ie窗口下按钮刷新控制问题[已解决]

本帖最后由 mtvtop 于 2011-12-3 00:27 编辑



#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister ()
$oIE = _IECreateEmbedded ()

Local $all_width = @DesktopWidth - 10 ;窗口宽
Local $all_hight = @DesktopHeight - 70 ;窗口高
Local $tel="123456"

GUICreate($tel, $all_width, $all_hight)
GUICtrlCreateTab(8, 8, $all_width - 20, $all_hight - 50)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)


$Button1 = GUICtrlCreateButton("开始", 6, $all_hight - 30, 75, 25, 0)
$Button2 = GUICtrlCreateButton("刷新", 86, $all_hight - 30, 75, 25, 0)
$Button3 = GUICtrlCreateButton("关闭", 166, $all_hight - 30, 75, 25, 0)

GUISetState()


While 1
        $nMsg = GUIGetMsg()
Select               
               
      Case $nMsg = $Button3
            ExitLoop       
      Case $nMsg = $Button1
            _go()
      Case $nMsg = $Button2
         _IEAction ($oIE, "refresh")
EndSelect
WEnd

GUIDelete()

Exit

Func _go()
        _IENavigate($oIE, "http://www.qq.com/")
EndFunc   ;==>_go

Func _gogo()
        _IEAction ($oIE, "refresh")
EndFunc   ;==>_go

点了无反应,请问问题出在哪?

mtvtop 发表于 2011-10-26 18:11:11

谁能帮帮忙

lynfr8 发表于 2011-10-26 19:12:36

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
_IEErrorHandlerRegister ()
$oIE = _IECreateEmbedded ()
Local $all_width = @DesktopWidth - 10
Local $all_hight = @DesktopHeight - 70
Local $tel="123456"
GUICreate($tel, $all_width, $all_hight)
GUICtrlCreateTab(8, 8, $all_width - 20, $all_hight - 50)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
GUICtrlCreateObj($oIE, 10, 40, $all_width-30, $all_hight-90);;;;;;;;;;;;;;;;;;;;
$Button1 = GUICtrlCreateButton("开始", 6, $all_hight - 30, 75, 25, 0)
$Button2 = GUICtrlCreateButton("刷新", 86, $all_hight - 30, 75, 25, 0)
$Button3 = GUICtrlCreateButton("关闭", 166, $all_hight - 30, 75, 25, 0)
GUISetState()
While 1
      $nMsg = GUIGetMsg()
Select               
      Case $nMsg = $Button3
            Exit      
      Case $nMsg = $Button1
            _go()
      Case $nMsg = $Button2
         _IEAction ($oIE, "refresh")
EndSelect
WEnd

Func _go()
      _IENavigate($oIE, "http://www.baidu.com/")
EndFunc   ;==>_go

Func _gogo()
      _IEAction ($oIE, "refresh")
EndFunc   ;==>_go

mtvtop 发表于 2011-10-26 19:39:25

老大 请问
Func _go()

      _IENavigate($oIE, "http://www.baidu.com/")

EndFunc   ;==>_go

我在这里加了一个循环后,按钮就无法用了,请问要怎么解决?
Func _go()

While 1
;这里面是主程序
WEnd

EndFunc   ;==>_go

mtvtop 发表于 2011-10-26 19:48:53

回复 3# lynfr8

来大能不能再帮忙看一下

lynfr8 发表于 2011-10-26 20:13:28

回复lynfr8

来大能不能再帮忙看一下
mtvtop 发表于 2011-10-26 19:48 http://www.autoitx.com/images/common/back.gif


    http://www.autoitx.com/forum.php?mod=viewthread&tid=18659&fromuid=1003
这个问题论坛已经问了N次了,再不明白论坛搜索“循环”
页: [1]
查看完整版本: ie窗口下按钮刷新控制问题[已解决]