Nemcija Posted February 19, 2008 Share Posted February 19, 2008 (edited) Hi guys While writing on a much bigger project than this i've got nice idea for my room.I positioned a microphone connected to my computer near my door at home.My computer is running with winamp paused.And this script running:expandcollapse popup;~ ----------------------------------------------------------------- ;~ MusicStarter TestVersion ;~ By Nemcija (BlackShadow3@web.de) ;~ With UDF's by CyberZeroCool ;~ ;~ Just call it crap :D ;~ ----------------------------------------------------------------- #region Settings $VoiceActivationLevel = 5 ; Use Debugmode to determine this $SleepBeforeCheck = 60 ;Seconds bevor start checking the microphonelevel (time to leave the room :D) $Debugmode = false ;To determine the activation level #endregion Settings #region Includes #Include <string.au3> #endregion Includes #region Functions Func _mciSendString($lpszCommand, $lpszReturnString, $cchReturn, $hwndCallback) Return DllCall("winmm.dll", "long", "mciSendStringA", "str", $lpszCommand, "str", $lpszReturnString, "long", $cchReturn, "long", 0) EndFunc Func _mciShowError($mciError,$add = "test") Dim $errStr $errStr = _StringRepeat(" ", 256) $Result = DllCall("winmm.dll", "long", "mciGetErrorStringA", "long", $mciError, "string", $errStr, "long", StringLen($errStr)) MsgBox(0, "MCI "&$add, "MCI Error Number " & $mciError & ":" & $Result[2]) EndFunc ;==>_mciShowError Func _LevelCheck() Global $lpszCommand,$lpszReturnString,$cchReturn $mciError = _mciSendString($lpszCommand, $lpszReturnString, $cchReturn, 0) If $mciError[0] <> 0 Then _mciShowError($mciError[0]) EndIf _AddToLastLevels($mciError[2]) EndFunc Func _AddToLastLevels($level) Global $LastLevels,$LevelTime,$Debugmode $LastLevels[$LastLevelsSet] = $level $LastLevelsSet += 1 If $Debugmode Then ToolTip($level) If $LastLevelsSet = $LevelTime+1 Then $LastLevelsSet = 1 EndFunc #endregion Functions #region Startup $lpszDevice = "new type waveaudio" $lpszOpenFlags = "alias mywave" $lpszFlags = "" $lpszCommand = StringFormat( "open %s %s %s", $lpszDevice, $lpszOpenFlags, $lpszFlags) $lpszReturnString = _StringRepeat(" ", 256) $cchReturn = StringLen($lpszReturnString) $mciError = _mciSendString($lpszCommand, $lpszReturnString, $cchReturn, 0); If $mciError[0] <> 0 Then _mciShowError($mciError[0],"Startup Error") Exit EndIf $lpszDeviceID = "mywave" $lpszRequest = "level" $lpszFlags = "" $lpszCommand = StringFormat( "status %s %s %s", $lpszDeviceID, $lpszRequest, $lpszFlags) $LevelTime = 15 ; *100ms Dim $LastLevels[$LevelTime+1] For $i = 1 To $LevelTime $LastLevels[$i] = 0 Next $LastLevelsSet = 1 AdlibEnable("_LevelCheck",100) #endregion Startup #region Runtime Sleep($SleepBeforeCheck*1000) While 1 Sleep(100) $Active = False $i = 0 While (($i <= $LevelTime) And (Not $Active)) $Active = $Active Or ($LastLevels[$i] >= $VoiceActivationLevel) $i +=1 WEnd If $Active Then Send("{MEDIA_PLAY_PAUSE}") Exit EndIf WEnd #endregion RuntimeSo when i come home from work plop ... i open the door and the music starts playing :DBefore you ask why i'm using Dim $LastLevels[$LevelTime+1] and an search procedure ..I've just copied that part from a much bigger project i'm working on at the time And thanks to CyberZeroCool for the UDF's *edit* Another way to use it: Clap in your hands -> Watch this videoGreetings Nemcija.P.S.: I hope you understand my english Edited February 19, 2008 by Nemcija shotiko 1 [url=www.vergessene-welt.de][/url] Link to comment Share on other sites More sharing options...
TPaul81 Posted February 19, 2008 Share Posted February 19, 2008 Very creative. Nice job! My Scripts (so far)Myspace Layout EditorAnother Boss ScreenClipboard Collector Link to comment Share on other sites More sharing options...
James Posted February 19, 2008 Share Posted February 19, 2008 I have to try this when I get home! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
weaponx Posted February 19, 2008 Share Posted February 19, 2008 I was kind of expecting that you would be using a webcam for this, to detect movement. I would be worried that I have my speakers on full blast and somebody pounds on my door only to be greeted by 200 db of bone crushing rock. Link to comment Share on other sites More sharing options...
Toady Posted February 19, 2008 Share Posted February 19, 2008 I like this, it's original. Keep up the creative ideas, we really need them here. www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
Nbanonimous Posted February 19, 2008 Share Posted February 19, 2008 veryy sexxxy Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com Link to comment Share on other sites More sharing options...
Pascal257 Posted February 19, 2008 Share Posted February 19, 2008 omg thats awesome! I'm just thinking about implementing (after understanding how your technology works ^^) the following feature to pplayer: 1 clap: play/pause 2 claps: next song 3 claps: prev song that should be difficult but I'd like to try it ^^ of course you'll get credited for this thanks for this amazing work! Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 19, 2008 Share Posted February 19, 2008 Nice. Too bad I don't have a microphone. Or a computer that sits in my room. I got a nice surround sound system though... Link to comment Share on other sites More sharing options...
Nemcija Posted February 19, 2008 Author Share Posted February 19, 2008 @Pascal257: Mh.... i tried to write a clap control - but it is very hard to adjust :) I think it takes a long period of testing .. But if you want to have al look at it: expandcollapse popup;~ ----------------------------------------------------------------- ;~ ClapWinampcontrol TestVersion ;~ By Nemcija (BlackShadow3@web.de) ;~ With UDF's by CyberZeroCool ;~ ;~ Just call it crap :D ;~ ----------------------------------------------------------------- #region Settings $VoiceActivationLevel = 50 ; Should be louder than your music ^^ ; But you will have to clap as loud as possible o_O ; Not good :( $Debugmode = false ;To determine the activation level (clap once and remember the number) #endregion Settings #region Includes #Include <string.au3> #endregion Includes #region Functions Func _mciSendString($lpszCommand, $lpszReturnString, $cchReturn, $hwndCallback) Return DllCall("winmm.dll", "long", "mciSendStringA", "str", $lpszCommand, "str", $lpszReturnString, "long", $cchReturn, "long", 0) EndFunc Func _mciShowError($mciError,$add = "test") Dim $errStr $errStr = _StringRepeat(" ", 256) $Result = DllCall("winmm.dll", "long", "mciGetErrorStringA", "long", $mciError, "string", $errStr, "long", StringLen($errStr)) MsgBox(0, "MCI "&$add, "MCI Error Number " & $mciError & ":" & $Result[2]) EndFunc ;==>_mciShowError Func _LevelCheck() Global $lpszCommand,$lpszReturnString,$cchReturn $mciError = _mciSendString($lpszCommand, $lpszReturnString, $cchReturn, 0) If $mciError[0] <> 0 Then _mciShowError($mciError[0]) EndIf _AddToLastLevels($mciError[2]) EndFunc Func _AddToLastLevels($level) Global $LastLevels,$LevelTime,$Debugmode $LastLevels[$LastLevelsSet] = $level $LastLevelsSet += 1 If $Debugmode Then ToolTip($level) If $LastLevelsSet = $LevelTime+1 Then $LastLevelsSet = 1 EndFunc #endregion Functions #region Startup $lpszDevice = "new type waveaudio" $lpszOpenFlags = "alias mywave" $lpszFlags = "" $lpszCommand = StringFormat( "open %s %s %s", $lpszDevice, $lpszOpenFlags, $lpszFlags) $lpszReturnString = _StringRepeat(" ", 256) $cchReturn = StringLen($lpszReturnString) $mciError = _mciSendString($lpszCommand, $lpszReturnString, $cchReturn, 0); If $mciError[0] <> 0 Then _mciShowError($mciError[0],"Startup Error") Exit EndIf $lpszDeviceID = "mywave" $lpszRequest = "level" $lpszFlags = "" $lpszCommand = StringFormat( "status %s %s %s", $lpszDeviceID, $lpszRequest, $lpszFlags) $LevelTime = 30 ; *100ms Dim $LastLevels[$LevelTime+1] For $i = 1 To $LevelTime $LastLevels[$i] = 0 Next $LastLevelsSet = 1 AdlibEnable("_LevelCheck",50) #endregion Startup #region Runtime While 1 Sleep(50) $i = 1 $ClapCount = 0 While $i <= $LevelTime If $LastLevels[$i] >= $VoiceActivationLevel Then $ClapCount +=1 $i +=2 EndIf $i +=1 WEnd If $LastLevels[Mod($LastLevelsSet+1,$LevelTime)] >= $VoiceActivationLevel Then Switch($ClapCount) Case 1 Send("{MEDIA_PLAY_PAUSE}") Case 2 Send("{MEDIA_NEXT}") Case 3 Send("{MEDIA_PREV}") EndSwitch For $i = 1 To $LevelTime $LastLevels[$i] = 0 Next EndIf WEnd #endregion Runtime shotiko 1 [url=www.vergessene-welt.de][/url] Link to comment Share on other sites More sharing options...
Pascal257 Posted February 19, 2008 Share Posted February 19, 2008 @Pascal257: Mh.... i tried to write a clap control - but it is very hard to adjust :) I think it takes a long period of testing .. But if you want to have al look at it: ;just some nice codeholy crap thats just awesome. It works perfectly for me - but I'll try to go another way - with dynamic voiceactivation but I'd like to thank you for this beginning, I'll post my solution when its working pretty good ^^ I'm thinking of another dynamic check: Then the user starts with a low voice and gets louder the player highers the volume and vice versa ^^ just have to see how good it works ^^ greetings, Pascal P.S.: You may give me any email/icq/msn so we can talk in german Link to comment Share on other sites More sharing options...
Swift Posted February 19, 2008 Share Posted February 19, 2008 This is really...really...awesome...I had to set the level to 15...I have a bad Mic...but it works well...I walk in...BOOM! Music. It is awesome...I thank you so much for this...! Link to comment Share on other sites More sharing options...
TPaul81 Posted February 19, 2008 Share Posted February 19, 2008 I think we could implement the sound control in a lock down script. Only a ninja could use his pc -> *cough* BAAMMMMM *LOCK DOWN* My Scripts (so far)Myspace Layout EditorAnother Boss ScreenClipboard Collector Link to comment Share on other sites More sharing options...
Achilles Posted February 20, 2008 Share Posted February 20, 2008 Nice work! Multiple Desktops changing desktops when you clap... hmm.. sounds interesting... I'm going to do some great pranks with my friends with this... My friends: How in the world??? It's magic!!! My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Michel Claveau Posted February 20, 2008 Share Posted February 20, 2008 Hi, all! With the nice idea from Nemcija, I coded my version of Clap-control. For detect a Clap, the soft search a high level, then the soft wait a low level. And, the compiled version accept three arguments, for launch three differents commands (for 1, 2 r 3 claps). More than 3 close the soft. Sorry for my bad english, and thanks to Nemcija expandcollapse popup#Include <string.au3> $cde1="" $cde2="" $cde3="" if $CmdLine[0]>0 then $cde1=$CmdLine[1] endif if $CmdLine[0]>1 then $cde2=$CmdLine[2] endif if $CmdLine[0]>2 then $cde3=$CmdLine[3] endif $VoiceActivationLevel = 40 $level=0 Func _mciSendString($lpszCommand, $lpszReturnString, $cchReturn, $hwndCallback) Return DllCall("winmm.dll", "long", "mciSendStringA", "str", $lpszCommand, "str", $lpszReturnString, "long", $cchReturn, "long", 0) EndFunc Func _mciShowError($mciError,$add = "test") Dim $errStr $errStr = _StringRepeat(" ", 256) $Result = DllCall("winmm.dll", "long", "mciGetErrorStringA", "long", $mciError, "string", $errStr, "long", StringLen($errStr)) MsgBox(0, "MCI "&$add, "MCI Error Number " & $mciError & ":" & $Result[2]) EndFunc Func ClapCheck() Global $lpszCommand,$lpszReturnString,$cchReturn,$level $level=0 $mciError = _mciSendString("status tempwave level", $lpszReturnString, $cchReturn, 0) If $mciError[0]<>0 Then MsgBox(0,"Erreur MCI 37; ",$mciError[0]) EndIf If $mciError[2]>0 Then $level=$mciError[2] EndIf If $level >= $VoiceActivationLevel Then $retombe=$level While $retombe >= $VoiceActivationLevel $mciError = _mciSendString("status tempwave level", $lpszReturnString, $cchReturn, 0) $retombe = $mciError[2] sleep(6) WEnd EndIf EndFunc $lpszReturnString = _StringRepeat(" ", 256) $cchReturn = StringLen($lpszReturnString) $mciError = _mciSendString("open new type waveaudio alias tempwave", $lpszReturnString, $cchReturn, 0); If $mciError[0] <> 0 Then _mciShowError($mciError[0],"Startup Error") Exit EndIf $interv=20 $delaimaxientre2clics = Int(600/$interv) ; en millisecondes $ClapCount = 0 $i=$delaimaxientre2clics Global $level $level=0 While 1 Sleep($interv) $i-=1 If $i<=0 Then If $ClapCount>0 Then If $ClapCount=1 Then If $cde1<>"" Then ;Run(@ComSpec & " /c " & $cde1, "", @SW_HIDE) Run(@ComSpec & ' /cstart "" ' & $cde1, "", @SW_HIDE) Else MsgBox(0,"Nb Claps",$ClapCount,1) EndIf EndIf If $ClapCount=2 Then If $cde2<>"" Then Run(@ComSpec & ' /cstart "" ' & $cde2, "", @SW_HIDE) Else MsgBox(0,"Nb Claps",$ClapCount,1) EndIf EndIf If $ClapCount=3 Then If $cde3<>"" Then Run(@ComSpec & ' /cstart "" ' & $cde3, "", @SW_HIDE) Else MsgBox(0,"Nb Claps",$ClapCount,1) EndIf EndIf If $ClapCount>3 Then MsgBox(0,"Nb Claps",$ClapCount,1) EndIf ;ToolTip($ClapCount,180,180,"Nb Claps comptés",0) If $ClapCount>3 Then MsgBox(0,"plus de 3 Claps","Fin du programme",2) ExitLoop EndIf EndIf $i=$delaimaxientre2clics $ClapCount=0 EndIf $level=0 ClapCheck() If $level >= $VoiceActivationLevel Then $ClapCount +=1 $i=$delaimaxientre2clics ;ToolTip($ClapCount & " " & $level & " " & $i,80,80,"Nb Claps",0) EndIf WEnd Exit Link to comment Share on other sites More sharing options...
Kreatorul Posted February 20, 2008 Share Posted February 20, 2008 ^but the music could be activating if someone knocks at your door...it's the same thing as clapping Link to comment Share on other sites More sharing options...
Sn0opy Posted February 20, 2008 Share Posted February 20, 2008 (edited) ^but the music could be activating if someone knocks at your door...it's the same thing as clappingBut it would be awesome, like in the movie "Home Alone" (Kevin allein zu Haus in Gemany), if someone knocks on your door and a cruel voice screams at him, while you sitting in the garden to see the guy running out of your house Think i'll have a look at it later. Maybe i can find an easyer way to detect it. Edited February 20, 2008 by Sn0opy Link to comment Share on other sites More sharing options...
mashenden Posted April 2, 2008 Share Posted April 2, 2008 (edited) Interesting indeed. I have been wanting a way to mute when the phone rings. This may do it. Question - If someone leaves the system mute on then leaves, does this program take the mute off when it hears noise? If so, which command in your srcipt did that? I am seaching for a quick way to do this. Vol up once probably would work as well. [Edit- I confirmed that Send ("{Volume_Up}") did turn off the system mute in another script that I wrote to launch iTunes and start playing a song in Party Shuffle using a single shortcut and/or remote button with Intelliremote] Matt A Edited April 2, 2008 by mashenden Link to comment Share on other sites More sharing options...
Jango Posted April 2, 2008 Share Posted April 2, 2008 ^but the music could be activating if someone knocks at your door...it's the same thing as clappingYes and if it's a thief, he will think someone is present, this AutoIt script saved your goods Link to comment Share on other sites More sharing options...
crashdemons Posted April 5, 2008 Share Posted April 5, 2008 (edited) I saw this in another thread and I was simply amazed I could just tap my microphone to play/pause music - I modified to have some things +enable/disable button so you can set some form values without problems +hide-able GUI (close button hides, left-click on icon shows - right-click on icon gives you the Quit option) +on-form user-definable Min/Max values (with option to "Set To Current Level") +on-form user-definable "Events" when it gets too quiet or too loud. (Uses Execute() so Send() can still work) +Vertical progress bar for audio level between the min/max values Note: some values like $SleepBeforeCheck and $VoiceActivationLevel are still included, but deprecated if you use this mod. Edit: Removed some uncalled vars and an unnecessary line. expandcollapse popup;~ ----------------------------------------------------------------- ;~ MusicStarter TestVersion (Modified GUI Version by Crash Daemonicus) ;~ By Nemcija (BlackShadow3@web.de) ;~ With UDF's by CyberZeroCool ;~ ;~ Just call it crap ;~ ----------------------------------------------------------------- #region Settings $Debugmode = False;To determine the activation level $Enabled=False #endregion Settings #region Includes #Include <GUIConstants.au3> #Include <string.au3> #endregion Includes #region Functions Func _mciSendString($lpszCommand, $lpszReturnString, $cchReturn, $hwndCallback) Return DllCall("winmm.dll", "long", "mciSendStringA", "str", $lpszCommand, "str", $lpszReturnString, "long", $cchReturn, "long", 0) EndFunc Func _mciShowError($mciError,$add = "test") Dim $errStr $errStr = _StringRepeat(" ", 256) $Result = DllCall("winmm.dll", "long", "mciGetErrorStringA", "long", $mciError, "string", $errStr, "long", StringLen($errStr)) MsgBox(0, "MCI "&$add, "MCI Error Number " & $mciError & ":" & $Result[2]) EndFunc ;==>_mciShowError Func _LevelCheck() Global $lpszCommand,$lpszReturnString,$cchReturn $mciError = _mciSendString($lpszCommand, $lpszReturnString, $cchReturn, 0) If $mciError[0] <> 0 Then _mciShowError($mciError[0]) EndIf _AddToLastLevels($mciError[2]) EndFunc Func _AddToLastLevels($level) Global $LastLevels,$LevelTime,$Debugmode,$AudioLevelBox $LastLevels[$LastLevelsSet] = $level $LastLevelsSet += 1 If $Debugmode Then ToolTip($level) ;GUICtrlSetData($AudioLevelBox,$level) $prcnt=_ToPercent($level,GUICtrlRead($minaudiolevelbox),GUICtrlRead($maxaudiolevelbox),0) GUICtrlSetData($AudioLevelBox,$level) GUICtrlSetData($audiolevelbar,100-$prcnt) If $LastLevelsSet = $LevelTime+1 Then $LastLevelsSet = 1 EndFunc Func EnableButton() Global $Enabled, $EnableButton Switch $Enabled Case True $Enabled=False GUICtrlSetData($EnableButton,"Disabled") AdlibDisable() Case False $Enabled=True GUICtrlSetData($EnableButton,"Enabled") AdlibEnable("_LevelCheck",100) EndSwitch EndFunc Func SetMin() GUICtrlSetData($minaudiolevelbox,GUICtrlRead($AudioLevelBox)) EndFunc Func SetMax() GUICtrlSetData($maxaudiolevelbox,GUICtrlRead($AudioLevelBox)) EndFunc Func _ToPercent($i, $n, $x,$round=-1) ;converts a number in a range of numbers ;proportionally to number in a range from 0 to 100 ;despite whether the numbers are negative or not $P = 100 * (($i - $n) / ($x - $n)); If $round>-1 Then $P=Round($P,$round) Return $P EndFunc ;==>_ToPercent Func _Quit() AdlibDisable() Exit EndFunc Func _Close() Global $hidden Switch $hidden Case True GUISetState(@SW_SHOW) $hidden=False Case False GUISetState(@SW_HIDE) $hidden=True EndSwitch EndFunc #endregion Functions #region Startup $lpszDevice = "new type waveaudio" $lpszOpenFlags = "alias mywave" $lpszFlags = "" $lpszCommand = StringFormat( "open %s %s %s", $lpszDevice, $lpszOpenFlags, $lpszFlags) $lpszReturnString = _StringRepeat(" ", 256) $cchReturn = StringLen($lpszReturnString) $mciError = _mciSendString($lpszCommand, $lpszReturnString, $cchReturn, 0); If $mciError[0] <> 0 Then _mciShowError($mciError[0],"Startup Error") Exit EndIf $lpszDeviceID = "mywave" $lpszRequest = "level" $lpszFlags = "" $lpszCommand = StringFormat( "status %s %s %s", $lpszDeviceID, $lpszRequest, $lpszFlags) $LevelTime = 15 ; *100ms Dim $LastLevels[$LevelTime+1] For $i = 1 To $LevelTime $LastLevels[$i] = 0 Next $LastLevelsSet = 1 ;AdlibEnable("_LevelCheck",100) #endregion Startup #Region ### START Koda GUI section ### Form=C:\Documents and Settings\x\Desktop\audioeventform.kxf $audioeventform = GUICreate("Audio Events", 222, 222, 193, 115) $Label1 = GUICtrlCreateLabel("Audio Level", 5, 5, 60, 17) $AudioLevelBox = GUICtrlCreateLabel("0", 80, 4, 43, 17, BitOR($SS_CENTER,$SS_SUNKEN)) $EnableButton = GUICtrlCreateButton("Disabled", 132, 3, 69, 19, 0) $audiolevelbar = GUICtrlCreateProgress(203, 1, 15, 216, BitOR($PBS_VERTICAL,$WS_BORDER)) $Group1 = GUICtrlCreateGroup("Minimum Audio", 6, 42, 193, 65) $Label3 = GUICtrlCreateLabel("Level", 11, 58, 45, 19) $Label4 = GUICtrlCreateLabel("Event", 11, 80, 44, 17) $minaudiolevelbox = GUICtrlCreateInput("-1", 56, 58, 83, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL)) $minaudioeventbox = GUICtrlCreateInput("", 56, 80, 134, 21) $minaudiolevelresetbutton = GUICtrlCreateButton("Current", 141, 58, 50, 20, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group1 = GUICtrlCreateGroup("Maximum Audio", 5, 129, 193, 65) $Label5 = GUICtrlCreateLabel("Level", 10, 145, 39, 17) $Label6 = GUICtrlCreateLabel("Event", 10, 167, 44, 17) $maxaudiolevelbox = GUICtrlCreateInput("25", 55, 145, 83, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL)) $maxaudioeventbox = GUICtrlCreateInput("Send('{MEDIA_PLAY_PAUSE}')", 55, 167, 134, 21) $maxaudioresetbutton = GUICtrlCreateButton("Current", 140, 145, 50, 20, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### #region Runtime ;Sleep($SleepBeforeCheck*1000) $hidden=False Opt("GUIOnEventMode",1); GUISetOnEvent(-3,"_close") GUICtrlSetOnEvent($EnableButton,"EnableButton") GUICtrlSetOnEvent($minaudiolevelresetbutton,"SetMin") GUICtrlSetOnEvent($maxaudioresetbutton,"SetMax") TraySetClick (8) TraySetToolTip ("Audio Events") Opt("GUIOnEventMode", 1) Opt("TrayOnEventMode",1) Opt("TrayAutoPause",0) Opt("TrayMenuMode",1) $trayq=TrayCreateItem("Quit Program") TrayItemSetOnEvent ($trayq,"_Quit") $trayx=TrayCreateItem("Close Menu") TraySetOnEvent (-7, "_close" ) TrayTip("Audio Events","Clicking this icon shows/hides the 'Audio Events' window."&@CRLF&"Right-Clicking it gives you the option of Quitting.",8) Global $activestate=0 While 1 Sleep(100) If $Enabled Then $Active = False $activestate=0 $i = 0 While (($i <= $LevelTime) And ($Active==False)) ;$Active = $Active Or ($LastLevels[$i] >= $VoiceActivationLevel) ;If StringLen($LastLevels[$i])<1 Then ContinueLoop $levx=Int($LastLevels[$i]) $max=Int(GUICtrlRead($maxaudiolevelbox)) $min=Int(GUICtrlRead($minaudiolevelbox)) If ($levx >=$max) Then $Active=True $activestate=1; +1 max ExitLoop EndIf If ($levx <= $min) Then $Active=True $activestate=-1;-1 min ExitLoop EndIf $i +=1 WEnd If $Active Then ConsoleWrite(@CRLF&"active "&$activestate) Switch $activestate Case 1 Execute(GUICtrlRead($maxaudioeventbox)) Case -1 Execute(GUICtrlRead($minaudioeventbox)) EndSwitch Sleep(2000) EndIf EndIf WEnd #endregion Runtime Edited April 5, 2008 by crashdemons My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.) Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted April 5, 2008 Share Posted April 5, 2008 Wow ^^ Nice Script Keep Up The Good Work Too Bad I Can't Really Test It :/ But I Was Thinking Of An Ideal Could You Make A Voice Password Protected File? O: Or Something Like That? ~ Keep Up The Good Work Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now