Function FocusChangedEvent (handle FocusWindow, handle PrevWindow)
AutoMaximize()
EndFunction
the Function AutoMaximize goes in the default script file so it may be called from other applications as well.
void Function AutoMaximize ()
var string StatusSymbol
SaveCursor ()
FindGraphic (GetAppMainWindow (GetCurrentWindow ()), "maximize symbol", s_top, s_unrestricted)
let StatusSymbol=GetWord()
If StatusSymbol == "Maximize Symbol" Then
LeftMouseButton ()
EndIf
RestoreCursor ()
Pause()
EndFunction