When we click on the system tray icon, I just want to “main window normal/minimize function” according to the window status.
The code I came across has an error because it loops and “else if” is not gets as a valid command in side the function. Is there any other way? That I can proceed.
Code:
Application.SysTray.onLClicked = function ()
{
var wnd = getMainWnd();
trace(wnd.windowState);
if (wnd.windowState == "minimized");
wnd.windowState = 'normal';
wnd.bringToTop();
//Else if (wnd.windowState == "normal")
//wnd.windowState = 'minimized';
//wnd.hide();
}