#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Compile_Both=y
#AutoIt3Wrapper_UseX64=y
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_Run_Tidy=y
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs
	;*** Siebdruck-Multitool V 1.10 ******** 9. 1. 2012 ****
	;Alexander Knapp, Bremserstraße 104, 67063 Ludwigshafen
	;Kontakt: alex@factor118.de
	;*** HISTORY ******************************************
	V1.0:	Dotsize-Calculation, Frequency-Calculation, Process-Values-Calculation, visible Output approx. Tonal Range 1-50%
	V1.10:	Frequency-Values corrected to 0.1 instead of 0.01-Steps
	Flickering Labels almost fixed (Sleep-Value set)
	Size of Main window changed to width 800px
	Layout fixed, Histogramm-Values corrected, "Button-Style"-GUI edited, Dotzsize-Update just with corresponding Controls
	
	;******************************************************
#ce

#include <GUIConstants.au3>
#include <StaticConstants.au3>
#include <EditConstants.au3>
#include <SliderConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <AVIConstants.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <Constants.au3>
#include <DateTimeConstants.au3>
#include <ListboxConstants.au3>
#include <ListviewConstants.au3>
#include <ProgressConstants.au3>
#include <TabConstants.au3>
#include <TreeviewConstants.au3>
#include <UpdownConstants.au3>
#include <Math.au3>
#include <String.au3>
#include <GuiSlider.au3>

Opt("MustDeclareVars", 1)

; Globale Variablen und Konstanten

Const $inch = 2.54
Const $rp_const = 1.1284
Const $calc_ym = 10000

; Wurzelwerte vorbelegt
Global $s1 = Sqrt(1), $s2 = Sqrt(2), $s3 = Sqrt(3), $s4 = Sqrt(4), $s5 = Sqrt(5), $s6 = Sqrt(6), $s7 = Sqrt(7), $s8 = Sqrt(8), $s9 = Sqrt(9)
Global $s10 = Sqrt(10), $s11 = Sqrt(11), $s12 = Sqrt(12), $s13 = Sqrt(13), $s14 = Sqrt(14), $s15 = Sqrt(15), $s16 = Sqrt(16), $s17 = Sqrt(17), $s18 = Sqrt(18), $s19 = Sqrt(19)
Global $s20 = Sqrt(20), $s21 = Sqrt(21), $s22 = Sqrt(22), $s23 = Sqrt(23), $s24 = Sqrt(24), $s25 = Sqrt(25), $s26 = Sqrt(26), $s27 = Sqrt(27), $s28 = Sqrt(28), $s29 = Sqrt(29)
Global $s30 = Sqrt(30), $s31 = Sqrt(31), $s32 = Sqrt(32), $s33 = Sqrt(33), $s34 = Sqrt(34), $s35 = Sqrt(35), $s36 = Sqrt(36), $s37 = Sqrt(37), $s38 = Sqrt(38), $s39 = Sqrt(39)
Global $s40 = Sqrt(40), $s41 = Sqrt(41), $s42 = Sqrt(42), $s43 = Sqrt(43), $s44 = Sqrt(44), $s45 = Sqrt(45), $s46 = Sqrt(46), $s47 = Sqrt(47), $s48 = Sqrt(48), $s49 = Sqrt(49)
Global $s50 = Sqrt(50), $s51 = Sqrt(51), $s52 = Sqrt(52), $s53 = Sqrt(53), $s54 = Sqrt(54), $s55 = Sqrt(55), $s56 = Sqrt(56), $s57 = Sqrt(57), $s58 = Sqrt(58), $s59 = Sqrt(59)
Global $s60 = Sqrt(60), $s61 = Sqrt(61), $s62 = Sqrt(62), $s63 = Sqrt(63), $s64 = Sqrt(64), $s65 = Sqrt(65), $s66 = Sqrt(66), $s67 = Sqrt(67), $s68 = Sqrt(68), $s69 = Sqrt(69)
Global $s70 = Sqrt(70), $s71 = Sqrt(71), $s72 = Sqrt(72), $s73 = Sqrt(73), $s74 = Sqrt(74), $s75 = Sqrt(75), $s76 = Sqrt(76), $s77 = Sqrt(77), $s78 = Sqrt(78), $s79 = Sqrt(79)
Global $s80 = Sqrt(80), $s81 = Sqrt(81), $s82 = Sqrt(82), $s83 = Sqrt(83), $s84 = Sqrt(84), $s85 = Sqrt(85), $s86 = Sqrt(86), $s87 = Sqrt(87), $s88 = Sqrt(88), $s89 = Sqrt(89)
Global $s90 = Sqrt(90), $s91 = Sqrt(91), $s92 = Sqrt(92), $s93 = Sqrt(93), $s94 = Sqrt(94), $s95 = Sqrt(95), $s96 = Sqrt(96), $s97 = Sqrt(97), $s98 = Sqrt(98), $s99 = Sqrt(99)

Global $p1, $p2, $p3, $p4, $p5, $p6, $p7, $p8, $p9, $p10, $p11, $p12, $p13, $p14, $p15, $p16, $p17, $p18, $p19, $p20, $p21, $p22, $p23, $p24, $p25, $p26, $p27, $p28, $p29
Global $p30, $p31, $p32, $p33, $p34, $p35, $p36, $p37, $p38, $p39, $p40, $p41, $p42, $p43, $p44, $p45, $p46, $p47, $p48, $p49, $p50, $p51, $p52, $p53, $p54, $p55, $p56, $p57, $p58, $p59
Global $p60, $p61, $p62, $p63, $p64, $p65, $p66, $p67, $p68, $p69, $p70, $p71, $p72, $p73, $p74, $p75, $p76, $p77, $p78, $p79, $p80, $p81, $p82, $p83, $p84, $p85, $p86, $p87, $p88, $p89
Global $p90, $p91, $p92, $p93, $p94, $p95, $p96, $p97, $p98, $p99

Global $g1, $g2, $g3, $g4, $g5, $g6, $g7, $g8, $g9, $g10, $g11, $g12, $g13, $g14, $g15, $g16, $g17, $g18, $g19, $g20, $g21, $g22, $g23, $g24, $g25, $g26, $g27, $g28, $g29
Global $g30, $g31, $g32, $g33, $g34, $g35, $g36, $g37, $g38, $g39, $g40, $g41, $g42, $g43, $g44, $g45, $g46, $g47, $g48, $g49, $g50, $g51, $g52, $g53, $g54, $g55, $g56, $g57, $g58, $g59
Global $g60, $g61, $g62, $g63, $g64, $g65, $g66, $g67, $g68, $g69, $g70, $g71, $g72, $g73, $g74, $g75, $g76, $g77, $g78, $g79, $g80, $g81, $g82, $g83, $g84, $g85, $g86, $g87, $g88, $g89
Global $g90, $g91, $g92, $g93, $g94, $g95, $g96, $g97, $g98, $g99

Global $pcolor, $p1color, $p2color, $p3color, $p4color, $p5color, $p6color, $p7color, $p8color, $p9color, $p10color, $p11color, $p12color, $p13color, $p14color, $p15color, $p16color, $p17color, $p18color, $p19color
Global $p20color, $p21color, $p22color, $p23color, $p24color, $p25color, $p26color, $p27color, $p28color, $p29color, $p30color, $p31color, $p32color, $p33color, $p34color, $p35color, $p36color, $p37color, $p38color, $p39color
Global $p40color, $p41color, $p42color, $p43color, $p44color, $p45color, $p46color, $p47color, $p48color, $p49color, $p50color, $p51color, $p52color, $p53color, $p54color, $p55color, $p56color, $p57color, $p58color, $p59color
Global $p60color, $p61color, $p62color, $p63color, $p64color, $p65color, $p66color, $p67color, $p68color, $p69color, $p70color, $p71color, $p72color, $p73color, $p74color, $p75color, $p76color, $p77color, $p78color, $p79color
Global $p80color, $p81color, $p82color, $p83color, $p84color, $p85color, $p86color, $p87color, $p88color, $p89color, $p90color, $p91color, $p92color, $p93color, $p94color, $p95color, $p96color, $p97color, $p98color, $p99color

Global $green = 0x00ff00, $red = 0xff0000, $white = 0xffffff, $grey = 0xc0c0c0, $yellow = 0xf3f781, $blue = 0x81f7f3
Global $skfont = "Arial"

Global $fs_Slider, $hfs_Slider, $fs_input, $fs_wert, $fs, $fs_Limit ; Variablen für Fadenstärke
Global $mw_Slider, $hmw_Slider, $mw_input, $mw_wert, $mw, $mw_Limit ; Variablen für Maschenweite
Global $out_Slider, $hout_Slider, $out_input, $out_wert, $out_wert_round, $out_wert_round2, $out, $out_Limit ; Variablen für Ausgabeauflösung
Global $freq_Slider, $hfreq_Slider, $freq_input, $freq_wert, $freq, $freq_Limit, $freq_dpi, $freq_lpcm, $freq_Label, $freq_wert_lpcm ; Variablen für Rasterfrequenz

