cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Have your say in shaping JMP's future by participating in the new JMP Wish List Prioritization Survey
Choose Language Hide Translation Bar
aharro
Level I

Users Windows Screen Resolution/Scale

Hello,

 

In regard to making scripts with jsl


Is there a way to get the user's screen resolution and scale(i.e., windows scale in system display settings)?

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.

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.

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Users Windows Screen Resolution/Scale

You can use Run Program() to run command line or powershell and most likely get the information that way.

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Users Windows Screen Resolution/Scale

You can use Run Program() to run command line or powershell and most likely get the information that way.

-Jarmo
aharro
Level I

Re: Users Windows Screen Resolution/Scale

Thanks!

command = "Get-ItemProperty -path \!\\!"HKCU:\Control Panel\Desktop\PerMonitorSettings\*\!\\!" | fl DpiValue";

RP = Run Program(
	Executable( "powershell.exe"),
	Options( {"/c ", command} ),
	ReadFunction( "text" )
);

show(RP);
This returns DPI value which if display scaling is at 150% it will equal 0, at 175% it will be 1 and so on.