Screen Data Dell

Post Reply
User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Screen Data Dell

Post by rbytes »

I have found some discrepancies in the results of screen commands on my two Windows devices. Therefore I created a program to summarize my results for myself and Mr. K. This program reads the screen variables such as size and dpi. But it requires the user to name the device and enter certain specs and measurements. The following program is customized for my laptop. The screenshot of results is posted below.

Code: Select all

''
Screen Data Dell by rbytes
September 2017
''

' assign suitable name to file
f="Dell Screen Data.txt"
#.filepos(f,0)

' assign name of your device
d = "Dell Inspiron N5110" + #.lf
send <-> 

' assign specified screen size horizontal and vertical
sw = "13 9/16 inches"
sh = "7 5/8 inches"
d = "Width measured: " + sw + #.lf+"Height measured: " + sh + #.lf
send <->

d = "Width from specs: 1366 pixels" + #.lf+"Height from specs: 768 pixels" + #.lf
send <->

' read screen size with dip (device independent points)
#.point(#.dip)
sw, sh = #.scrsize()
d = "With control menu on and dip mode:" + #.lf
d += "Width from #.scrsize(): " + sw + #.lf+"Height from #.scrsize(): " + sh
send <->

' read dots per inch
d = "Dots per inch from #.scrdpi(): " + #.scrdpi() + #.lf
send <->

' read screen size with pix (individual pixels)
#.point(#.pix)
sw, sh = #.scrsize()
d = "With control menu on and pix mode:" + #.lf
d += "Width from #.scrsize(): " + sw + #.lf+"Height from #.scrsize(): " + sh
send <->

' read dots per inch
d = "Dots per inch from #.scrdpi(): " + #.scrdpi() + #.lf
send <->

#.scrview(#.normal) ' hide control menu

' read screen size
sw, sh = #.scrsize()
d = "With control menu off:" + #.lf
d += "Width from #.scrsize(): " + sw + #.lf+"Height from #.scrsize(): " + sh
send <->

#.delay(2)
#.end()

' print to screen and save line(s) to file
:send
#.output(d)
#.writeline(f,d)
<-

Attachments
Capture[137].PNG
Capture[137].PNG (32.1 KiB) Viewed 3292 times
The only thing that gets me down is gravity...

Post Reply