; allgemeine Variablen
Global $y, $mp_Label, $mp, $ym = " µm", $px_DMD, $px_LAS, $pixel, $rip_k_zelle, $k_Rasterzelle, $px_Rasterzelle, $rip_px_zelle, $tw_darstell, $tw, $th_auf, $ta, $ta_round


; Startwerte der Eingabefelder
Global $fs = 31, $mw = 32, $out = 1500, $freq = 75

Global $twb1, $twb2, $twb3, $twb4, $twb5, $twb6, $twb7, $twb8, $twb9, $twb10
Global $twb11, $twb12, $twb13, $twb14, $twb15, $twb16, $twb17, $twb18, $twb19, $twb20
Global $twb21, $twb22, $twb23, $twb24, $twb25, $twb26, $twb27, $twb28, $twb29, $twb30
Global $twb31, $twb32, $twb33, $twb34, $twb35, $twb36, $twb37, $twb38, $twb39, $twb40
Global $twb41, $twb42, $twb43, $twb44, $twb45, $twb46, $twb47, $twb48, $twb49, $twb50
Global $twb51, $twb52, $twb53, $twb54, $twb55, $twb56, $twb57, $twb58, $twb59, $twb60
Global $twb61, $twb62, $twb63, $twb64, $twb65, $twb66, $twb67, $twb68, $twb69, $twb70
Global $twb71, $twb72, $twb73, $twb74, $twb75, $twb76, $twb77, $twb78, $twb79, $twb70
Global $twb81, $twb82, $twb83, $twb84, $twb85, $twb86, $twb87, $twb88, $twb89, $twb80
Global $twb91, $twb92, $twb93, $twb94, $twb95, $twb96, $twb97, $twb98, $twb99

; Hauptfenster
GUICreate("SDMultitool by Alexander Knapp - Version 1.10 - 01.2012 // für Gewebe 90-40 bis 190-31", 800, 270)
GUICtrlSetDefBkColor($white)
GUISetBkColor($white)
GUICtrlCreatePic("sdmlogo.jpg", 8, 1, 100, 52)
; FileInstall("sdmlogo.jpg", @TempDir)
;Systeminformationen
GUICtrlCreateLabel("aktuelle IP: " & @IPAddress1, 539, 10)
GUICtrlSetFont(-1, 8, 700, 0, $skfont)

