Reply to post:

'Daddy, what's a Blu-ray disc?'

Prst. V.Jeltz Silver badge

if anyone is having trouble wondering what shape screen you are supposed to have for the bewildering array of resolutions your computer will output these days , then this script I wrote will reduce any res given to its lowest whole number ration - ie 4:9 or 16:9 etc . It also proves Wade is correct.

-----------------------------------------------------------------

w=wscript.arguments(0)

h=wscript.arguments(1)

n=2

pass=1

do until n=>h OR n=>w

if h/n=clng(h/n) AND w/n=clng(w/n) then

h=h/n

w=w/n

else

'wscript.echo " dont divide"

n=n+1

end if

pass=pass+1

'wscript.echo "Pass " & pass & ", n= " & n &" Height="&h&" Width="&w

loop

wscript.echo

wscript.echo "---------------------------------------"

wscript.echo "Answer is Width="&w &", Height=" & h & " (" & w & "x" & h &")"

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019