Well it would be great if we could have a mechanism of communication between the calling script and the script being called. That would open up many advanced scripting possibilities. The best way would be to access global variables as properties. Maybe something like...
If $Kix.Vars("Progess") = 4 And $Counter = $MaxCount
$Kix.Vars("LoopFinished") = 1
EndIf