; Bedienelementebeschriftung Spalte 1
GUICtrlCreateButton(" Gewebewerte eingeben:", 15, 49, 246, 22)
GUICtrlSetFont(-1, 9, 700, 4, $skfont)
GUICtrlSetBkColor(-1, $yellow)
GUICtrlCreateLabel(" Fadenstärke:", 15, 70, 85, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $yellow)
GUICtrlCreateLabel("µm ", 225, 70, 36, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $yellow)
GUICtrlCreateLabel(" Maschenweite:", 15, 90, 85, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $yellow)
GUICtrlCreateLabel("µm ", 225, 90, 36, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $yellow)
; Bedienelementebeschriftung Spalte 2
GUICtrlCreateButton(" Ausgabewerte eingeben:", 277, 49, 246, 22)
GUICtrlSetFont(-1, 9, 700, 4, $skfont)
GUICtrlSetBkColor(-1, $blue)
GUICtrlCreateLabel(" Ausgabeaufl.:", 277, 70, 90, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $blue)
GUICtrlCreateLabel("dpi", 492, 70, 31, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $blue)
GUICtrlCreateLabel(" Rasterfreq.:", 277, 90, 90, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
GUICtrlCreateLabel("lpi", 492, 90, 31, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
; Bedienelementebeschriftung Spalte 3
GUICtrlCreateButton(" Prozessparameter:", 539, 49, 246, 22)
GUICtrlSetFont(-1, 9, 700, 4, $skfont)
GUICtrlSetBkColor(-1, $grey)
$px_DMD = GUICtrlCreateLabel(" Pixelgröße DMD: ", 539, 70, 246, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $blue)
$px_LAS = GUICtrlCreateLabel(" Pixelgröße Laser: " & $px_LAS, 539, 90, 246, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $blue)
$k_Rasterzelle = GUICtrlCreateLabel(" Kante RIP-Rasterzelle: ", 539, 110, 246, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$px_Rasterzelle = GUICtrlCreateLabel(" Pixel RIP-Rasterzelle: ", 539, 130, 246, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$tw_darstell = GUICtrlCreateButton(" darstellbare Tonwerte: ", 277, 129, 246, 22, $SS_SUNKEN)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $blue)
$th_auf = GUICtrlCreateButton(" th. Auflösevermögen: ", 15, 129, 246, 22, $SS_SUNKEN)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $yellow)


;Wert für Fadenstärke - Slider, direkte Eingabe oder Cursortasten möglich
$fs_Slider = GUICtrlCreateSlider(125, 70, 100, 20, BitOR($TBS_NOTICKS, $TBS_TOOLTIPS))
GUICtrlSetBkColor(-1, $yellow)
$hfs_Slider = GUICtrlGetHandle(-1)
$fs_Limit = GUICtrlSetLimit(-1, 40, 1) ; change min/max value
GUICtrlSetData($fs_Slider, $fs)
$fs_input = GUICtrlCreateLabel("" & $fs, 100, 70, 25, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $yellow)
;Slider für Maschenweite - Slider, direkte Eingabe oder Cursortasten möglich
$mw_Slider = GUICtrlCreateSlider(125, 90, 100, 20, BitOR($TBS_NOTICKS, $TBS_TOOLTIPS))
GUICtrlSetBkColor(-1, $yellow)
$hmw_Slider = GUICtrlGetHandle(-1)
$mw_Limit = GUICtrlSetLimit(-1, 100, 1) ; change min/max value
GUICtrlSetData($mw_Slider, $mw)
$mw_input = GUICtrlCreateLabel("" & $mw, 100, 90, 25, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $yellow)
;Anzeige der Mindestpunktgröße
$mp_Label = GUICtrlCreateButton(" Mindestpunktgröße: ", 15, 109, 246, 22)
GUICtrlSetBkColor(-1, $yellow)
GUICtrlSetFont(-1, 9, 700, 0, $skfont)

;Wert für Ausgabeauflösung - Slider, direkte Eingabe, Mausrad oder Cursortasten möglich
$out_Slider = GUICtrlCreateSlider(392, 70, 100, 20, BitOR($TBS_NOTICKS, $TBS_TOOLTIPS))
GUICtrlSetBkColor(-1, $blue)
$hout_Slider = GUICtrlGetHandle(-1)
$out_Limit = GUICtrlSetLimit(-1, 2400, 1) ; change min/max value
GUICtrlSetData($out_Slider, $out)
$out_input = GUICtrlCreateLabel("" & $out, 357, 70, 35, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $blue)
;Wert für Rasterweite - Slider, direkte Eingabe, Mausrad oder Cursortasten möglich
$freq_Slider = GUICtrlCreateSlider(392, 90, 100, 20, $TBS_NOTICKS)
GUICtrlSetBkColor(-1, $grey)
$hfreq_Slider = GUICtrlGetHandle(-1)
$freq_Limit = GUICtrlSetLimit(-1, 3000, 10) ; change min/max value
GUICtrlSetData($freq_Slider, $freq * 10)
$freq_input = GUICtrlCreateLabel("" & $freq, 357, 90, 35, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 8.5, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
;Anzeige der Umrechnung LPI zu LPCM
$freq_Label = GUICtrlCreateButton(" Rasterfrequenz in lpcm: " & $freq_wert_lpcm, 277, 109, 246, 22)
GUICtrlSetBkColor(-1, $grey)
GUICtrlSetFont(-1, 9, 700, 0, $skfont)

;SKALA
; LAYOUTKONTROLLE
; Koordinaten der Skala
Global $skx = 110 ; X-Position - Beginn der gesamten Skala
Global $sky = 170 ; Y-Position - Beginn der gesamten Skala

Global $z_abs = 11 ; Zeilenabstand
Global $sky_abs = 50 ; Abstand der Skalenreihen
Global $hb = 8 ; Höhe des Buttons
Global $by = $sky - $hb + ($y * 2) ; absolute Position des Buttons über der Anzeige
Global $x = 27 ; Breite der Einzelanzeige (incl. Buttons, Label) - ebenso Abstand in X der Anzeigeelemente
Global $y = 11 ; Höhe der Anzeigeelemente (Label) - Tonwert/Histogramm und Flächendeckung
Global $yp = $y + 3 ; Höhe der Punktgrößenzeile


Global $sky1_1 = $sky, $sky1_2 = $sky1_1 + $z_abs, $sky1_3 = $sky1_2 + $z_abs; Zeilenposition vertikal - 1. Skalenreihe
Global $sky2_1 = $sky1_1 + $sky_abs, $sky2_2 = $sky1_2 + $sky_abs, $sky2_3 = $sky1_3 + $sky_abs ; Zeilenposition vertikal  - 2. Skalenreihe
Global $sky3_1 = $sky2_1 + $sky_abs, $sky3_2 = $sky2_2 + $sky_abs, $sky3_3 = $sky2_3 + $sky_abs ; Zeilenposition vertikal  - 3. Skalenreihe
Global $sky4_1 = $sky3_1 + $sky_abs, $sky4_2 = $sky3_2 + $sky_abs, $sky4_3 = $sky3_3 + $sky_abs ; Zeilenposition vertikal  - 4. Skalenreihe
Global $by1 = $by, $by2 = $by + $sky_abs, $by3 = $by2 + $sky_abs, $by4 = $by3 + $sky_abs ; Buttonpositionen relativ
Global $sp1 = $skx, $sp2 = $sp1 + $x, $sp3 = $sp2 + $x, $sp4 = $sp3 + $x, $sp5 = $sp4 + $x, $sp6 = $sp5 + $x, $sp7 = $sp6 + $x, $sp8 = $sp7 + $x, $sp9 = $sp8 + $x, $sp10 = $sp9 + $x
Global $sp11 = $sp10 + $x, $sp12 = $sp11 + $x, $sp13 = $sp12 + $x, $sp14 = $sp13 + $x, $sp15 = $sp14 + $x, $sp16 = $sp15 + $x, $sp17 = $sp16 + $x, $sp18 = $sp17 + $x, $sp19 = $sp18 + $x, $sp20 = $sp19 + $x
Global $sp21 = $sp20 + $x, $sp22 = $sp21 + $x, $sp23 = $sp22 + $x, $sp24 = $sp23 + $x, $sp25 = $sp24 + $x



;Spalte 1 / Zeile 1 -- Beschriftung
GUICtrlCreateLabel("Tonwert/Histogramm: ", 15, $sky1_1, 100, $y, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("Flächendeckung in %: ", 15, $sky1_2, 100, $y, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("Punktgröße in µm: ", 15, $sky1_3, 100, $yp, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
;Spalte 1 / Zeile 2 -- Beschriftung
GUICtrlCreateLabel("Tonwert/Histogramm: ", 15, $sky2_1, 1000, $y, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("Flächendeckung in %: ", 15, $sky2_2, 100, $y, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("Punktgröße in µm: ", 15, $sky2_3, 100, $y, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
;Spalte 1 / Zeile 3 -- Beschriftung
;GUICtrlCreateLabel("Tonwert/Histogramm: ",15,$sky3_1,90,$y,$SS_CENTERIMAGE)
;GUICtrlSetFont(-1, 7, 400, 0, $skfont)
;GUICtrlCreateLabel("Flächendeckung in %: ", 15,$sky3_2,100,$y,$SS_CENTERIMAGE)
;GUICtrlSetFont(-1, 7, 400, 0, $skfont)
;GUICtrlCreateLabel("Punktgröße in µm: ", 15,$sky3_3,90,$y,$SS_CENTERIMAGE)
;GUICtrlSetFont(-1, 7, 400, 0, $skfont)
;Spalte 1 / Zeile 3 -- Beschriftung
;GUICtrlCreateLabel("Tonwert/Histogramm: ",15,$sky4_1,90,$y,$SS_CENTERIMAGE)
;GUICtrlSetFont(-1, 7, 400, 0, $skfont)
;GUICtrlCreateLabel("Flächendeckung in %: ", 15,$sky4_2,100,$y,$SS_CENTERIMAGE)
;GUICtrlSetFont(-1, 7, 400, 0, $skfont)
;GUICtrlCreateLabel("Punktgröße in µm: ", 15,$sky4_3,90,$y,$SS_CENTERIMAGE)
;GUICtrlSetFont(-1, 7, 400, 0, $skfont)

; SKALA - Zeile 1
;Tonwertumfang anzeigen 1%
GUICtrlCreateLabel("252", $sp1, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("1", $sp1, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb1 = GUICtrlCreateButton("", $sp1, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 6, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g1 = GUICtrlCreateButton("", $sp1, $by1, $x, $hb)
$p1color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 2%
GUICtrlCreateLabel("250", $sp2, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("2", $sp2, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb2 = GUICtrlCreateButton("", $sp2, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g2 = GUICtrlCreateButton("", $sp2, $by1, $x, $hb)
$p2color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 3%
GUICtrlCreateLabel("247", $sp3, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("3", $sp3, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb3 = GUICtrlCreateButton("", $sp3, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g3 = GUICtrlCreateButton("", $sp3, $by1, $x, $hb)
$p3color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 4%
GUICtrlCreateLabel("245", $sp4, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("4", $sp4, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb4 = GUICtrlCreateButton("", $sp4, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g4 = GUICtrlCreateButton("", $sp4, $by1, $x, $hb)
$p4color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 5%
GUICtrlCreateLabel("242", $sp5, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("5", $sp5, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb5 = GUICtrlCreateButton("", $sp5, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g5 = GUICtrlCreateButton("", $sp5, $by1, $x, $hb)
$p5color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 6%
GUICtrlCreateLabel("240", $sp6, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("6", $sp6, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb6 = GUICtrlCreateButton("", $sp6, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g6 = GUICtrlCreateButton("", $sp6, $by1, $x, $hb)
$p6color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 7%
GUICtrlCreateLabel("237", $sp7, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("7", $sp7, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb7 = GUICtrlCreateButton("", $sp7, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g7 = GUICtrlCreateButton("", $sp7, $by1, $x, $hb)
$p7color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 8%
GUICtrlCreateLabel("235", $sp8, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("8", $sp8, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb8 = GUICtrlCreateButton("", $sp8, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g8 = GUICtrlCreateButton("", $sp8, $by1, $x, $hb)
$p8color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 9%
GUICtrlCreateLabel("232", $sp9, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("9", $sp9, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb9 = GUICtrlCreateButton("", $sp9, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g9 = GUICtrlCreateButton("", $sp9, $by1, $x, $hb)
$p9color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 10%
GUICtrlCreateLabel("230", $sp10, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("10", $sp10, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb10 = GUICtrlCreateButton("", $sp10, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g10 = GUICtrlCreateButton("", $sp10, $by1, $x, $hb)
$p10color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 11%
GUICtrlCreateLabel("227", $sp11, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("11", $sp11, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb11 = GUICtrlCreateButton("", $sp11, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g11 = GUICtrlCreateButton("", $sp11, $by1, $x, $hb)
$p11color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 12%
GUICtrlCreateLabel("224", $sp12, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("12", $sp12, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb12 = GUICtrlCreateButton("", $sp12, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g12 = GUICtrlCreateButton("", $sp12, $by1, $x, $hb)
$p12color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 13%
GUICtrlCreateLabel("222", $sp13, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("13", $sp13, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb13 = GUICtrlCreateButton("", $sp13, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g13 = GUICtrlCreateButton("", $sp13, $by1, $x, $hb)
$p13color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 14%
GUICtrlCreateLabel("219", $sp14, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("14", $sp14, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb14 = GUICtrlCreateButton("", $sp14, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g14 = GUICtrlCreateButton("", $sp14, $by1, $x, $hb)
$p14color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 15%
GUICtrlCreateLabel("217", $sp15, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("15", $sp15, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb15 = GUICtrlCreateButton("", $sp15, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g15 = GUICtrlCreateButton("", $sp15, $by1, $x, $hb)
$p15color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 16%
GUICtrlCreateLabel("214", $sp16, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("16", $sp16, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb16 = GUICtrlCreateButton("", $sp16, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g16 = GUICtrlCreateButton("", $sp16, $by1, $x, $hb)
$p16color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 17%
GUICtrlCreateLabel("212", $sp17, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("17", $sp17, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb17 = GUICtrlCreateButton("", $sp17, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g17 = GUICtrlCreateButton("", $sp17, $by1, $x, $hb)
$p17color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 18%
GUICtrlCreateLabel("209", $sp18, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("18", $sp18, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb18 = GUICtrlCreateButton("", $sp18, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g18 = GUICtrlCreateButton("", $sp18, $by1, $x, $hb)
$p18color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 19%
GUICtrlCreateLabel("207", $sp19, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("19", $sp19, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb19 = GUICtrlCreateButton("", $sp19, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g19 = GUICtrlCreateButton("", $sp19, $by1, $x, $hb)
$p19color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 20%
GUICtrlCreateLabel("204", $sp20, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("20", $sp20, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb20 = GUICtrlCreateButton("", $sp20, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g20 = GUICtrlCreateButton("", $sp20, $by1, $x, $hb)
$p20color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 21%
GUICtrlCreateLabel("201", $sp21, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("21", $sp21, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb21 = GUICtrlCreateButton("", $sp21, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g21 = GUICtrlCreateButton("", $sp21, $by1, $x, $hb)
$p21color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 22%
GUICtrlCreateLabel("199", $sp22, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("22", $sp22, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb22 = GUICtrlCreateButton("", $sp22, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g22 = GUICtrlCreateButton("", $sp22, $by1, $x, $hb)
$p22color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 23%
GUICtrlCreateLabel("196", $sp23, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("23", $sp23, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb23 = GUICtrlCreateButton("", $sp23, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g23 = GUICtrlCreateButton("", $sp23, $by1, $x, $hb)
$p23color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 24%
GUICtrlCreateLabel("194", $sp24, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("24", $sp24, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb24 = GUICtrlCreateButton("", $sp24, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g24 = GUICtrlCreateButton("", $sp24, $by1, $x, $hb)
$p24color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 25%
GUICtrlCreateLabel("191", $sp25, $sky1_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("25", $sp25, $sky1_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb25 = GUICtrlCreateButton("", $sp25, $sky1_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g25 = GUICtrlCreateButton("", $sp25, $by1, $x, $hb)
$p25color = GUICtrlSetBkColor(-1, $white)

; SKALA - Zeile 2
;Tonwertumfang anzeigen 26%
GUICtrlCreateLabel("189", $sp1, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("26", $sp1, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb26 = GUICtrlCreateButton("", $sp1, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g26 = GUICtrlCreateButton("", $sp1, $by2, $x, $hb)
$p26color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 27%
GUICtrlCreateLabel("186", $sp2, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("27", $sp2, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb27 = GUICtrlCreateButton("", $sp2, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g27 = GUICtrlCreateButton("", $sp2, $by2, $x, $hb)
$p27color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 28%
GUICtrlCreateLabel("184", $sp3, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("28", $sp3, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb28 = GUICtrlCreateButton("", $sp3, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g28 = GUICtrlCreateButton("", $sp3, $by2, $x, $hb)
$p28color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 29%
GUICtrlCreateLabel("181", $sp4, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("29", $sp4, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb29 = GUICtrlCreateButton("", $sp4, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g29 = GUICtrlCreateButton("", $sp4, $by2, $x, $hb)
$p29color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 30%
GUICtrlCreateLabel("179", $sp5, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("30", $sp5, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb30 = GUICtrlCreateButton("", $sp5, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g30 = GUICtrlCreateButton("", $sp5, $by2, $x, $hb)
$p30color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 31%
GUICtrlCreateLabel("176", $sp6, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("31", $sp6, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb31 = GUICtrlCreateButton("", $sp6, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g31 = GUICtrlCreateButton("", $sp6, $by2, $x, $hb)
$p31color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 32%
GUICtrlCreateLabel("173", $sp7, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("32", $sp7, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb32 = GUICtrlCreateButton("", $sp7, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g32 = GUICtrlCreateButton("", $sp7, $by2, $x, $hb)
$p32color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 33%
GUICtrlCreateLabel("171", $sp8, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("33", $sp8, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb33 = GUICtrlCreateButton("", $sp8, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g33 = GUICtrlCreateButton("", $sp8, $by2, $x, $hb)
$p33color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 34%
GUICtrlCreateLabel("168", $sp9, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("34", $sp9, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb34 = GUICtrlCreateButton("", $sp9, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g34 = GUICtrlCreateButton("", $sp9, $by2, $x, $hb)
$p34color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 35%
GUICtrlCreateLabel("166", $sp10, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("35", $sp10, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb35 = GUICtrlCreateButton("", $sp10, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g35 = GUICtrlCreateButton("", $sp10, $by2, $x, $hb)
$p35color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 36%
GUICtrlCreateLabel("163", $sp11, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("36", $sp11, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb36 = GUICtrlCreateButton("", $sp11, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g36 = GUICtrlCreateButton("", $sp11, $by2, $x, $hb)
$p36color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 37%
GUICtrlCreateLabel("161", $sp12, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("37", $sp12, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb37 = GUICtrlCreateButton("", $sp12, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g37 = GUICtrlCreateButton("", $sp12, $by2, $x, $hb)
$p37color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 38%
GUICtrlCreateLabel("158", $sp13, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("38", $sp13, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb38 = GUICtrlCreateButton("", $sp13, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g38 = GUICtrlCreateButton("", $sp13, $by2, $x, $hb)
$p38color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 39%
GUICtrlCreateLabel("156", $sp14, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("39", $sp14, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb39 = GUICtrlCreateButton("", $sp14, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g39 = GUICtrlCreateButton("", $sp14, $by2, $x, $hb)
$p39color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 40%
GUICtrlCreateLabel("153", $sp15, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("40", $sp15, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb40 = GUICtrlCreateButton("", $sp15, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g40 = GUICtrlCreateButton("", $sp15, $by2, $x, $hb)
$p40color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 41%
GUICtrlCreateLabel("150", $sp16, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("41", $sp16, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb41 = GUICtrlCreateButton("", $sp16, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g41 = GUICtrlCreateButton("", $sp16, $by2, $x, $hb)
$p41color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 42%
GUICtrlCreateLabel("148", $sp17, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("42", $sp17, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb42 = GUICtrlCreateButton("", $sp17, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g42 = GUICtrlCreateButton("", $sp17, $by2, $x, $hb)
$p42color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 43%
GUICtrlCreateLabel("145", $sp18, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("43", $sp18, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb43 = GUICtrlCreateButton("", $sp18, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g43 = GUICtrlCreateButton("", $sp18, $by2, $x, $hb)
$p43color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 44%
GUICtrlCreateLabel("143", $sp19, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("44", $sp19, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb44 = GUICtrlCreateButton("", $sp19, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g44 = GUICtrlCreateButton("", $sp19, $by2, $x, $hb)
$p44color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 45%
GUICtrlCreateLabel("140", $sp20, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("45", $sp20, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb45 = GUICtrlCreateButton("", $sp20, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g45 = GUICtrlCreateButton("", $sp20, $by2, $x, $hb)
$p45color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 46%
GUICtrlCreateLabel("138", $sp21, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("46", $sp21, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb46 = GUICtrlCreateButton("", $sp21, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g46 = GUICtrlCreateButton("", $sp21, $by2, $x, $hb)
$p46color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 47%
GUICtrlCreateLabel("135", $sp22, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("47", $sp22, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb47 = GUICtrlCreateButton("", $sp22, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g47 = GUICtrlCreateButton("", $sp22, $by2, $x, $hb)
$p47color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 48%
GUICtrlCreateLabel("133", $sp23, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("48", $sp23, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb48 = GUICtrlCreateButton("", $sp23, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g48 = GUICtrlCreateButton("", $sp23, $by2, $x, $hb)
$p48color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 49%
GUICtrlCreateLabel("130", $sp24, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("49", $sp24, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb49 = GUICtrlCreateButton("", $sp24, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g49 = GUICtrlCreateButton("", $sp24, $by2, $x, $hb)
$p49color = GUICtrlSetBkColor(-1, $white)
;Tonwertumfang anzeigen 50%
GUICtrlCreateLabel("128", $sp25, $sky2_1, $x, $y, $SS_CENTER) ; Tonwert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlCreateLabel("50", $sp25, $sky2_2, $x, $y, $SS_CENTER) ; %-Wert
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
$twb50 = GUICtrlCreateButton("", $sp25, $sky2_3, $x, $yp, $SS_CENTER) ; Punktgröße
GUICtrlSetFont(-1, 7, 400, 0, $skfont)
GUICtrlSetBkColor(-1, $grey)
$g50 = GUICtrlCreateButton("", $sp25, $by2, $x, $hb)
$p50color = GUICtrlSetBkColor(-1, $white)

; GRAFISCHE AUSGABE - Diagramm 1
; Top 1 - Sollwertlinie für Mindestpunktgröße einzeichnen
;Global $gr_x = 15, $gr_y = 350, $gr_w = 670, $gr_h = 200
;GUICtrlCreateGraphic($gr_x,$gr_y,$gr_w,$gr_h)
;GUICtrlSetBKColor(-1, $grey)



;GUI: Anzeigen bei Start
GUISetState(@SW_SHOW)

GUIRegisterMsg($WM_HSCROLL, "WM_HSCROLL") ; Mausradfunktion für Slider


While True
	Sleep(50) ; Abstellmaßnahme für Flackern!

	;Prozessparameterberechnung
	$fs_wert = GUICtrlRead($fs_Slider)
	$mw_wert = GUICtrlRead($mw_Slider)
	$out_wert = GUICtrlRead($out_Slider)
	$out_wert_round = Round(($inch / $out_wert * $calc_ym), 2)
	$out_wert_round2 = Round(($s2 * $inch / $out_wert * $calc_ym), 2)
	$freq_wert = GUICtrlRead($freq_Slider) / 10
	$freq_wert_lpcm = Round(($freq_wert / $inch), 2)
	$rip_k_zelle = Round(($calc_ym / $freq_wert_lpcm), 2)
	$rip_px_zelle = Round(($out_wert / $freq_wert), 2)
	$tw = Round(($rip_px_zelle * $rip_px_zelle))
	$ta = ($s2 * ($fs_wert + $mw_wert) * ($fs_wert / $mw_wert))
	$ta_round = Round($ta)
	$mp = $fs_wert * 2 + $mw_wert

	; Rasterpunktgrößenberechnung 1-50% -- 51-99% folgt

	$p1 = Round((($rp_const * $s1 * 1000) / $freq_wert_lpcm))
	$p2 = Round((($rp_const * $s2 * 1000) / $freq_wert_lpcm))
	$p3 = Round((($rp_const * $s3 * 1000) / $freq_wert_lpcm))
	$p4 = Round((($rp_const * $s4 * 1000) / $freq_wert_lpcm))
	$p5 = Round((($rp_const * $s5 * 1000) / $freq_wert_lpcm))
	$p6 = Round((($rp_const * $s6 * 1000) / $freq_wert_lpcm))
	$p7 = Round((($rp_const * $s7 * 1000) / $freq_wert_lpcm))
	$p8 = Round((($rp_const * $s8 * 1000) / $freq_wert_lpcm))
	$p9 = Round((($rp_const * $s9 * 1000) / $freq_wert_lpcm))
	$p10 = Round((($rp_const * $s10 * 1000) / $freq_wert_lpcm))
	$p11 = Round((($rp_const * $s11 * 1000) / $freq_wert_lpcm))
	$p12 = Round((($rp_const * $s12 * 1000) / $freq_wert_lpcm))
	$p13 = Round((($rp_const * $s13 * 1000) / $freq_wert_lpcm))
	$p14 = Round((($rp_const * $s14 * 1000) / $freq_wert_lpcm))
	$p15 = Round((($rp_const * $s15 * 1000) / $freq_wert_lpcm))
	$p16 = Round((($rp_const * $s16 * 1000) / $freq_wert_lpcm))
	$p17 = Round((($rp_const * $s17 * 1000) / $freq_wert_lpcm))
	$p18 = Round((($rp_const * $s18 * 1000) / $freq_wert_lpcm))
	$p19 = Round((($rp_const * $s19 * 1000) / $freq_wert_lpcm))
	$p20 = Round((($rp_const * $s20 * 1000) / $freq_wert_lpcm))
	$p21 = Round((($rp_const * $s21 * 1000) / $freq_wert_lpcm))
	$p22 = Round((($rp_const * $s22 * 1000) / $freq_wert_lpcm))
	$p23 = Round((($rp_const * $s23 * 1000) / $freq_wert_lpcm))
	$p24 = Round((($rp_const * $s24 * 1000) / $freq_wert_lpcm))
	$p25 = Round((($rp_const * $s25 * 1000) / $freq_wert_lpcm))
	$p26 = Round((($rp_const * $s26 * 1000) / $freq_wert_lpcm))
	$p27 = Round((($rp_const * $s27 * 1000) / $freq_wert_lpcm))
	$p28 = Round((($rp_const * $s28 * 1000) / $freq_wert_lpcm))
	$p29 = Round((($rp_const * $s29 * 1000) / $freq_wert_lpcm))
	$p30 = Round((($rp_const * $s30 * 1000) / $freq_wert_lpcm))
	$p31 = Round((($rp_const * $s31 * 1000) / $freq_wert_lpcm))
	$p32 = Round((($rp_const * $s32 * 1000) / $freq_wert_lpcm))
	$p33 = Round((($rp_const * $s33 * 1000) / $freq_wert_lpcm))
	$p34 = Round((($rp_const * $s34 * 1000) / $freq_wert_lpcm))
	$p35 = Round((($rp_const * $s35 * 1000) / $freq_wert_lpcm))
	$p36 = Round((($rp_const * $s36 * 1000) / $freq_wert_lpcm))
	$p37 = Round((($rp_const * $s37 * 1000) / $freq_wert_lpcm))
	$p38 = Round((($rp_const * $s38 * 1000) / $freq_wert_lpcm))
	$p39 = Round((($rp_const * $s39 * 1000) / $freq_wert_lpcm))
	$p40 = Round((($rp_const * $s40 * 1000) / $freq_wert_lpcm))
	$p41 = Round((($rp_const * $s41 * 1000) / $freq_wert_lpcm))
	$p42 = Round((($rp_const * $s42 * 1000) / $freq_wert_lpcm))
	$p43 = Round((($rp_const * $s43 * 1000) / $freq_wert_lpcm))
	$p44 = Round((($rp_const * $s44 * 1000) / $freq_wert_lpcm))
	$p45 = Round((($rp_const * $s45 * 1000) / $freq_wert_lpcm))
	$p46 = Round((($rp_const * $s46 * 1000) / $freq_wert_lpcm))
	$p47 = Round((($rp_const * $s47 * 1000) / $freq_wert_lpcm))
	$p48 = Round((($rp_const * $s48 * 1000) / $freq_wert_lpcm))
	$p49 = Round((($rp_const * $s49 * 1000) / $freq_wert_lpcm))
	$p50 = Round((($rp_const * $s50 * 1000) / $freq_wert_lpcm))


	Switch GUIGetMsg()
		Case $GUI_EVENT_CLOSE
			Exit
		Case $fs_Slider
			GUICtrlSetData($fs_input, GUICtrlRead($fs_Slider))
			GUICtrlSetData($mp_Label, " Mindestpunktgröße: " & $mp & $ym)
			GUICtrlSetData($th_auf, " th. Auflösevermögen: " & $ta_round & $ym)

		Case $fs_input
			GUICtrlSetData($fs_Slider, GUICtrlRead($fs_input))
			GUICtrlSetData($fs_input, GUICtrlRead($fs_Slider)) ; für ungültige Werte
			GUICtrlSetData($mp_Label, " Mindestpunktgröße: " & $mp & $ym)
			GUICtrlSetData($th_auf, " th. Auflösevermögen: " & $ta_round & $ym)

		Case $mw_Slider
			GUICtrlSetData($mw_input, GUICtrlRead($mw_Slider))
			GUICtrlSetData($mp_Label, " Mindestpunktgröße: " & $mp & $ym)
			GUICtrlSetData($th_auf, " th. Auflösevermögen: " & $ta_round & $ym)

		Case $mw_input
			GUICtrlSetData($mw_Slider, GUICtrlRead($mw_input))
			GUICtrlSetData($mw_input, GUICtrlRead($mw_Slider)) ; für ungültige Werte
			GUICtrlSetData($mp_Label, " Mindestpunktgröße: " & $mp & $ym)
			GUICtrlSetData($th_auf, " th. Auflösevermögen: " & $ta_round & $ym)


			; Auflösung und Rasterfrequenz sowie Parameterabhängigkeiten bei Veränderung

		Case $out_Slider
			GUICtrlSetData($out_input, GUICtrlRead($out_Slider))
			GUICtrlSetData($px_DMD, " Pixelgröße DMD: " & $out_wert_round & $ym)
			GUICtrlSetData($px_LAS, " Pixelgröße Laser: " & $out_wert_round2 & $ym)
			GUICtrlSetData($freq_Label, " Rasterfrequenz in lpcm: " & $freq_wert_lpcm)
			GUICtrlSetData($k_Rasterzelle, " Kante RIP-Rasterzelle: " & $rip_k_zelle & $ym)
			GUICtrlSetData($px_Rasterzelle, " Pixel RIP-Rasterzelle: " & $rip_px_zelle)
			GUICtrlSetData($tw_darstell, " darstellbare Tonwerte: " & $tw)
			#cs
				GUICtrlSetData($twb1, "" & $p1)
				GUICtrlSetData($twb2, "" & $p2)
				GUICtrlSetData($twb3, "" & $p3)
				GUICtrlSetData($twb4, "" & $p4)
				GUICtrlSetData($twb5, "" & $p5)
				GUICtrlSetData($twb6, "" & $p6)
				GUICtrlSetData($twb7, "" & $p7)
				GUICtrlSetData($twb8, "" & $p8)
				GUICtrlSetData($twb9, "" & $p9)
				GUICtrlSetData($twb10, "" & $p10)
				GUICtrlSetData($twb11, "" & $p11)
				GUICtrlSetData($twb12, "" & $p12)
				GUICtrlSetData($twb13, "" & $p13)
				GUICtrlSetData($twb14, "" & $p14)
				GUICtrlSetData($twb15, "" & $p15)
				GUICtrlSetData($twb16, "" & $p16)
				GUICtrlSetData($twb17, "" & $p17)
				GUICtrlSetData($twb18, "" & $p18)
				GUICtrlSetData($twb19, "" & $p19)
				GUICtrlSetData($twb20, "" & $p20)
				GUICtrlSetData($twb21, "" & $p21)
				GUICtrlSetData($twb22, "" & $p22)
				GUICtrlSetData($twb23, "" & $p23)
				GUICtrlSetData($twb24, "" & $p24)
				GUICtrlSetData($twb25, "" & $p25)
				GUICtrlSetData($twb26, "" & $p26)
				GUICtrlSetData($twb27, "" & $p27)
				GUICtrlSetData($twb28, "" & $p28)
				GUICtrlSetData($twb29, "" & $p29)
				GUICtrlSetData($twb30, "" & $p30)
				GUICtrlSetData($twb31, "" & $p31)
				GUICtrlSetData($twb32, "" & $p32)
				GUICtrlSetData($twb33, "" & $p33)
				GUICtrlSetData($twb34, "" & $p34)
				GUICtrlSetData($twb35, "" & $p35)
				GUICtrlSetData($twb36, "" & $p36)
				GUICtrlSetData($twb37, "" & $p37)
				GUICtrlSetData($twb38, "" & $p38)
				GUICtrlSetData($twb39, "" & $p39)
				GUICtrlSetData($twb40, "" & $p40)
				GUICtrlSetData($twb41, "" & $p41)
				GUICtrlSetData($twb42, "" & $p42)
				GUICtrlSetData($twb43, "" & $p43)
				GUICtrlSetData($twb44, "" & $p44)
				GUICtrlSetData($twb45, "" & $p45)
				GUICtrlSetData($twb46, "" & $p46)
				GUICtrlSetData($twb47, "" & $p47)
				GUICtrlSetData($twb48, "" & $p48)
				GUICtrlSetData($twb49, "" & $p49)
				GUICtrlSetData($twb50, "" & $p50)
			#ce

		Case $out_input
			GUICtrlSetData($out_Slider, GUICtrlRead($out_input))
			GUICtrlSetData($out_input, GUICtrlRead($out_Slider)) ; für ungültige Werte
			GUICtrlSetData($px_DMD, " Pixelgröße DMD: " & $out_wert_round & $ym)
			GUICtrlSetData($px_LAS, " Pixelgröße Laser: " & $out_wert_round2 & $ym)
			GUICtrlSetData($freq_Label, " Rasterfrequenz in lpcm: " & $freq_wert_lpcm)
			GUICtrlSetData($k_Rasterzelle, " Kante RIP-Rasterzelle: " & $rip_k_zelle & $ym)
			GUICtrlSetData($px_Rasterzelle, " Pixel RIP-Rasterzelle: " & $rip_px_zelle)
			GUICtrlSetData($tw_darstell, " darstellbare Tonwerte: " & $tw)

			#cs
				GUICtrlSetData($twb1, "" & $p1)
				GUICtrlSetData($twb2, "" & $p2)
				GUICtrlSetData($twb3, "" & $p3)
				GUICtrlSetData($twb4, "" & $p4)
				GUICtrlSetData($twb5, "" & $p5)
				GUICtrlSetData($twb6, "" & $p6)
				GUICtrlSetData($twb7, "" & $p7)
				GUICtrlSetData($twb8, "" & $p8)
				GUICtrlSetData($twb9, "" & $p9)
				GUICtrlSetData($twb10, "" & $p10)
				GUICtrlSetData($twb11, "" & $p11)
				GUICtrlSetData($twb12, "" & $p12)
				GUICtrlSetData($twb13, "" & $p13)
				GUICtrlSetData($twb14, "" & $p14)
				GUICtrlSetData($twb15, "" & $p15)
				GUICtrlSetData($twb16, "" & $p16)
				GUICtrlSetData($twb17, "" & $p17)
				GUICtrlSetData($twb18, "" & $p18)
				GUICtrlSetData($twb19, "" & $p19)
				GUICtrlSetData($twb20, "" & $p20)
				GUICtrlSetData($twb21, "" & $p21)
				GUICtrlSetData($twb22, "" & $p22)
				GUICtrlSetData($twb23, "" & $p23)
				GUICtrlSetData($twb24, "" & $p24)
				GUICtrlSetData($twb25, "" & $p25)
				GUICtrlSetData($twb26, "" & $p26)
				GUICtrlSetData($twb27, "" & $p27)
				GUICtrlSetData($twb28, "" & $p28)
				GUICtrlSetData($twb29, "" & $p29)
				GUICtrlSetData($twb30, "" & $p30)
				GUICtrlSetData($twb31, "" & $p31)
				GUICtrlSetData($twb32, "" & $p32)
				GUICtrlSetData($twb33, "" & $p33)
				GUICtrlSetData($twb34, "" & $p34)
				GUICtrlSetData($twb35, "" & $p35)
				GUICtrlSetData($twb36, "" & $p36)
				GUICtrlSetData($twb37, "" & $p37)
				GUICtrlSetData($twb38, "" & $p38)
				GUICtrlSetData($twb39, "" & $p39)
				GUICtrlSetData($twb40, "" & $p40)
				GUICtrlSetData($twb41, "" & $p41)
				GUICtrlSetData($twb42, "" & $p42)
				GUICtrlSetData($twb43, "" & $p43)
				GUICtrlSetData($twb44, "" & $p44)
				GUICtrlSetData($twb45, "" & $p45)
				GUICtrlSetData($twb46, "" & $p46)
				GUICtrlSetData($twb47, "" & $p47)
				GUICtrlSetData($twb48, "" & $p48)
				GUICtrlSetData($twb49, "" & $p49)
				GUICtrlSetData($twb50, "" & $p50)
			#ce

		Case $freq_Slider
			GUICtrlSetData($freq_input, GUICtrlRead($freq_Slider) / 10)
			GUICtrlSetData($px_DMD, " Pixelgröße DMD: " & $out_wert_round & $ym)
			GUICtrlSetData($px_LAS, " Pixelgröße Laser: " & $out_wert_round2 & $ym)
			GUICtrlSetData($freq_Label, " Rasterfrequenz in lpcm: " & $freq_wert_lpcm)
			GUICtrlSetData($k_Rasterzelle, " Kante RIP-Rasterzelle: " & $rip_k_zelle & $ym)
			GUICtrlSetData($px_Rasterzelle, " Pixel RIP-Rasterzelle: " & $rip_px_zelle)
			GUICtrlSetData($tw_darstell, " darstellbare Tonwerte: " & $tw)

			GUICtrlSetData($twb1, "" & $p1)
			GUICtrlSetData($twb2, "" & $p2)
			GUICtrlSetData($twb3, "" & $p3)
			GUICtrlSetData($twb4, "" & $p4)
			GUICtrlSetData($twb5, "" & $p5)
			GUICtrlSetData($twb6, "" & $p6)
			GUICtrlSetData($twb7, "" & $p7)
			GUICtrlSetData($twb8, "" & $p8)
			GUICtrlSetData($twb9, "" & $p9)
			GUICtrlSetData($twb10, "" & $p10)
			GUICtrlSetData($twb11, "" & $p11)
			GUICtrlSetData($twb12, "" & $p12)
			GUICtrlSetData($twb13, "" & $p13)
			GUICtrlSetData($twb14, "" & $p14)
			GUICtrlSetData($twb15, "" & $p15)
			GUICtrlSetData($twb16, "" & $p16)
			GUICtrlSetData($twb17, "" & $p17)
			GUICtrlSetData($twb18, "" & $p18)
			GUICtrlSetData($twb19, "" & $p19)
			GUICtrlSetData($twb20, "" & $p20)
			GUICtrlSetData($twb21, "" & $p21)
			GUICtrlSetData($twb22, "" & $p22)
			GUICtrlSetData($twb23, "" & $p23)
			GUICtrlSetData($twb24, "" & $p24)
			GUICtrlSetData($twb25, "" & $p25)
			GUICtrlSetData($twb26, "" & $p26)
			GUICtrlSetData($twb27, "" & $p27)
			GUICtrlSetData($twb28, "" & $p28)
			GUICtrlSetData($twb29, "" & $p29)
			GUICtrlSetData($twb30, "" & $p30)
			GUICtrlSetData($twb31, "" & $p31)
			GUICtrlSetData($twb32, "" & $p32)
			GUICtrlSetData($twb33, "" & $p33)
			GUICtrlSetData($twb34, "" & $p34)
			GUICtrlSetData($twb35, "" & $p35)
			GUICtrlSetData($twb36, "" & $p36)
			GUICtrlSetData($twb37, "" & $p37)
			GUICtrlSetData($twb38, "" & $p38)
			GUICtrlSetData($twb39, "" & $p39)
			GUICtrlSetData($twb40, "" & $p40)
			GUICtrlSetData($twb41, "" & $p41)
			GUICtrlSetData($twb42, "" & $p42)
			GUICtrlSetData($twb43, "" & $p43)
			GUICtrlSetData($twb44, "" & $p44)
			GUICtrlSetData($twb45, "" & $p45)
			GUICtrlSetData($twb46, "" & $p46)
			GUICtrlSetData($twb47, "" & $p47)
			GUICtrlSetData($twb48, "" & $p48)
			GUICtrlSetData($twb49, "" & $p49)
			GUICtrlSetData($twb50, "" & $p50)

		Case $freq_input
			GUICtrlSetData($freq_Slider, GUICtrlRead($freq_input) / 10)
			GUICtrlSetData($freq_input, GUICtrlRead($freq_Slider) / 10) ; für ungültige Werte
			GUICtrlSetData($px_DMD, " Pixelgröße DMD: " & $out_wert_round & $ym)
			GUICtrlSetData($px_LAS, " Pixelgröße Laser: " & $out_wert_round2 & $ym)
			GUICtrlSetData($freq_Label, " Rasterfrequenz in lpcm: " & $freq_wert_lpcm)
			GUICtrlSetData($k_Rasterzelle, " Kante RIP-Rasterzelle: " & $rip_k_zelle & $ym)
			GUICtrlSetData($px_Rasterzelle, " Pixel RIP-Rasterzelle: " & $rip_px_zelle)
			GUICtrlSetData($tw_darstell, " darstellbare Tonwerte: " & $tw)

			GUICtrlSetData($twb1, "" & $p1)
			GUICtrlSetData($twb2, "" & $p2)
			GUICtrlSetData($twb3, "" & $p3)
			GUICtrlSetData($twb4, "" & $p4)
			GUICtrlSetData($twb5, "" & $p5)
			GUICtrlSetData($twb6, "" & $p6)
			GUICtrlSetData($twb7, "" & $p7)
			GUICtrlSetData($twb8, "" & $p8)
			GUICtrlSetData($twb9, "" & $p9)
			GUICtrlSetData($twb10, "" & $p10)
			GUICtrlSetData($twb11, "" & $p11)
			GUICtrlSetData($twb12, "" & $p12)
			GUICtrlSetData($twb13, "" & $p13)
			GUICtrlSetData($twb14, "" & $p14)
			GUICtrlSetData($twb15, "" & $p15)
			GUICtrlSetData($twb16, "" & $p16)
			GUICtrlSetData($twb17, "" & $p17)
			GUICtrlSetData($twb18, "" & $p18)
			GUICtrlSetData($twb19, "" & $p19)
			GUICtrlSetData($twb20, "" & $p20)
			GUICtrlSetData($twb21, "" & $p21)
			GUICtrlSetData($twb22, "" & $p22)
			GUICtrlSetData($twb23, "" & $p23)
			GUICtrlSetData($twb24, "" & $p24)
			GUICtrlSetData($twb25, "" & $p25)
			GUICtrlSetData($twb26, "" & $p26)
			GUICtrlSetData($twb27, "" & $p27)
			GUICtrlSetData($twb28, "" & $p28)
			GUICtrlSetData($twb29, "" & $p29)
			GUICtrlSetData($twb30, "" & $p30)
			GUICtrlSetData($twb31, "" & $p31)
			GUICtrlSetData($twb32, "" & $p32)
			GUICtrlSetData($twb33, "" & $p33)
			GUICtrlSetData($twb34, "" & $p34)
			GUICtrlSetData($twb35, "" & $p35)
			GUICtrlSetData($twb36, "" & $p36)
			GUICtrlSetData($twb37, "" & $p37)
			GUICtrlSetData($twb38, "" & $p38)
			GUICtrlSetData($twb39, "" & $p39)
			GUICtrlSetData($twb40, "" & $p40)
			GUICtrlSetData($twb41, "" & $p41)
			GUICtrlSetData($twb42, "" & $p42)
			GUICtrlSetData($twb43, "" & $p43)
			GUICtrlSetData($twb44, "" & $p44)
			GUICtrlSetData($twb45, "" & $p45)
			GUICtrlSetData($twb46, "" & $p46)
			GUICtrlSetData($twb47, "" & $p47)
			GUICtrlSetData($twb48, "" & $p48)
			GUICtrlSetData($twb49, "" & $p49)
			GUICtrlSetData($twb50, "" & $p50)

	EndSwitch

	; Punkt kleiner als Mindestpunkt, dann ROT
	If $p1 < $mp Then GUICtrlSetData($p1color, GUICtrlSetBkColor($g1, $red))
	If $p2 < $mp Then GUICtrlSetData($p2color, GUICtrlSetBkColor($g2, $red))
	If $p3 < $mp Then GUICtrlSetData($p3color, GUICtrlSetBkColor($g3, $red))
	If $p4 < $mp Then GUICtrlSetData($p4color, GUICtrlSetBkColor($g4, $red))
	If $p5 < $mp Then GUICtrlSetData($p5color, GUICtrlSetBkColor($g5, $red))
	If $p6 < $mp Then GUICtrlSetData($p6color, GUICtrlSetBkColor($g6, $red))
	If $p7 < $mp Then GUICtrlSetData($p7color, GUICtrlSetBkColor($g7, $red))
	If $p8 < $mp Then GUICtrlSetData($p8color, GUICtrlSetBkColor($g8, $red))
	If $p9 < $mp Then GUICtrlSetData($p9color, GUICtrlSetBkColor($g9, $red))
	If $p10 < $mp Then GUICtrlSetData($p10color, GUICtrlSetBkColor($g10, $red))
	If $p11 < $mp Then GUICtrlSetData($p11color, GUICtrlSetBkColor($g11, $red))
	If $p12 < $mp Then GUICtrlSetData($p12color, GUICtrlSetBkColor($g12, $red))
	If $p13 < $mp Then GUICtrlSetData($p13color, GUICtrlSetBkColor($g13, $red))
	If $p14 < $mp Then GUICtrlSetData($p14color, GUICtrlSetBkColor($g14, $red))
	If $p15 < $mp Then GUICtrlSetData($p15color, GUICtrlSetBkColor($g15, $red))
	If $p16 < $mp Then GUICtrlSetData($p16color, GUICtrlSetBkColor($g16, $red))
	If $p17 < $mp Then GUICtrlSetData($p17color, GUICtrlSetBkColor($g17, $red))
	If $p18 < $mp Then GUICtrlSetData($p18color, GUICtrlSetBkColor($g18, $red))
	If $p19 < $mp Then GUICtrlSetData($p19color, GUICtrlSetBkColor($g19, $red))
	If $p20 < $mp Then GUICtrlSetData($p20color, GUICtrlSetBkColor($g20, $red))
	If $p21 < $mp Then GUICtrlSetData($p21color, GUICtrlSetBkColor($g21, $red))
	If $p22 < $mp Then GUICtrlSetData($p22color, GUICtrlSetBkColor($g22, $red))
	If $p23 < $mp Then GUICtrlSetData($p23color, GUICtrlSetBkColor($g23, $red))
	If $p24 < $mp Then GUICtrlSetData($p24color, GUICtrlSetBkColor($g24, $red))
	If $p25 < $mp Then GUICtrlSetData($p25color, GUICtrlSetBkColor($g25, $red))
	If $p26 < $mp Then GUICtrlSetData($p26color, GUICtrlSetBkColor($g26, $red))
	If $p27 < $mp Then GUICtrlSetData($p27color, GUICtrlSetBkColor($g27, $red))
	If $p28 < $mp Then GUICtrlSetData($p28color, GUICtrlSetBkColor($g28, $red))
	If $p29 < $mp Then GUICtrlSetData($p29color, GUICtrlSetBkColor($g29, $red))
	If $p30 < $mp Then GUICtrlSetData($p30color, GUICtrlSetBkColor($g30, $red))
	If $p31 < $mp Then GUICtrlSetData($p31color, GUICtrlSetBkColor($g31, $red))
	If $p32 < $mp Then GUICtrlSetData($p32color, GUICtrlSetBkColor($g32, $red))
	If $p33 < $mp Then GUICtrlSetData($p33color, GUICtrlSetBkColor($g33, $red))
	If $p34 < $mp Then GUICtrlSetData($p34color, GUICtrlSetBkColor($g34, $red))
	If $p35 < $mp Then GUICtrlSetData($p35color, GUICtrlSetBkColor($g35, $red))
	If $p36 < $mp Then GUICtrlSetData($p36color, GUICtrlSetBkColor($g36, $red))
	If $p37 < $mp Then GUICtrlSetData($p37color, GUICtrlSetBkColor($g37, $red))
	If $p38 < $mp Then GUICtrlSetData($p38color, GUICtrlSetBkColor($g38, $red))
	If $p39 < $mp Then GUICtrlSetData($p39color, GUICtrlSetBkColor($g39, $red))
	If $p40 < $mp Then GUICtrlSetData($p40color, GUICtrlSetBkColor($g40, $red))
	If $p41 < $mp Then GUICtrlSetData($p41color, GUICtrlSetBkColor($g41, $red))
	If $p42 < $mp Then GUICtrlSetData($p42color, GUICtrlSetBkColor($g42, $red))
	If $p43 < $mp Then GUICtrlSetData($p43color, GUICtrlSetBkColor($g43, $red))
	If $p44 < $mp Then GUICtrlSetData($p44color, GUICtrlSetBkColor($g44, $red))
	If $p45 < $mp Then GUICtrlSetData($p45color, GUICtrlSetBkColor($g45, $red))
	If $p46 < $mp Then GUICtrlSetData($p46color, GUICtrlSetBkColor($g46, $red))
	If $p47 < $mp Then GUICtrlSetData($p47color, GUICtrlSetBkColor($g47, $red))
	If $p48 < $mp Then GUICtrlSetData($p48color, GUICtrlSetBkColor($g48, $red))
	If $p49 < $mp Then GUICtrlSetData($p49color, GUICtrlSetBkColor($g49, $red))
	If $p50 < $mp Then GUICtrlSetData($p50color, GUICtrlSetBkColor($g50, $red))


	; Punkt größer als Mindestpunkt, dann GRÜN
	If $p1 > $mp Then GUICtrlSetData($p1color, GUICtrlSetBkColor($g1, $green))
	If $p2 > $mp Then GUICtrlSetData($p2color, GUICtrlSetBkColor($g2, $green))
	If $p3 > $mp Then GUICtrlSetData($p3color, GUICtrlSetBkColor($g3, $green))
	If $p4 > $mp Then GUICtrlSetData($p4color, GUICtrlSetBkColor($g4, $green))
	If $p5 > $mp Then GUICtrlSetData($p5color, GUICtrlSetBkColor($g5, $green))
	If $p6 > $mp Then GUICtrlSetData($p6color, GUICtrlSetBkColor($g6, $green))
	If $p7 > $mp Then GUICtrlSetData($p7color, GUICtrlSetBkColor($g7, $green))
	If $p8 > $mp Then GUICtrlSetData($p8color, GUICtrlSetBkColor($g8, $green))
	If $p9 > $mp Then GUICtrlSetData($p9color, GUICtrlSetBkColor($g9, $green))
	If $p10 > $mp Then GUICtrlSetData($p10color, GUICtrlSetBkColor($g10, $green))
	If $p11 > $mp Then GUICtrlSetData($p11color, GUICtrlSetBkColor($g11, $green))
	If $p12 > $mp Then GUICtrlSetData($p12color, GUICtrlSetBkColor($g12, $green))
	If $p13 > $mp Then GUICtrlSetData($p13color, GUICtrlSetBkColor($g13, $green))
	If $p14 > $mp Then GUICtrlSetData($p14color, GUICtrlSetBkColor($g14, $green))
	If $p15 > $mp Then GUICtrlSetData($p15color, GUICtrlSetBkColor($g15, $green))
	If $p16 > $mp Then GUICtrlSetData($p16color, GUICtrlSetBkColor($g16, $green))
	If $p17 > $mp Then GUICtrlSetData($p17color, GUICtrlSetBkColor($g17, $green))
	If $p18 > $mp Then GUICtrlSetData($p18color, GUICtrlSetBkColor($g18, $green))
	If $p19 > $mp Then GUICtrlSetData($p19color, GUICtrlSetBkColor($g19, $green))
	If $p20 > $mp Then GUICtrlSetData($p20color, GUICtrlSetBkColor($g20, $green))
	If $p21 > $mp Then GUICtrlSetData($p21color, GUICtrlSetBkColor($g21, $green))
	If $p22 > $mp Then GUICtrlSetData($p22color, GUICtrlSetBkColor($g22, $green))
	If $p23 > $mp Then GUICtrlSetData($p23color, GUICtrlSetBkColor($g23, $green))
	If $p24 > $mp Then GUICtrlSetData($p24color, GUICtrlSetBkColor($g24, $green))
	If $p25 > $mp Then GUICtrlSetData($p25color, GUICtrlSetBkColor($g25, $green))
	If $p26 > $mp Then GUICtrlSetData($p26color, GUICtrlSetBkColor($g26, $green))
	If $p27 > $mp Then GUICtrlSetData($p27color, GUICtrlSetBkColor($g27, $green))
	If $p28 > $mp Then GUICtrlSetData($p28color, GUICtrlSetBkColor($g28, $green))
	If $p29 > $mp Then GUICtrlSetData($p29color, GUICtrlSetBkColor($g29, $green))
	If $p30 > $mp Then GUICtrlSetData($p30color, GUICtrlSetBkColor($g30, $green))
	If $p31 > $mp Then GUICtrlSetData($p31color, GUICtrlSetBkColor($g31, $green))
	If $p32 > $mp Then GUICtrlSetData($p32color, GUICtrlSetBkColor($g32, $green))
	If $p33 > $mp Then GUICtrlSetData($p33color, GUICtrlSetBkColor($g33, $green))
	If $p34 > $mp Then GUICtrlSetData($p34color, GUICtrlSetBkColor($g34, $green))
	If $p35 > $mp Then GUICtrlSetData($p35color, GUICtrlSetBkColor($g35, $green))
	If $p36 > $mp Then GUICtrlSetData($p36color, GUICtrlSetBkColor($g36, $green))
	If $p37 > $mp Then GUICtrlSetData($p37color, GUICtrlSetBkColor($g37, $green))
	If $p38 > $mp Then GUICtrlSetData($p38color, GUICtrlSetBkColor($g38, $green))
	If $p39 > $mp Then GUICtrlSetData($p39color, GUICtrlSetBkColor($g39, $green))
	If $p40 > $mp Then GUICtrlSetData($p40color, GUICtrlSetBkColor($g40, $green))
	If $p41 > $mp Then GUICtrlSetData($p41color, GUICtrlSetBkColor($g41, $green))
	If $p42 > $mp Then GUICtrlSetData($p42color, GUICtrlSetBkColor($g42, $green))
	If $p43 > $mp Then GUICtrlSetData($p43color, GUICtrlSetBkColor($g43, $green))
	If $p44 > $mp Then GUICtrlSetData($p44color, GUICtrlSetBkColor($g44, $green))
	If $p45 > $mp Then GUICtrlSetData($p45color, GUICtrlSetBkColor($g45, $green))
	If $p46 > $mp Then GUICtrlSetData($p46color, GUICtrlSetBkColor($g46, $green))
	If $p47 > $mp Then GUICtrlSetData($p47color, GUICtrlSetBkColor($g47, $green))
	If $p48 > $mp Then GUICtrlSetData($p48color, GUICtrlSetBkColor($g48, $green))
	If $p49 > $mp Then GUICtrlSetData($p49color, GUICtrlSetBkColor($g49, $green))
	If $p50 > $mp Then GUICtrlSetData($p50color, GUICtrlSetBkColor($g50, $green))

WEnd

;Scrollradfunktion für Slider
Func WM_HSCROLL($hWnd, $Msg, $wParam, $lParam)
	If $lParam = $hfs_Slider Then
		GUICtrlSetData($fs_input, GUICtrlRead($fs_Slider))
	EndIf
	If $lParam = $hmw_Slider Then
		GUICtrlSetData($mw_input, GUICtrlRead($mw_Slider))
	EndIf
	If $lParam = $hfreq_Slider Then
		GUICtrlSetData($freq_input, GUICtrlRead($freq_Slider) / 10)
	EndIf
	If $lParam = $hout_Slider Then
		GUICtrlSetData($out_input, GUICtrlRead($out_Slider))
	EndIf
	Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_HSCROLL




