#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 383, 361, 330, 191)
$Icon1 = GUICtrlCreateIcon("F:/E/17292个精品ICO图标下载(最全的图标集合)(1)/17292个精品ICO图标下载(最全的图标集合)(1)/winxp/application/Burn.ico", -1, 16, 24, 48, 48, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon2 = GUICtrlCreateIcon("F:/E/17292个精品ICO图标下载(最全的图标集合)(1)/17292个精品ICO图标下载(最全的图标集合)(1)/winxp/application/Burn.ico", -1, 24, 120, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
If _WinAPI_GetForegroundWindow()=$Form1 Then
Local $ckxx=WinGetPos ( $Form1),$mousezb=MouseGetPos()
If $mousezb[0]-$ckxx[0]>$ckxx[2]/2 And $mousezb[0]-$ckxx[0]<$ckxx[2] And $mousezb[1]-$ckxx[1]>20 And $mousezb[1]-$ckxx[1]<$ckxx[3] Then
;MsgBox(0,"","")
Local $tpoint = DllStructCreate("int X;int Y")
$pos = MouseGetPos()
DllStructSetData($tpoint, "X", $pos[0])
DllStructSetData($tpoint, "Y", $pos[1])
If _WinAPI_WindowFromPoint($tpoint)<>$Icon2 Then
For $i=1 To 300 Step 1
$mos=GUIGetCursorInfo ( $Form1)
If $mos[4] = $Icon2 Then ExitLoop
GUICtrlSetPos ( $Icon2,$i,-1)
Sleep(10)
Next
EndIf
EndIf
EndIf
WEnd