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)
<-