本帖最后由 lynfr8 于 2009-5-20 04:21 编辑
我也琢磨很久,老是以为是循环语句出了问题,在while和if后面不断换地方用msgbox然后尝试单击就是无法提示,没想到原来是后面的两段Func 搞错了...
另外:
那个while循环精简一下也可顺利运行While 1
$MousePos = GUIGetCursorInfo($MainGUI)
$WinPos = WinGetPos($MainGUI)
If BitAND($MousePos[0]<=117,$MousePos[0]>=17,$MousePos[1]<=118,$MousePos[1]>=18) Then
$ThisCtrlID = 1
Else
$ThisCtrlID = 0
EndIf
If $LastCtrlID <> $ThisCtrlID Then
Switch $ThisCtrlID
Case 1
$ImageState[1] = 2
Case 0
$ImageState[1] = 1
EndSwitch
_SetTotalBitmap()
$LastCtrlID = $ThisCtrlID
ElseIf $ThisCtrlID = 1 and $MousePos[2]Then
_exit()
EndIf
Sleep(50)
WEnd
|