win_size

Version 2

     

    Custom Function

     

    Compatibility
    Creator
    Mac OS X, Windows
    Heather McCue
    FMP 9, 10, 11
    Harmonic Data Associates
    Web: No
    File Type: None
    Server: Yes
    FileSize: 0 kilobytes
    http://www.harmonic-data.com

    Description

    Captures all current window settings for reference and use by scripts

     


    Code

    //win_size( trigger)

    // Sets all current window variables

     

    Case( trigger = 1;

     

    Let([

     

    $$Top = Get ( WindowTop ) ;

    $$Left = Get ( WindowLeft ) ;

    $$Height = Get ( WindowHeight ) ;

    $$Width = Get ( WindowWidth ) ;

    $$DesktopHeight = Get ( WindowDesktopHeight ) ;

    $$DesktopWidth = Get ( WindowDesktopWidth ) ;

    $$ContentHeight = Get ( WindowContentHeight ) ;

    $$ContentWidth = Get ( WindowContentWidth ) ];

     

     

    "$$Top = " & $$Top & "¶" &

    "$$Left = " & $$Left & "¶" &

    "$$Height = " & $$Height & "¶" &

    "$$Width = " & $$Width & "¶" &

    "$$DesktopHeight = " & $$DesktopHeight & "¶" &

    "$$DesktopWidth = " & $$DesktopWidth & "¶" &

    "$$ContentHeight = " & $$ContentHeight & "¶" &

    "$$ContentWidth = " & $$ContentWidth

     

    ) ;

     

    trigger = 0;

     

    Let([

     

    $$Top = "" ;

    $$Left = "" ;

    $$Height = "" ;

    $$Width = "" ;

    $$DesktopHeight = "" ;

    $$DesktopWidth = "" ;

    $$ContentHeight = "" ;

    $$ContentWidth = "" ];

     

     

    "$$Top = " & $$Top & "¶" &

    "$$Left = " & $$Left & "¶" &

    "$$Height = " & $$Height & "¶" &

    "$$Width = " & $$Width & "¶" &

    "$$DesktopHeight = " & $$DesktopHeight & "¶" &

    "$$DesktopWidth = " & $$DesktopWidth & "¶" &

    "$$ContentHeight = " & $$ContentHeight & "¶" &

    "$$ContentWidth = " & $$ContentWidth

     

    ) ;

     

    trigger = "name";

     

    Let([

     

    $$WinTitle = Get ( WindowName ) ] ;

     

    "$$WinTitle = " & $$WinTitle

     

    ) ;

     

    trigger = "clear_name";

     

    Let([

     

    $$WinTitle = "" ] ;

     

    "$$WinTitle = " & $$WinTitle

     

    )

     

    )

     

    Sample Input

    Sample Output
    win_size(1)

    Variation #1:

    win_size( 1 ) …

     

    $$Top = 0

    $$Left = 1

    $$Height = 1056

    $$Width = 1279

    $$DesktopHeight = 1578

    $$DesktopWidth = 2560

    $$ContentHeight = 936

    $$ContentWidth = 1264

     

    ***

    Variation #2:

    win_size( 0 ) …

     

    $$Top =

    $$Left =

    $$Height =

    $$Width =

    $$DesktopHeight =

    $$DesktopWidth =

    $$ContentHeight =

    $$ContentWidth =

     

    ***

    Variation #3:

    win_size( ”name” ) …

     

    $$WinTitle = Submit Resource to FMI

     

    ***

    Variation #4:

    win_size( ”clear_name” ) …

     

    $$WinTitle =

     


    Developer's Notes

    This custom function includes four variations. One each to set the current size settings and window title, and one each to clear size settings and title. This is used to establish starting/return values for scripts that take advantage of multiple, off-screen windows for processing.

     


    FileMaker Inc. provides this content on an “As Is” basis, without any warranty, and subject to the terms of the FileMaker Technical Network Agreement. FileMaker makes no representations and is not liable for any content or related information. You may use the content as part of your own solutions and for your customers, but you may not otherwise publicly distribute any content that you did not submit. ©2009-2011 FileMaker, Inc. All Rights Reserved. FileMaker is a trademark of FileMaker, Inc. registered in the U.S. and other countries.