#include #include #include #include #include #include Opt('MustDeclareVars', 1) Global $out, $pi = 3.14159265358979, $s=0 global $Main_GUI, $Child_GUI, $p=0, $font="arial" global $vstup,$x,$msg,$vyst,$gombik,$output global $button2,$results,$i,$xMin,$yMax global $yMin,$xMax,$GraphWidth, $GraphHeight global $graph,$y,$u,$c,$j,$vstup2,$m,$z $Main_GUI=GuiCreate("Čislicové spracovanie signálov", 800, 600) GuiCtrlCreateTab(1, 1, 300, 20) GuiCtrlCreateTabItem("One") GuiCtrlCreateLabel("Sample Tab with tabItems ", 40, 40) GuiCtrlCreateLabel("X ^ ", 210, 255) $vstup=GuiCtrlCreateInput("", 235, 255, 130, 20) GuiCtrlCreateLabel("= Y", 400, 255) $gombik=GuiCtrlCreateButton("RUN", 10, 330, 100, 30) $output = GUICtrlCreateLabel("", 185, 45, 100, 50, BitOR($BS_PUSHLIKE, $SS_CENTER)) GUICtrlSetFont($output, 24, 800, "", "Comic Sans MS") GuiCtrlCreateTabItem("Two") GuiCtrlCreateLabel("dejka", 250, 40) GuiCtrlCreateTabItem("Three") $button2 = GUICtrlCreateButton("D3", 65, 25, 50, 30) $vstup2=GuiCtrlCreateInput("", 235, 255, 130, 20) GuiSetState(@SW_SHOW, $Main_GUI) While 1 $msg = GUIGetMsg(1) Select Case $msg[0] = $gombik $j=GUICtrlRead($vstup) $results = $j $p=$p+1 dim $iiiL[31]=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30] $Child_GUI=GUICreate($iiiL[$p],500,400,1,1) GUICtrlCreateLabel("tu bude graf< $GUI_EVENT_CLOSE WEnd func Gen_Abs_Pix_x($x,$low,$high,$width) $out = (($width/($high-$low))*(($high-$low)*(($x-$low)/($high-$low)))) Return $out EndFunc func Gen_Abs_Pix_y($y,$low,$high,$height) $out = ($height - (($height/($high-$low))*(($high-$low)*(($y-$low)/($high-$low))))) Return $out EndFunc