np: If you want to wait for the window then you can use while loop example (untested):
Used ControlClick as this is a better option then MouseClick.
Local $iCheckOut, $aCheckOut[2] = ["this is an apple", "this is an orange"]
While 1
If WinExists($aCheckOut[0], "") Then
WinActivate($aCheckOut[0], "")
ControlClick($aCheckOut[0], "", "", "Left",1, 22,22)
$iCheckOut = 0
ExitLoop
ElseIf WinExists($aCheckOut[1], "") Then
WinActivate($aCheckOut[1], "")
ControlClick($aCheckOut[1], "", "", "Left",1, 22,22)
$iCheckOut = 1
ExitLoop
EndIf
Sleep(100)
WEnd
MsgBox(4096, "Checkout", "Checkout Window = " & $aCheckOut[$iCheckOut])