Jump to content

Help(Please)


Recommended Posts

#include <GUIConstants.au3>
; F= (C*1.8)+32
;(5/9)*(deg F-32)
;Tf = (9/5)*Tc+32)
;(5/9)*(Tf-32)
GUICreate("Convertor", 330, 125)
GUICtrlCreateLabel("Simply input a temperature in Celsius/Fahrenheit and hit the",0, 0)  
GUICtrlCreateLabel("Convert button and you will see the temperature in Celsius/Fahrenheit", 0, 15)
$Cel = GUICtrlCreateInput("Celsius", 30, 30, 57, 20, $ES_NUMBER)
GUICtrlCreateLabel("Celsius>>>>><<<<<Fahrenheit", 100, 35)
$Con1 = GUICtrlCreateButton("Convert", 30, 51.5, 57)
$Far = GUICtrlCreateInput("Fahrenheit", 30, 77, 57, 20, $ES_NUMBER) 
GUICtrlCreateLabel("Fahrenheit>>>>><<<<<Celsius", 100, 82)
$Con2 = GUICtrlCreateButton("Convert", 30, 98, 57)
GUISetState(@SW_SHOW)

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
    $msg = GUIGetMsg()
    Select
    Case $msg = $Con1
        MsgBox(4096, "", "In Fahrenheit Equals: " & GUICtrlRead($Cel)*1.8+32)
        
    Case $msg = $Con2
    MsgBox(4096, "", "In Celsius Equals: " & GUICtrlRead($Far)-32/1.8;RIGHT HERE
        
 EndSelect
WEnd

I need help PLEASE :o:geek:;) . I am so tired and I can't figure out how to get the second formula to to get the right answer.

Thank you in advance.

So tired zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz. :sorcerer:

P.S coverts Celsius to fahrenheit and vice versa.

Edited by Infinitex0

The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]

Link to comment
Share on other sites

  • Moderators

#include <GUIConstants.au3>
GUICreate("Convertor", 330, 125)
GUICtrlCreateLabel("Simply input a temperature in Celsius/Fahrenheit and hit the",0, 0)  
GUICtrlCreateLabel("Convert button and you will see the temperature in Celsius/Fahrenheit", 0, 15)
$Cel = GUICtrlCreateInput("Celsius", 30, 30, 57, 20, $ES_NUMBER)
GUICtrlCreateLabel("Celsius>>>>><<<<<Fahrenheit", 100, 35)
$Con1 = GUICtrlCreateButton("Convert", 30, 51.5, 57)
$Far = GUICtrlCreateInput("Fahrenheit", 30, 77, 57, 20, $ES_NUMBER)
GUICtrlCreateLabel("Fahrenheit>>>>><<<<<Celsius", 100, 82)
$Con2 = GUICtrlCreateButton("Convert", 30, 98, 57)
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $Con1
            MsgBox(4096, "", "In Fahrenheit Equals: " & (GUICtrlRead($Cel) * 1.8) + 32)
        Case $msg = $Con2
            MsgBox(4096, "", "In Celsius Equals: " & Round((GUICtrlRead($Far)-32) / 1.80, 2));RIGHT HERE
    EndSelect
WEnd

Edit:

Put a parenthesis in the wrong spot.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

THANK YOU SmOke_N I was so(still am) tired that I couldn't stand(not an exageration) THANK YOU. :o:geek:;)

The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...