2 Replies Latest reply on Oct 30, 2012 7:19 AM by hjgunn@mmedia.is

    How to - Calculate number of, size of and position of additional monitors

    hjgunn@mmedia.is

      I would like to control on which monitor on a multimonitor setup windows are opened.

      And I would like this to work on both Win and Mac platforms

       

      So I suspect I need to figure out the following:

       

      The number of available monitors

      The location of available monitors

      The size of available monitors

       

      Is this possible in Filemaker or do I need to use a plugin or things like AppleScript and VisualBasic?

       

      TIA

      Hans

        • 1. Re: How to - Calculate number of, size of and position of additional monitors
          s

          Hi Hans,

           

          Sorry can't help with the Windows solution, but on OS X you can use Perform AppleScript with do shell script to solve two of the three:

           

          set cell "all_sysprofiler_data" of current record to do shell script "system_profiler SPDisplaysDataType"

           

          To get the number of monitors:

          system_profiler SPDisplaysDataType | grep "Online: Yes" | wc -l

          I wish I could take credit for that. I found it here:

          http://hintsforums.macworld.com/showthread.php?p=695603

           

          I don't know how to get the positions, but you can get the screen resolutions by parsing the result of the first command (sorry I don't know the best way to parse the result):

           

          system_profiler SPDisplaysDataType

           

          Graphics/Displays:

           

              AMD Radeon HD 6750M:

           

                Chipset Model: AMD Radeon HD 6750M

                Type: GPU

                Bus: PCIe

                PCIe Lane Width: x8

                VRAM (Total): 512 MB

                Vendor: ATI (0x1002)

                Device ID: 0x6741

                Revision ID: 0x0000

                ROM Revision: 113-C0170L-573

                gMux Version: 1.9.23

                EFI Driver Version: 01.00.573

                Displays:

                  Color LCD:

                    Display Type: LCD

                    Resolution: 1680 x 1050

                    Pixel Depth: 32-Bit Color (ARGB8888)

                    Mirror: Off

                    Online: Yes

                    Built-In: Yes

                  Acer G215H:

                    Resolution: 1920 x 1080 @ 60 Hz

                    Pixel Depth: 32-Bit Color (ARGB8888)

                    Display Serial Number: LN3080044222

                    Main Display: Yes

                    Mirror: Off

                    Online: Yes

                    Rotation: Supported

           

           

           

          hjgunn@mmedia.is wrote:

           

          I would like to control on which monitor on a multimonitor setup windows are opened.

          And I would like this to work on both Win and Mac platforms

           

          So I suspect I need to figure out the following:

           

          The number of available monitors

          The location of available monitors

          The size of available monitors

           

          Is this possible in Filemaker or do I need to use a plugin or things like AppleScript and VisualBasic?

           

          TIA

          Hans

          1 of 1 people found this helpful
          • 2. Re: How to - Calculate number of, size of and position of additional monitors
            hjgunn@mmedia.is

            Thank you for your reply.

             

            I was hoping I could at least use a plugin so that the solution would work crossplatform.

             

            But this does at least help on the Mac side.

             

            Kind regards

            Hans