0 Replies Latest reply on Apr 21, 2010 6:14 PM by kkm19

    taskbar icon double click systemtray (javascript)

    kkm19 Level 1

      how can I set for double click on taskbar icons?

       

      <html> 
      <head> 
      <script src="resource/AIRAliases.js" language="JavaScript" type="text/javascript"></script> 
      <script language="JavaScript" type="text/javascript"> 
          var iconLoadComplete = function(event) 
          { 
              air.NativeApplication.nativeApplication.icon.bitmaps = [event.target.content.bitmapData]; 
          } 
           
          air.NativeApplication.nativeApplication.autoExit = false; 
          var iconLoad = new air.Loader(); 
          var iconMenu = new air.NativeMenu(); 
          var exitCommand = iconMenu.addItem(new air.NativeMenuItem("Exit")); 
          exitCommand.addEventListener(air.Event.SELECT,function(event){ 
                  air.NativeApplication.nativeApplication.icon.bitmaps = []; 
                  air.NativeApplication.nativeApplication.exit(); 
          }); 
       
          if (air.NativeApplication.supportsSystemTrayIcon) { 
              air.NativeApplication.nativeApplication.autoExit = false; 
              iconLoad.contentLoaderInfo.addEventListener(air.Event.COMPLETE,iconLoadComplete); 
              iconLoad.load(new air.URLRequest("assets/16.png")); 
              air.NativeApplication.nativeApplication.icon.tooltip = "AIR application"; 
              air.NativeApplication.nativeApplication.icon.menu = iconMenu; 
          } 
       
          if (air.NativeApplication.supportsDockIcon) { 
              iconLoad.contentLoaderInfo.addEventListener(air.Event.COMPLETE,iconLoadComplete); 
              iconLoad.load(new air.URLRequest("assets/128.png")); 
              air.NativeApplication.nativeApplication.icon.menu = iconMenu; 
          } 
       
      </script> 
      </head> 
      <body> 
      </body> 
      </html>