....wenns nur ums bewegen geht...
Spoiler anzeigen
#include <WinAPI.au3>
[/autoit] [autoit][/autoit] [autoit]$anz = 10
[/autoit] [autoit][/autoit] [autoit]Global $button[$anz + 1], $x[$anz + 1], $y[$anz + 1]
$gui = GUICreate("Test", 600, 600)
For $i = 1 To $anz
$button[$i] = GUICtrlCreateButton($i, 10 + Random(20, 500, 1), 10 + Random(20, 500, 1), 20, 20)
Next
GUISetState(@SW_SHOW, $gui)
$variable = 0
AdlibRegister("_move", 1000)
While guigetmsg()<>-3
For $i = 1 To $anz
$a = ControlGetPos($gui, "Test", $button[$i])
If $a[0] < 10 Then $x[$i] = -$x[$i]
If $a[1] < 10 Then $y[$i] = -$y[$i]
If $a[0] > 490 Then $x[$i] = -$x[$i]
If $a[1] > 490 Then $y[$i] = -$y[$i]
ControlMove("Test", "", $button[$i], $a[0] + $x[$i], $a[1] + $y[$i], $a[0] / 10, $a[0] / 10)
Next
WEnd
Exit
Func _move()
For $i = 1 To $anz
$x[$i] = Random(-2, +2, 1)
$y[$i] = Random(-2, +2, 1)
Next
_WinAPI_RedrawWindow($gui)
EndFunc ;==>_move