#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
GUICreate("Form1", 300, 400)
$Label1 = GUICtrlCreateLabel("", 50, 40, 50, 30)
GUICtrlSetBkColor(-1, 0xffff00)
$Label2 = GUICtrlCreateLabel("", 50, 100, 50, 30)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Label3 = GUICtrlCreateLabel("", 50, 160, 50, 30)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Label4 = GUICtrlCreateLabel("", 50, 220, 50, 30)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlCreateGroup("Group1", 40, 24, 70, 55)
GUICtrlCreateGroup("Group2", 40, 84, 70, 55)
GUICtrlCreateGroup("Group3", 40, 144, 70, 55)
GUICtrlCreateGroup("Group4", 40, 204, 70, 55)
$Button1 = GUICtrlCreateButton("Button1", 176, 56, 75, 25)
GUISetState()
$a = $Label1
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case - 3
Exit
Case $Button1
If $a = $Label4 Then
GUICtrlSetBkColor($a, 0xFFFFFF)
$a = $Label1
GUICtrlSetBkColor($a, 0xffff00)
Else
GUICtrlSetBkColor($a, 0xFFFFFF)
GUICtrlSetBkColor($a + 1, 0xffff00)
$a += 1
EndIf
EndSwitch
WEnd
修改了一下,这个应该比上一个聪明点了.....