<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Users Windows Screen Resolution/Scale in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Users-Windows-Screen-Resolution-Scale/m-p/772915#M95357</link>
    <description>&lt;P&gt;You can use Run Program() to run command line or powershell and most likely get the information that way.&lt;/P&gt;</description>
    <pubDate>Sun, 14 Jul 2024 15:34:12 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-07-14T15:34:12Z</dc:date>
    <item>
      <title>Users Windows Screen Resolution/Scale</title>
      <link>https://community.jmp.com/t5/Discussions/Users-Windows-Screen-Resolution-Scale/m-p/772878#M95349</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In regard to making scripts with jsl&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is there a way to get the user's screen resolution and scale(i.e., windows scale in system display settings)?&lt;BR /&gt;&lt;BR /&gt;The problem is when some has their scale set to 150% vs 100%, the graphs and images will also change. Making it hard to read or they will completely miss a graph because they need to scroll to see it.&lt;BR /&gt;&lt;BR /&gt;If I knew the answer to the first question, I'd be able to hard code the size of everything. I've tried using auto sizing features and they seem to be more of a pain than just setting the size manually.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2024 01:25:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Users-Windows-Screen-Resolution-Scale/m-p/772878#M95349</guid>
      <dc:creator>aharro</dc:creator>
      <dc:date>2024-07-14T01:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Users Windows Screen Resolution/Scale</title>
      <link>https://community.jmp.com/t5/Discussions/Users-Windows-Screen-Resolution-Scale/m-p/772915#M95357</link>
      <description>&lt;P&gt;You can use Run Program() to run command line or powershell and most likely get the information that way.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2024 15:34:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Users-Windows-Screen-Resolution-Scale/m-p/772915#M95357</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-14T15:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Users Windows Screen Resolution/Scale</title>
      <link>https://community.jmp.com/t5/Discussions/Users-Windows-Screen-Resolution-Scale/m-p/772939#M95365</link>
      <description>&lt;P&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;command = "Get-ItemProperty -path \!\\!"HKCU:\Control Panel\Desktop\PerMonitorSettings\*\!\\!" | fl DpiValue";

RP = Run Program(
	Executable( "powershell.exe"),
	Options( {"/c ", command} ),
	ReadFunction( "text" )
);

show(RP);&lt;/CODE&gt;&lt;/PRE&gt;This returns DPI value which if display scaling is at 150% it will equal 0, at 175% it will be 1 and so on.&lt;/DIV&gt;</description>
      <pubDate>Mon, 15 Jul 2024 03:13:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Users-Windows-Screen-Resolution-Scale/m-p/772939#M95365</guid>
      <dc:creator>aharro</dc:creator>
      <dc:date>2024-07-15T03:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Users Windows Screen Resolution/Scale</title>
      <link>https://community.jmp.com/t5/Discussions/Users-Windows-Screen-Resolution-Scale/m-p/809505#M99010</link>
      <description>&lt;P&gt;There's an easier way to resize all your graphs/windows/boxes, etc... dynamically per individual user that runs your scripts&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1. Create a new window and maximize it&lt;BR /&gt;2. Grab the width of the window and it will return the pixels. (If the tangible width is 1920 and scaling is set to 150% then in theory, it should return 1280 pixels)&lt;BR /&gt;3. Have a function that sizes all of your boxes.. etc.. (I'd scale 2/3 if their width is &amp;lt; 1600)&lt;BR /&gt;4. Anytime you set the size of any graph/box/etc call set_width function&lt;BR /&gt;&lt;BR /&gt;Hope this helps someone in the future&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;temp_window = New Window( "Width Check",
	H List Box(
		Text Box( "A" ),
		sb1 = Spacer Box(),
		Text Box( "B" ),
		sb2 = Spacer Box( size( 20, 10 ), color( "red" ) ),
		Text Box( "C" )
	)
);&lt;BR /&gt;
temp_window &amp;lt;&amp;lt; Maximize Window( 1 );
USER_WIDTH = temp_window &amp;lt;&amp;lt; Get Width();
temp_window &amp;lt;&amp;lt; Close Window;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;set_width = Function({w},
	{},
	new_w = w;
	if(USER_WIDTH &amp;lt; 1600,
		new_w = w * (2/3);
	);
	Return(new_w);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Nov 2024 23:48:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Users-Windows-Screen-Resolution-Scale/m-p/809505#M99010</guid>
      <dc:creator>aharro</dc:creator>
      <dc:date>2024-11-02T23:48:15Z</dc:date>
    </item>
  </channel>
</rss>

