Jeahaha

Untitled

Feb 19th, 2012
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 3.38 KB | None | 0 0
  1. #include <ButtonConstants.au3>
  2. #include <EditConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <StaticConstants.au3>
  5. #include <WindowsConstants.au3>
  6. #Region ### START Koda GUI section ### Form=c:\users\timo2\desktop\neuer ordner\alkane 1.kxf
  7. $Form1_1 = GUICreate("Alkane", 337, 132, 401, 138)
  8. $CAtome = GUICtrlCreateInput("CAtome", 0, 0, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
  9. $HAtome = GUICtrlCreateInput("HAtome", 0, 24, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
  10. $Ausgabe = GUICtrlCreateInput("Ausgabe", 0, 80, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
  11. $formelaus = GUICtrlCreateGroup("Formel aus:", 136, 0, 89, 73)
  12. $Button1 = GUICtrlCreateButton("C-Atome", 144, 16, 75, 25, $WS_GROUP)
  13. $Button2 = GUICtrlCreateButton("H-Atome", 144, 40, 75, 25, $WS_GROUP)
  14. GUICtrlCreateGroup("", -99, -99, 1, 1)
  15. $Button3 = GUICtrlCreateButton("Formel Popup", 128, 80, 99, 25, $WS_GROUP)
  16. $Pic1 = GUICtrlCreatePic("C:\Users\Timo2\Desktop\Neuer Ordner\Methane-2D-square.jpg", 232, 8, 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
  17. $Button4 = GUICtrlCreateButton("Struktur und Name", 8, 104, 99, 25, $WS_GROUP)
  18. GUISetState(@SW_SHOW)
  19. #EndRegion ### END Koda GUI section ###
  20.  
  21. While 1
  22.     $nMsg = GUIGetMsg()
  23.     Switch $nMsg
  24.         Case $GUI_EVENT_CLOSE
  25.             Exit
  26.         Case $Button1
  27.             $ausg1 = GUICtrlRead( $CAtome )
  28.             GUICtrlSetData( $Ausgabe , "C" & $ausg1 & "H" & $ausg1 *2 +2 )
  29.             GUICtrlSetData( $HAtome , $ausg1 *2 +2 )
  30.         Case $Button2
  31.             $ausg2 = GUICtrlRead( $HAtome )
  32.             GUICtrlSetData( $Ausgabe , "C" & ($ausg2 -2) /2  & "H" & $ausg2 )
  33.             GUICtrlSetData( $CAtome , ($ausg2 -2) /2 )
  34.         Case $Button3
  35.             $ausg3 = GUICtrlRead( $CAtome )
  36.             $ausg4 = GUICtrlRead( $HAtome )
  37.             $ausg5 = GUICtrlRead( $Ausgabe )
  38.             MsgBox( 0 , "popup" , "C Atome:       " & $ausg3 & @CRLF & "H Atome:       " & $ausg4 & @CRLF & "Formel:          " & $ausg5 & @CRLF & "Atome:           " & $ausg3 + $ausg4 & @CRLF & "Atommasse:  " & ($ausg3 *12.011) + ($ausg4 *1.008))
  39.         Case $Button4
  40.             If GUICtrlRead( $CAtome ) = 1 Then MsgBox(0,"Methan","   H" & @CRLF & "HCH" & @CRLF & "   H" & @CRLF & "Flammpunkt: /" & @CRLF & "Schmelzpunkt: 90,65K" & @CRLF & "Siedepunkt: 111,4K" & @CRLF & "Gasförmig")
  41.             If GUICtrlRead( $CAtome ) = 2 Then MsgBox(0,"Ethan","   HH" & @CRLF & "HCCH" & @CRLF & "   HH" & @CRLF & "Flammpunkt: /" & @CRLF & "Schmelzpunkt: 90K" & @CRLF & "Siedepunkt: 185 K" & @CRLF & "Gasförmig")
  42.             If GUICtrlRead( $CAtome ) = 3 Then MsgBox(0,"Propan","   HHH" & @CRLF & "HCCCH" & @CRLF & "   HHH" & @CRLF & "Flammpunkt: /" & @CRLF & "Schmelzpunkt: 85K" & @CRLF & "Siedepunkt: 231K" & @CRLF & "Gasförmig")
  43.             If GUICtrlRead( $CAtome ) = 4 Then MsgBox(0,"Butan","   HHHH" & @CRLF & "HCCCCH" & @CRLF & "   HHHH" & @CRLF & "Flammpunkt: /" & @CRLF & "Schmelzpunkt: 135K" & @CRLF & "Siedepunkt: 272,5K" & @CRLF & "Gasförmig")
  44.             If GUICtrlRead( $CAtome ) = 5 Then MsgBox(0,"hallo","")
  45.             If GUICtrlRead( $CAtome ) = 6 Then MsgBox(0,"hallo","")
  46.             If GUICtrlRead( $CAtome ) = 7 Then MsgBox(0,"hallo","")
  47.             If GUICtrlRead( $CAtome ) = 8 Then MsgBox(0,"hallo","")
  48.             If GUICtrlRead( $CAtome ) = 9 Then MsgBox(0,"hallo","")
  49.             If GUICtrlRead( $CAtome ) = 10 Then MsgBox(0,"hallo","")
  50.             If GUICtrlRead( $CAtome ) = 11 Then MsgBox(0,"hallo","")
  51.             If GUICtrlRead( $CAtome ) = 12 Then MsgBox(0,"hallo","")
  52.             If Int(GUICtrlRead($CAtome)) > 12 then MsgBox(16,"Fehler","Zu hohe Zahl , Für Nutzung eine Zahl von 1-12 Wählen")
  53.     EndSwitch
  54. WEnd
Advertisement
Add Comment
Please, Sign In to add comment