replace your the Func Icon() with this code. it should deselect any icon that is selected
Code:
Func Icon()
If WinExists("STAR WARS™: The Old Republic™") Then
Sleep(100)
Else
$x2 = 0
$y2 = 0
MouseMove(@DesktopWidth,0,0)
MouseClick("Left")
WinMinimizeAll()
Sleep(500)
$result2 = _Imagesearcharea("Images/Icon.PNG",1,0,0,@DesktopWidth,@DesktopHeight,$x2,$y2,100)
If $result2 = 1 Then
Mouseclick("Left", $x2, $y2, 2, 0)
MouseMove(@DesktopWidth,0,0)
ToolTip("Waiting 30 seconds for the Login window to appear.", @DesktopWidth/2, @DesktopHeight/2)
Else
ToolTip("The SWTOR icon was not found on your Desktop.", @DesktopWidth/2, @DesktopHeight/2)
Sleep(2000)
EndIf
EndIf
EndFunc