Jeahaha

Untitled

Feb 18th, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.93 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, 141, 192, 124)
  8. $CAtome = GUICtrlCreateInput("CAtome", 0, 0, 121, 21)
  9. $HAtome = GUICtrlCreateInput("HAtome", 0, 24, 121, 21)
  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("Molekülkette Anzeigen", 0, 112, 123, 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 )
  39.         Case $Button4
  40.             If GUICtrlRead($CAtome) = "1" Then SplashImageOn( "Methan","C:\Users\Timo2\Desktop\Neuer Ordner\alkane\1methan.jpg","-1","-1","-1","-1",3)
  41.     EndSwitch
  42. WEnd
Advertisement
Add Comment
Please, Sign In to add comment