ecco il mio ultimo e come al solito inutile programma...
#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\Downloads\alien-vs-predator-crystalxp.net-18514\iconshock_alien_vista_icons\ico\Hawk.ico
#AutoIt3Wrapper_Run_Tidy=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <guiconstantsex.au3>
#include <staticconstants.au3>
#include <windowsconstants.au3>
#include <misc.au3>
Func _livello1()
GUISetState(@SW_HIDE, $Prompt)
Beep(6800, 60000)
GUISetState(@SW_SHOW, $Prompt)
EndFunc ;==>_livello1
Func _livello2()
GUISetState(@SW_HIDE, $Prompt)
Beep(7000, 60000)
GUISetState(@SW_SHOW, $Prompt)
EndFunc ;==>_livello2
Func _livello3()
GUISetState(@SW_HIDE, $Prompt)
Beep(10000, 60000)
GUISetState(@SW_SHOW, $Prompt)
EndFunc ;==>_livello3
$dll = DllOpen("user32.dll")
#Region ### START Koda GUI section ### Form=
Global $Prompt = GUICreate("Scaccia Insetti", 478, 161, 192, 124)
GUISetFont(18, 800, 0, "Iron Maiden")
GUISetBkColor(0x000000)
Global $Label1 = GUICtrlCreateLabel("Scaccia Insetti", 50, 11, 374, 42)
GUICtrlSetFont(-1, 28, 800, 0, "Iron Maiden")
GUICtrlSetColor(-1, 0x00FF00)
Global $Label2 = GUICtrlCreateLabel("Premendo i tasti 1, 2, 3 attivi i corrispondenti", 18, 65, 441, 28)
GUICtrlSetFont(-1, 16, 400, 0, "Century Gothic")
GUICtrlSetColor(-1, 0x00FF00)
Global $Label3 = GUICtrlCreateLabel("Livelli di intensità di ultrasuoni...", 84, 89, 308, 28)
GUICtrlSetFont(-1, 16, 400, 0, "Century Gothic")
GUICtrlSetColor(-1, 0x00FF00)
Global $Label4 = GUICtrlCreateLabel("Zanzare, mosche, ADDIO!!!", 101, 116, 275, 28)
GUICtrlSetFont(-1, 16, 400, 0, "Century Gothic")
GUICtrlSetColor(-1, 0x00FF00)
GUISetState(@SW_SHOW, $Prompt)
#EndRegion ### END Koda GUI section ###
SoundSetWaveVolume(100)
MsgBox(64, "Info", "OGNI SESSIONE DI ULTRASUONI DURA PER 1 MINUTO!" & @CR & "P.S: Consiglio il secondo livello poichè si è rivelato più efficace degli altri livelli!", 6)
While 1
$livello1 = "1"
$livello2 = "2"
$livello3 = "3"
$hex1 = "31"
$hex2 = "32"
$hex3 = "33"
If _IsPressed($hex1, $dll) Then
_livello1()
ElseIf _IsPressed($hex2, $dll) Then
_livello2()
ElseIf _IsPressed($hex3, $dll) Then
_livello3()
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd