Forum Discussion

NisHera's avatar
NisHera
Valued Contributor
9 years ago

testing on two monitors

Is there anyway to specify which monitor to open up application?

When you have more than one monitor

thanks

1 Reply

  • maximojo's avatar
    maximojo
    Frequent Contributor

    I know you can access monitor information in script (jscript below) through the "dotNET" object. Perhaps you can use that information to position your application. Just an idea.

     

    Perhaps there is more info in this object as well:

    dotNET.System_Windows_Forms.Screen

     

     

    function DisplayCheck()
    {
      var screens, scr, i;
      screens = dotNET.System_Windows_Forms.Screen.AllScreens;
      for (i = 0; i < screens.Length; i++)
      {
        scr = screens.Get(i).Bounds;
        Log.Message("Monitor " + (i + 1) + ": " + scr.Width + "x" + scr.Height);
        Log.Message("Bit depth: " + dotNET.System_Windows_Forms.Screen.AllScreens.Get(0).bitDepth);
      } 
    }