|
本帖最后由 lynfr8 于 2009-5-13 19:04 编辑
有个au3友让我帮他解决一个问题
他提出问题最后倒是解决了
而奇怪的解决后的代码是时而出现了button点击无法反应
代码看似应该无问题
代码发上来
请教原因和解决方法
如下:
未解决前的代码(无法通过点击下一页实现盘符次序显示)$title="测试"
$oIE = ObjCreate("Shell_Explorer.2")
$Form1 = GUICreate($title, 788, 455, 365, 235)
$Button1 = GUICtrlCreateButton("下一页", 8, 8, 64, 64)
$Back = GUICtrlCreateButton("返回", 100, 8, 64, 64)
$GUIActiveX = GUICtrlCreateObj($oIE, 1, 88, 786, 360)
GUISetState()
$oIE.navigate("c:")
ControlListView($title, "", "SysListView321", "ViewChange", "smallicons")
While 1
$msg = GUIGetMsg()
If GUIGetMsg() = -3 Then Exit
Select
Case $msg = $Back
$oIE.GoBack
Case $msg = $Button1
$oIE.navigate("d:")
ControlListView($title, "", "SysListView321", "ViewChange", "smallicons")
EndSelect
WEnd
我修改后的代码(解决了上面问题,但是按钮奇怪的不定时出现无法点击)
$title="测试"
$oIE = ObjCreate("Shell_Explorer.2")
$Form1 = GUICreate($title, 788, 455, 365, 235)
$Button1 = GUICtrlCreateButton("下一页", 8, 8, 64, 64)
$Back = GUICtrlCreateButton("返回", 100, 8, 64, 64)
$GUIActiveX = GUICtrlCreateObj($oIE, 1, 88, 786, 360)
GUISetState()
$oIE.navigate("c:")
ControlListView($title, "", "SysListView321", "ViewChange", "smallicons")
$line="c:\ d:\ e:\ f:\ g:"
$array = StringSplit($line, " ", 1)
dim $count = 0;
While 1
$msg = GUIGetMsg()
If GUIGetMsg() = -3 Then Exit
Select
Case $msg = $Back
$count = $count - 1
if $count < 0 Then
$count = 0;
EndIf
;MsgBox(4096,'Count', $count)
$oIE.navigate($array[$count])
ControlListView($title, "", "SysListView321", "ViewChange", "smallicons")
Case $msg = $Button1
$count = $count + 1
if $count > (UBound($array) - 1) Then
$count = (UBound($array) - 1)
EndIf
;MsgBox(4096,'Count', $count)
$oIE.navigate($array[$count])
ControlListView($title, "", "SysListView321", "ViewChange", "smallicons")
;$count=$count+1
EndSelect
WEnd
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入
×
|