FireLord Posted November 18, 2007 Share Posted November 18, 2007 (edited) If you find any bugs, feel free to fix them. ;#################### ; Written by FireLord ;#################### ; If you find any mistakes, feel free to fix them. #include <GUIConstants.au3> GUICreate("Temp Conversion", 350, 140) GUISetState() $flabel = GUICtrlCreateLabeL("Enter Fahrenheit", 15, 18, 80) GUICtrlSetColor(-1,0xff0000) ; Red $ftemp = GUICtrlCreateInput("", 15, 40, 50, 20); Enters Fahrenheit $fbutton = GUICtrlCreateButton("Calculate", 105, 13); Calculates temperature $clabel = GUICtrlCreateLabeL("Enter Celsius", 180, 18, 80) GUICtrlSetColor(-1,0x0000ff) ; Blue $ctemp = GUICtrlCreateInput("", 180, 40, 50, 20); Enters Celsius $cbutton = GUICtrlCreateButton("Calculate", 270, 13); Calculates temperature While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_Event_Close Exit 0 Case $msg = $fbutton $celsius = (GUICtrlRead($ftemp) - 32)/1.8 GUICtrlCreateLabel($celsius & " degrees celsius equals " & GUICtrlRead($ftemp) & " fahrenheit", 15, 60, 70, 150) Case $msg = $cbutton $fahrenheit = (GUICtrlRead($ctemp) * (212 -32)/100 + 32) GUICtrlCreateLabel($fahrenheit & " degrees fahrenheit equals " & GUICtrlRead($ctemp) & " celsius", 180, 60, 70, 150) EndSelect WEndConvTemp.au3 Edited November 18, 2007 by FireLord [center]See the Helpfile[/center] While Alive() DrinkWine(); }[center][/center] Link to comment Share on other sites More sharing options...
Nahuel Posted November 18, 2007 Share Posted November 18, 2007 Cool You could add Kelvins too. Link to comment Share on other sites More sharing options...
FireLord Posted November 19, 2007 Author Share Posted November 19, 2007 Cool You could add Kelvins too.Good idea. [center]See the Helpfile[/center] While Alive() DrinkWine(); }[center][/center] Link to comment Share on other sites More sharing options...
FireLord Posted November 19, 2007 Author Share Posted November 19, 2007 Ok, changed this one up a bit, supports Kelvin now and doesn't have multiple inputs anymore. If you find any bugs, feel free to fix them.ConvTemp.au3 [center]See the Helpfile[/center] While Alive() DrinkWine(); }[center][/center] Link to comment Share on other sites More sharing options...
DirtDBaK Posted November 19, 2007 Share Posted November 19, 2007 I once made something like this for the TI-84.... nice work though! [center][/center] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now