Gets the input focus, if it belongs to a user control. If no user control has the input focus, 0 is returned.
Only one control (either user or native) can have the input focus at any one time. The control with the input focus is the one that receives keyboard and mouse input.
You can set the focus to a user control so that it will be the recipient of keyboard and mouse messages. The input focus is lost when the user clicks outside of the control, or tabs outside of it.
// Get the input focus.
// First create a User Window to place the Control on
$windowId = `createWindow "MyWindow"`;
// Create a Text Box Control in the window.
$controlId = `createTextBox $windowId`;
// Set the focus to our Text Box
// Get the focus. $focusId and $controlId should now match
$focusId = `getFocus`;
if( $focusId == $controlId )