Hi, ich habe folgendes Problem.
Ich schreibe gerade ein "Beep-Melodie-Programm". xD
Jedoch gibt der über das Execute() nichts aus.
Warum?
Code
$zeit = 200
$wait = "Sleep($zeit)"
$c_ton = 264
$3c = "Beep($c_ton*3,$zeit)"
$3cis = "Beep($c_ton*25/24*3,$zeit)"
$3d = "Beep($c_ton*9/8*3,$zeit)"
$3es = "Beep($c_ton*6/5*3,$zeit)"
$3e = "Beep($c_ton*5/4*3,$zeit)"
$3f = "Beep($c_ton*4/3*3,$zeit)"
$3fis = "Beep($c_ton*25/18*3,$zeit)"
$3g = "Beep($c_ton*3/2*3,$zeit)"
$3as = "Beep($c_ton*8/5*3,$zeit)"
$3a = "Beep($c_ton*5/3*3,$zeit)"
$3b = "Beep($c_ton*9/5*3,$zeit)"
$3h = "Beep($c_ton*15/8*3,$zeit)"
$2c = "Beep($c_ton*2,$zeit)"
$2cis = "Beep($c_ton*25/24*2,$zeit)"
$2d = "Beep($c_ton*9/8*2,$zeit)"
$2es = "Beep($c_ton*6/5*2,$zeit)"
$2e = "Beep($c_ton*5/4*2,$zeit)"
$2f = "Beep($c_ton*4/3*2,$zeit)"
$2fis = "Beep($c_ton*25/18*2,$zeit)"
$2g = "Beep($c_ton*3/2*2,$zeit)"
$2as = "Beep($c_ton*8/5*2,$zeit)"
$2a = "Beep($c_ton*5/3*2,$zeit)"
$2b = "Beep($c_ton*9/5*2,$zeit)"
$2h = "Beep($c_ton*15/8*2,$zeit)"
$c = "Beep($c_ton,$zeit)"
$cis = "Beep($c_ton*25/24,$zeit)"
$d = "Beep($c_ton*9/8,$zeit)"
$es = "Beep($c_ton*6/5,$zeit)"
$e = "Beep($c_ton*5/4,$zeit)"
$f = "Beep($c_ton*4/3,$zeit)"
$fis = "Beep($c_ton*25/18,$zeit)"
$g = "Beep($c_ton*3/2,$zeit)"
$as = "Beep($c_ton*8/5,$zeit)"
$a = "Beep($c_ton*5/3,$zeit)"
$b = "Beep($c_ton*9/5,$zeit)"
$h = "Beep($c_ton*15/8,$zeit)"
GUICreate("Tasten", 240,100)
[/autoit] [autoit][/autoit] [autoit]$3c_button = GUICtrlCreateButton("c",0,0, 20, 20)
$3cis_button = GUICtrlCreateButton("c2",20,0, 20, 20)
$3d_button = GUICtrlCreateButton("d",40,0, 20, 20)
$3es_button = GUICtrlCreateButton("d2",60,0, 20, 20)
$3e_button = GUICtrlCreateButton("e",80,0, 20, 20)
$3f_button = GUICtrlCreateButton("f",100,0, 20, 20)
$3fis_button = GUICtrlCreateButton("f2",120,0,0, 20)
$3g_button = GUICtrlCreateButton("g",140,0,0, 20)
$3as_button = GUICtrlCreateButton("g2",160,0,0, 20)
$3a_button = GUICtrlCreateButton("a",180,0,0, 20)
$3b_button = GUICtrlCreateButton("h",200,0,0, 20)
$3h_button = GUICtrlCreateButton("h2",220,0,0, 20)
$2c_button = GUICtrlCreateButton("c",0,20, 20, 20)
$2cis_button = GUICtrlCreateButton("c2",20,20, 20, 20)
$2d_button = GUICtrlCreateButton("d",40,20, 20, 20)
$2es_button = GUICtrlCreateButton("d2",60,20, 20, 20)
$2e_button = GUICtrlCreateButton("e",80,20, 20, 20)
$2f_button = GUICtrlCreateButton("f",100,20, 20, 20)
$2fis_button = GUICtrlCreateButton("f2",120,20,0, 20)
$2g_button = GUICtrlCreateButton("g",140,20,0, 20)
$2as_button = GUICtrlCreateButton("g2",160,20,0, 20)
$2a_button = GUICtrlCreateButton("a",180,20,0, 20)
$2b_button = GUICtrlCreateButton("h",200,20,0, 20)
$2h_button = GUICtrlCreateButton("h2",220,20,0, 20)
$c_button = GUICtrlCreateButton("c",0,40, 20, 20)
$cis_button = GUICtrlCreateButton("c2",20,40, 20, 20)
$d_button = GUICtrlCreateButton("d",40,40, 20, 20)
$es_button = GUICtrlCreateButton("d2",60,40, 20, 20)
$e_button = GUICtrlCreateButton("e",80,40, 20, 20)
$f_button = GUICtrlCreateButton("f",100,40, 20, 20)
$fis_button = GUICtrlCreateButton("f2",120,40,0, 20)
$g_button = GUICtrlCreateButton("g",140,40,0, 20)
$as_button = GUICtrlCreateButton("g2",160,40,0, 20)
$a_button = GUICtrlCreateButton("a",180,40,0, 20)
$b_button = GUICtrlCreateButton("h",200,40,0, 20)
$h_button = GUICtrlCreateButton("h2",220,40,0, 20)
$wait_button = GUICtrlCreateButton("P",220,60,0, 20)
[/autoit] [autoit][/autoit] [autoit]$test_button = GUICtrlCreateButton("Test",0,80,130, 20)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]$input = GUICtrlCreateInput("", 0, 60, 220)
[/autoit] [autoit][/autoit] [autoit]GUISetState()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
;~ 3
Case $3c_button
GUICtrlSetData($input, GUICtrlRead($input) & "$3c & ")
Case $3cis_button
GUICtrlSetData($input, GUICtrlRead($input) & "$3cis & ")
Case $3d_button
GUICtrlSetData($input, GUICtrlRead($input) & "$3d & ")
Case $3es_button
GUICtrlSetData($input, GUICtrlRead($input) & "$3es & ")
Case $3e_button
GUICtrlSetData($input, GUICtrlRead($input) & "$3e & ")
Case $3f_button
GUICtrlSetData($input, GUICtrlRead($input) & "$3f & ")
Case $3fis_button
GUICtrlSetData($input, GUICtrlRead($input) & "$3fis & ")
Case $3g_button
GUICtrlSetData($input, GUICtrlRead($input) & "$3g & ")
Case $3as_button
GUICtrlSetData($input, GUICtrlRead($input) & "$3as & ")
Case $3a_button
GUICtrlSetData($input, GUICtrlRead($input) & "$3a & ")
Case $3b_button
GUICtrlSetData($input, GUICtrlRead($input) & "$3b & ")
Case $3h_button
GUICtrlSetData($input, GUICtrlRead($input) & "$3h & ")
;~ End 3
;~ 2
Case $2c_button
GUICtrlSetData($input, GUICtrlRead($input) & "$2c & ")
Case $2cis_button
GUICtrlSetData($input, GUICtrlRead($input) & "$2cis & ")
Case $2d_button
GUICtrlSetData($input, GUICtrlRead($input) & "$2d & ")
Case $2es_button
GUICtrlSetData($input, GUICtrlRead($input) & "$2es & ")
Case $2e_button
GUICtrlSetData($input, GUICtrlRead($input) & "$2e & ")
Case $2f_button
GUICtrlSetData($input, GUICtrlRead($input) & "$2f & ")
Case $2fis_button
GUICtrlSetData($input, GUICtrlRead($input) & "$2fis & ")
Case $2g_button
GUICtrlSetData($input, GUICtrlRead($input) & "$2g & ")
Case $2as_button
GUICtrlSetData($input, GUICtrlRead($input) & "$2as & ")
Case $2a_button
GUICtrlSetData($input, GUICtrlRead($input) & "$2a & ")
Case $2b_button
GUICtrlSetData($input, GUICtrlRead($input) & "$2b & ")
Case $2h_button
GUICtrlSetData($input, GUICtrlRead($input) & "$2h & ")
;~ End 2
;~ 1
Case $c_button
GUICtrlSetData($input, GUICtrlRead($input) & "$c & ")
Case $cis_button
GUICtrlSetData($input, GUICtrlRead($input) & "$cis & ")
Case $d_button
GUICtrlSetData($input, GUICtrlRead($input) & "$d & ")
Case $es_button
GUICtrlSetData($input, GUICtrlRead($input) & "$es & ")
Case $e_button
GUICtrlSetData($input, GUICtrlRead($input) & "$e & ")
Case $f_button
GUICtrlSetData($input, GUICtrlRead($input) & "$f & ")
Case $fis_button
GUICtrlSetData($input, GUICtrlRead($input) & "$fis & ")
Case $g_button
GUICtrlSetData($input, GUICtrlRead($input) & "$g & ")
Case $as_button
GUICtrlSetData($input, GUICtrlRead($input) & "$as & ")
Case $a_button
GUICtrlSetData($input, GUICtrlRead($input) & "$a & ")
Case $b_button
GUICtrlSetData($input, GUICtrlRead($input) & "$b & ")
Case $h_button
GUICtrlSetData($input, GUICtrlRead($input) & "$h & ")
;~ End 1
Case $wait_button
GUICtrlSetData($input, GUICtrlRead($input) & "$wait & ")
Case $test_button
Execute(GUICtrlRead($input))
EndSwitch
WEnd