Window has Focus

This is likley a innerspace and not isxeq2 specific question, but how do I make sure that a isx window has focus before executing a piece of script?
I have a mouse click that needs the character to have focus before the mouse click executes.

I could write some if window size is x, then do y, but i'd rather just check focus.
 
Top Bottom