Guest User

Untitled

a guest
Feb 11th, 2019
155
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=
  7. $form1 = GUICreate("Tarifsuchmaschine", 506, 125, 2608, 362)
  8. $name = GUICtrlCreateInput("Bitte Land eingeben...", 8, 40, 201, 21)
  9. $button1 = GUICtrlCreateButton("Such!", 8, 64, 201, 33)
  10. $label1 = GUICtrlCreateLabel("Bitte Land eingeben", 8, 16, 204, 17)
  11. $label2 = GUICtrlCreateLabel("", 232, 32, 164, 89)
  12. $Pic1 = GUICtrlCreatePic("", 416, 32, 73, 57)
  13. $us = GUICtrlCreateLabel("Deine Suche: ", 232, 8, 164, 17)
  14.  
  15. GUISetState(@SW_SHOW)
  16. #EndRegion ### END Koda GUI section ###
  17. $var1="0"
  18. $Internet="0"
  19. $aufbau="0"
  20. $an="0"
  21. $ab="0"
  22. $inet="0"
  23. $sms = "0"
  24. $zahl = "0"
  25. $land= "0"
  26.  
  27. While 1
  28.     $nMsg = GUIGetMsg()
  29.     Switch $nMsg
  30.         Case $GUI_EVENT_CLOSE
  31.             Exit
  32.    
  33.  Case $button1
  34.      _lauf()
  35.      _bilder()
  36.      
  37.    EndSwitch
  38.    
  39.    
  40. WEnd
  41. Func _lauf()
  42.  
  43.    _abkurz()
  44.    If $zahl = "0" Then  
  45.       $zahl = IniRead("list.ini", "liste", GUICtrlRead($name),"false")
  46.       $land = GuiCtrlRead($name)
  47.      
  48.       _suchen()
  49.       _suchen2()
  50.          If IniRead("list.ini", "internet", GUICtrlRead($name),"false") = "False" Then
  51.             consolewrite(" Failed!")
  52.             _ausgabe2()
  53.          Elseif 1 then  
  54.             _ausgabe()
  55.          Endif
  56.    Else
  57.       _suchen3()
  58.       _suchen4()
  59.          If IniRead("list.ini", "liste", $zahl,"false") = "False" Then
  60.             consolewrite(" Failed!")
  61.             _ausgabe2()
  62.          Elseif 1 then  
  63.             _ausgabe()
  64.          Endif
  65.    EndIf
  66. EndFunc
  67.  
  68. Func _suchen()
  69.    $aufbau = IniRead("list.ini","tarif"&$zahl,"aufbau","fehlt")
  70.    $an = IniRead("list.ini","tarif"&$zahl,"an","fehlt")
  71.    $ab = IniRead("list.ini","tarif"&$zahl,"ab","fehlt")
  72.    $sms = IniRead("list.ini","tarif"&$zahl,"sms","fehlt")
  73.    consolewrite("suchen1 tarif"&$zahl&" ")
  74. EndFunc
  75.      
  76. Func _suchen2()
  77.    $zahl = IniRead("list.ini", "internet", GUICtrlRead($name),"false")
  78.    $inet = IniRead("list.ini","inettar"&$zahl,"kosten","fehlt")
  79.    
  80.    consolewrite("suchen2 inettar"&$zahl&" ")
  81. endfunc  
  82.  
  83. Func _suchen3()
  84.    $tar2 = IniRead("list.ini","liste",$zahl,"fehlt")
  85.    $aufbau = IniRead("list.ini","tarif"&$tar2,"aufbau","fehlt")
  86.    $an = IniRead("list.ini","tarif"&$tar2,"an","fehlt")
  87.    $ab = IniRead("list.ini","tarif"&$tar2,"ab","fehlt")
  88.    $sms = IniRead("list.ini","tarif"&$tar2,"sms","fehlt")
  89.    consolewrite("suchen3 tarif"&$tar2&" ")
  90. EndFunc
  91.  
  92. Func _suchen4()
  93.    
  94.     $tar = IniRead("list.ini","internet",$zahl,"fehlt")
  95.     $land = $zahl
  96.     $inet = IniRead("list.ini","inettar"&$tar,"kosten","fehlt")
  97.     consolewrite("suchen4 inettar"&$tar&" ")
  98.    
  99. endfunc
  100.  
  101. func _bilder()
  102.    GUICtrlSetImage($pic1,"")
  103.    GUICtrlSetImage($pic1,"C:\Länderbilder\"&$land&".gif")
  104. EndFunc
  105.  
  106. Func _abkurz()
  107.    If IniRead("list.ini", "abkurz", GUICtrlRead($name),"false") <> "false" Then
  108.       $zahl = iniRead("list.ini","abkurz", GUICtrlRead($name),"false")
  109.    Else
  110.       $zahl = "0"
  111.    Endif
  112. EndFunc
  113.  
  114. Func _ausgabe()
  115.     GuiCtrlSetData($label2,"Fixkosten:" & @TAB &$aufbau & "€" & @CRLF & "Ankommend:" &@TAB& $an & "€ / Minute" & @CRLF & "Abgehend:" &@TAB& $ab& "€ / Minute"  & @CRLF& "SMS:" & @TAB &@TAB& $sms & "€"& @CRLF & "Daten:"&@TAB&@TAB& $inet & "€ /50kb")
  116.     GuiCtrlSetData($us,"Deine Suche: "&$land)
  117.    
  118.    Consolewrite(" Deine Suche:"&$land)
  119. endfunc
  120. Func _ausgabe2()
  121.    GuiCtrlSetData($label2,"Land nicht gefunden!"& @CRLF & "Bitte Eingabe überprüfen")
  122. EndFunc
Add Comment
Please, Sign In to add comment