Hallo,
wahrscheinlich eie simple Frage: Mein Script meint, dass ich $Button1 etc. nicht deklariert hab, obwohl es so ist.
Naja hier das Script, hoffentlich könnt ihr mir helfen.
Spoiler anzeigen
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=images\icon.ico
#AutoIt3Wrapper_outfile=Widerstandsberechner.exe
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseAnsi=y
#AutoIt3Wrapper_Res_LegalCopyright=xxx
#AutoIt3Wrapper_Res_Language=1031
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <GDIPlus.au3>
#include <EditConstants.au3>
#include <ComboConstants.au3>
#Include <Constants.au3>
Opt("TrayMenuMode",1)
Global $aLabel[10] = ['Schwarz','Braun','Rot','Orange','Gelb','Grün','Blau','Violett','Grau','Weiß']
Global $bLabel[8] = ['Keine', 'Silber', 'Gold','Braun','Rot','Grün','Blau','Violett']
Global $cLabel[9] = ['Braun','Rot','Orange','Gelb','Grün','Blau','Violett','Grau','Weiß']
Global $dLabel[12] = ['Silber', 'Gold', 'Schwarz','Braun','Rot','Orange','Gelb','Grün','Blau','Violett','Grau','Weiß']
Global $eLabel[9] = ['1', '2', '3', '4', '5', '6', '7', '8', '9']
Global $fLabel [10] = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
Global $gLabel [12] = ['0,01', '0,1', '1', '10', '100', '1000', '10000', '100000', '1000000', '10000000', '100000000', '1000000000']
Global $hLabel [8] = ['20', '10', '5', '1', '2', '0,5', '0,25', '0,1']
;------------------------------------------------------------------------------------------------------------
TraySetIcon(@Scriptdir & "\Images\icon.ico")
TrayTip("Copyright (c) 2009","...",2,1)
_intro()
_gui()
;------------------------------------------------------------------------------------------------------------
Func _gui()
#Region ### START Koda GUI section ### Form=c:\users\rouven\desktop\form1.kxf
$Form1 = GUICreate("Widerstandberechner", 700, 304, -1, -1,-1)
GUISetBkColor(0xFDFDFD)
$Ringanzahl = GUICtrlCreateLabel("Ringanzahl:", 446, 48, 89, 23)
GUICtrlSetFont(-1, 13, 400, 0, "Arial")
GUICtrlCreateCombo("", 544, 45, 49, 5, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL,$WS_VSCROLL))
GUICtrlSetFont(-1, 10, 400, 0, "arial")
GUICtrlSetData(-1, " 4| 5", " 4")
$Input6 = GUICtrlCreateInput("", 40, 120, 97, 21, $ES_READONLY)
$Blind_Input3 = GUICtrlCreateInput("",153,120,1,21)
$Updown1 = GUICtrlCreateUpdown($Blind_Input3)
GUICtrlSetLimit(-1, 8, 0)
GUICtrlSetData($Input6, $cLabel[0])
$Input7 = GUICtrlCreateInput("", 170, 120, 97, 21, $ES_READONLY)
$Blind_Input4 = GUICtrlCreateInput("",283, 120, 1, 21)
$Updown2 = GUICtrlCreateUpdown($Blind_Input4)
GUICtrlSetLimit(-1, 9, 0)
GUICtrlSetData($Input7, $aLabel[0])
$Input8 = GUICtrlCreateInput("", 300, 120, 97, 21, $ES_READONLY)
$Blind_Input5 = GUICtrlCreateInput("", 413, 120, 1, 21)
$Updown3 = GUICtrlCreateUpdown($Blind_Input5)
GUICtrlSetLimit(-1, 9, 0)
GUICtrlSetData($Input8, $aLabel[0])
$Input9 = GUICtrlCreateInput("", 430, 120, 97, 21, $ES_READONLY)
$Blind_Input6 = GUICtrlCreateInput("", 543, 120, 1, 21)
$Updown4 = GUICtrlCreateUpdown($Blind_Input6)
GUICtrlSetLimit(-1, 11, 0)
GUICtrlSetData($Input9, $dLabel[0])
$Input10 = GUICtrlCreateInput("", 560, 120, 97, 21, $ES_READONLY)
$Blind_Input7 = GUICtrlCreateInput("", 673, 120, 1, 21)
$Updown5 = GUICtrlCreateUpdown($Blind_Input7)
GUICtrlSetLimit(-1, 7, 0)
GUICtrlSetData($Input10, $bLabel[0])
$Label1 = GUICtrlCreateLabel("Toleranz", 573, 96, 66, 23)
GUICtrlSetFont(-1, 13, 400, 0, "Arial")
$Label2 = GUICtrlCreateLabel("2. Ziffer", 183, 96, 61, 23)
GUICtrlSetFont(-1, 13, 400, 0, "Arial")
$Label3 = GUICtrlCreateLabel("3. Ziffer", 313, 96, 61, 23)
GUICtrlSetFont(-1, 13, 400, 0, "Arial")
$Label4 = GUICtrlCreateLabel("Multiplikator", 443, 96, 89, 23)
GUICtrlSetFont(-1, 13, 400, 0, "Arial")
$Ziffer = GUICtrlCreateLabel("1. Ziffer", 53, 96, 61, 23)
GUICtrlSetFont(-1, 13, 400, 0, "Arial")
$Label5 = GUICtrlCreateLabel("Widerstandsberechner", 80, 24, 280, 36)
GUICtrlSetFont(-1, 20, 400, 0, "Arial")
$Input1 = GUICtrlCreateInput("0,01", 443, 168, 81, 21, $ES_READONLY)
GUICtrlSetLimit(-1, 11, 0)
$Input2 = GUICtrlCreateInput("0", 313, 168, 81, 21, $ES_READONLY)
GUICtrlSetLimit(-1, 9, 0)
$Input3 = GUICtrlCreateInput("0", 183, 168, 81, 21, $ES_READONLY)
GUICtrlSetLimit(-1, 9, 0)
$Input4 = GUICtrlCreateInput("20", 573, 168, 81, 21, $ES_READONLY)
GUICtrlSetLimit(-1, 7, 0)
$Input5 = GUICtrlCreateInput("1", 53, 168, 81, 21, $ES_READONLY)
GUICtrlSetLimit(-1, 12, 0)
$Button1 = GUICtrlCreateButton("Schließen", 570, 265, 121, 30, 0)
$Button2 = GUICtrlCreateButton("Copyright", 8, 272, 89, 25, 0)
$Button3 = GUICtrlCreateButton("Rechnung (mit Toleranz)", 360, 224, 129, 41, 0)
$Button4 = GUICtrlCreateButton("Rechnung (ohne Toleranz)", 200, 224, 137, 41, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
EndFunc
$aboutitem = TrayCreateItem("Credits")
TrayCreateItem("")
$exititem = TrayCreateItem("Exit")
TraySetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Exit
Case $Button2
_credits()
Case $Updown1
GUICtrlSetData($Input6, $cLabel[GUICtrlRead($Blind_Input3)])
GUICtrlSetData($Input5,$eLabel[GUICtrlRead($Blind_Input3)])
Case $Updown2
GUICtrlSetData($Input7, $aLabel[GUICtrlRead($Blind_Input4)])
GUICtrlSetData($Input3,$fLabel[GUICtrlRead($Blind_Input4)])
Case $Updown3
GUICtrlSetData($Input8, $aLabel[GUICtrlRead($Blind_Input5)])
GUICtrlSetData($Input2,$fLabel[GUICtrlRead($Blind_Input5)])
Case $Updown4
GUICtrlSetData($Input9, $dLabel[GUICtrlRead($Blind_Input6)])
GUICtrlSetData($Input1,$gLabel[GUICtrlRead($Blind_Input6)])
Case $Updown5
GUICtrlSetData($Input10, $bLabel[GUICtrlRead($Blind_Input7)])
GUICtrlSetData($Input4,$hLabel[GUICtrlRead($Blind_Input7)])
EndSwitch
$msg = TrayGetMsg()
Select
Case $msg = 0
ContinueLoop
Case $msg = $aboutitem
Msgbox(64, "Credits", "Copyright (c)")
Case $msg = $exititem
ExitLoop
EndSelect
WEnd
;------------------------------------------------------------------------------------------------------------
Func _intro ()
#Region ### START Koda GUI section ### Form=
$intro = GUICreate("Spotlight", 465, 303, -1, -1)
GUICtrlCreatePic(@Scriptdir & "\Images\logo.jpg",-1,-1,465,303)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Sleep(2500)
GUIDelete()
EndFunc
MfG