Hi,
Ich versuche ein Script zu schreiben das den Systemlausprecher zum Piepsen bringt.
Der Ende Button und die Fortschrittsanzeige gehen nicht.
Was kann ich machen?
Spoiler anzeigen
#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]$2 = "0.0031480198954857394698734496002015" ;~ wenn man 0,0031480198954857394698734496002015 * 31766 kommt (fast) 100(%) für $Progress1 raus.
[/autoit] [autoit][/autoit] [autoit]$Form1 = GUICreate("Explosion", 637, 30, 193, 125)
$Button1 = GUICtrlCreateButton("Start", 0, 0, 75, 25, 0)
$Button2 = GUICtrlCreateButton("Ende", 560, 0, 75, 25, 0)
$Progress1 = GUICtrlCreateProgress(80, 0, 478, 25)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button1
$beep = "27"
ton()
Case $Button2
Exit
EndSwitch
WEnd
Func ton()
While 1
$s = GUICtrlRead($Progress1)
$s = $s + $2
GUICtrlSetData( $Progress1, $s )
$beep = $beep + 10
If $beep > 31766 Then ExitLoop ;Frequenz
Beep($beep,10)
WEnd
EndFunc