Convert Temp MsgBox(0, "Convert Temp", ConvertTemp(80, "C", "F")) ; ==> 176
MsgBox(0, "Convert Temp", ConvertTemp(212, "K", "Ra", 2)) ; ==> 381.6
MsgBox(0, "Convert Temp", ConvertTemp(22.7, "N", "Re", 4)) ; ==> 55.0303
Func ConvertTemp($D, $F = "C", $T = "F", $R = 2)
$D = ($F = "K") ? (($D - 273.15)) : (($F = "F") ? (($D - 32) / 1.8) : (($F = "Ra") ? (($D + 5 / 9) - 273.15) : (($F = "Re") ? (($D * 1.25)) _
: (($F = "De") ? ((100 - $D) * 2 / 3) : (($F = "N") ? (($D * 100 / 33)) : (($F = "Ro") ? (($D - 7.5) * 40 / 21) : $D))))))
return round(($T = "C") ? $D : (($T = "K") ? (($D + 273.15)) : (($T = "F") ? (($D * 1.8) + 32) : (($T = "Ra") ? (($D + 273.15) * 1.8) : (($T = "Re") ? (($D * 0.8)) _
: (($T = "De") ? ((100 - $D) * 1.5) : (($T = "N") ? (($D * 1 / 3)) : (($T = "Ro") ? (($D * 0.525) + 7.5) : "" ))))))), $R)
EndFunc ;==> ConvertTemp() AutoIt v3.3.12.0 ConvertTemp(Temperature in Degrees, From, To, Round by)
Celsius --> C
Kelvin --> K
Fahrenheit --> F
Rankine --> Ra
Réaumur --> Re
Delisle --> De
Newton --> N
Rømer --> Ro