Jump to content
Sign in to follow this  


Recommended Posts


hey guys... i was just doing some homework and were "reviewing" metric units and stuff.. so heres "Conversions"... it has inches to feet, feet to inches, ounces to pounds, and pounds to ounces... im NOT finished yet... i am still going to add more, and probably a calculator in the same gui..

#include <GUIConstants.au3>
GUICreate ("Conversions")
GUISetState (@SW_SHOW)
$b= GUICtrlCreateButton ("Convert", 5, 30)
$l= GUICtrlCreateLabel ("Feet to inches:", 1, 1)
$i= GUICtrlCreateInput ("Feet here", 55, 33)
$b2= GUICtrlCreateButton ("Convert", 5, 100,)
$l2= GUICtrlCreateLabel ("Inches to feet:", 1, 75) 
$i2= GUICtrlCreateInput ("Inches here", 54, 103)
$b3= GUICtrlCreateButton ("Convert", 5, 170)
$l3= GUICtrlCreateLabel ("Ounces to pounds:", 1, 145)
$i3= GUICtrlCreateInput ("Ounces here", 53, 173)
$b4= GUICtrlCreateButton ("Convert", 5, 233)
$l4= GUICtrlCreateLabel ("Pounds to ounces:", 1, 210)
$i4= GUICtrlCreateInput ("Pounds to ounces", 53, 235)
While 1
   $get= GUIGetMsg ()
   $tmpread2= GUIRead ($i2)
   $tmpread= GUIRead ($i)
   Case $get= $GUI_EVENT_CLOSE
   Case $get= $b
      $tmpread= GUIRead ($i)
      $fee2in= Number ($tmpread*12)
      MsgBox (0, "Result", $fee2in & " Inches")
   Case $get= $b2
      If $tmpread2= 12 Then
         MsgBox (0, "Result", "1 Foot")
         $in2fee= Number ($tmpread2/12)
      MsgBox (0, "Result", $in2fee & " Feet")
Case $get= $b3
   $tmpread= GUIRead ($i3)
   If $tmpread= 16 Then
      MsgBox (0, "Result", "1 Pound")
   $tmpread= GUIRead ($i3)
   $oz2lb= Number ($tmpread/16)
   MsgBox (0, "Result", $oz2lb & " Pounds")
Case $get= $b4
   $tmpread= GUIRead (14)
   $lb2oz= Number ($tmpread*16)
   MsgBox (0, "Result", $lb2oz & " Ounces")

enjoy :idiot:


Share this post

Link to post
Share on other sites

thank you guidosoft =) o_0 =P


Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.