Le piano beep :
commandes a la souris ou au touches F1>F8
Code : Tout sélectionner
Hotkeyset("{F1}","F1")
Hotkeyset("{F2}","F2")
Hotkeyset("{F3}","F3")
Hotkeyset("{F4}","F4")
Hotkeyset("{F5}","F5")
Hotkeyset("{F6}","F6")
Hotkeyset("{F7}","F7")
Hotkeyset("{F8}","F8")
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Piano", 336, 106, 256, 155)
$C1 = GUICtrlCreateButton(" ", 8, 8, 33, 81, 0)
$D1 = GUICtrlCreateButton(" ", 48, 8, 33, 81, 0)
$E1 = GUICtrlCreateButton(" ", 88, 8, 33, 81, 0)
$F1 = GUICtrlCreateButton(" ", 128, 8, 33, 81, 0)
$G1 = GUICtrlCreateButton(" ", 168, 8, 33, 81, 0)
$A1 = GUICtrlCreateButton(" ", 208, 8, 33, 81, 0)
$B1 = GUICtrlCreateButton(" ", 248, 8, 33, 81, 0)
$C2 = GUICtrlCreateButton(" ", 288, 8, 33, 81, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
If $nMsg = $C1 Then Call("F1")
If $nMsg = $D1 Then Call("F2")
If $nMsg = $E1 Then Call("F3")
If $nMsg = $F1 Then Call("F4")
If $nMsg = $G1 Then Call("F5")
If $nMsg = $A1 Then Call("F6")
If $nMsg = $B1 Then Call("F7")
If $nMsg = $C2 Then Call("F8")
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func F1()
Beep(264, 500)
EndFunc
Func F2()
Beep(297, 500)
EndFunc
Func F3()
Beep(330, 500)
EndFunc
Func F4()
Beep(352, 500)
EndFunc
Func F5()
Beep(396, 500)
EndFunc
Func F6()
Beep(440, 500)
EndFunc
Func F7()
Beep(495, 500)
EndFunc
Func F8()
Beep(523.3, 500)
EndFunc