n9mfk9 Posted December 9, 2006 Share Posted December 9, 2006 hi here is my code this is the error i get (15,79) : WARNING: $STDERR_CHILD: possibly used before declaration. $iPID= Run("c:\volumeline/volumeline.exe "&$test,"",@SW_HIDE , $STDERR_CHILD + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\beau thompson\My Documents\AUDIOSLECT.AU3(15,94) : WARNING: $STDOUT_CHILD: possibly used before declaration. $iPID= Run("c:\volumeline/volumeline.exe "&$test,"",@SW_HIDE , $STDERR_CHILD + $STDOUT_CHILD) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\beau thompson\My Documents\AUDIOSLECT.AU3 - 0 error(s), 2 warning(s) ->AU3Check ended.rc:1 >Running:(3.2.0.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\beau thompson\My Documents\AUDIOSLECT.AU3" C:\Documents and Settings\beau thompson\My Documents\AUDIOSLECT.AU3 (15) : ==> Variable used without being declared.: $iPID= Run("c:\volumeline/volumeline.exe "&$test,"",@SW_HIDE , $STDERR_CHILD + $STDOUT_CHILD) $iPID= Run("c:\volumeline/volumeline.exe "&$test,"",@SW_HIDE , ^ ERROR how can i gix thi ;$Group1 = GUICtrlCreateGroup("", 16, 128, 177, 49) ;$Label1 = GUICtrlCreateLabel("", 24, 144, 163, 25) ;GUICtrlCreateGroup("", -99, -99, 1, 1) ;GUICtrlSetData( $Label1, $readout) $wave="" $ans= "" $Card1= " Playback: "&RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Playback") $card2= " Record: "&RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Record") $readout= $card1&@CR &$card2 $mastor= "" $iPID= "" $test = "get:0:0:0:" $iPID= Run("c:\volumeline/volumeline.exe "&$test,"",@SW_HIDE , $STDERR_CHILD + $STDOUT_CHILD) $sGather = '' While Not @error $sGather &= stdOutRead($iPID) WEnd MsgBox(64, 'Info', $sGather) #include <Constants.au3> #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=c:\documents and settings\beau thompson\my documents\agui.kxf $agui_1 = GUICreate("audio slect", 366, 264, 217, 113) $Button1 = GUICtrlCreateButton("IMIC", 24, 16, 57, 25, 0) $Button2 = GUICtrlCreateButton("AC97", 96, 16, 57, 25, BitOR($BS_CENTER,$WS_GROUP)) $Button3 = GUICtrlCreateButton("IMIC/AC97", 23, 45, 57, 25, 0) $Button4 = GUICtrlCreateButton("A97/IMIC", 95, 45, 57, 25, BitOR($BS_CENTER,$WS_GROUP)) $Button5 = GUICtrlCreateButton("INPUT", 24, 72, 57, 25, 0) $Button6 = GUICtrlCreateButton("OUTPUT", 96, 72, 57, 25, BitOR($BS_CENTER,$WS_GROUP)) $Button7 = GUICtrlCreateButton("MASTOR", 23, 100, 57, 25, 0) $Button8 = GUICtrlCreateButton("WAVE", 95, 100, 57, 25, BitOR($BS_CENTER,$WS_GROUP)) $Group1 = GUICtrlCreateGroup("", 16, 128, 177, 49) $Label1 = GUICtrlCreateLabel("ALabel1", 24, 144, 163, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUICtrlSetData( $Label1, $readout) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit $Card1= " Playback: "&RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Playback") $card2= " Record: "&RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Record") $readout= $card1&@CR &$card2 Case $Button1 $Playback = "iMic USB audio system" $Record = "iMic USB audio system" RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Playback", "REG_SZ",$Playback) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Record", "REG_SZ",$Record) $Card1= " Playback: "&RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Playback") $card2= " Record: "&RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Record") $readout= $card1&@CR &$card2 GUICtrlSetData( $Label1, $readout) ;$Label1 = GUICtrlCreateLabel($readout, 24, 144, 163, 25) Case $Button2 $Playback = "Realtek AC97 Audio" $Record= "Realtek AC97 Audio" RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Playback", "REG_SZ",$Playback) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Record", "REG_SZ",$Record) $Card1= " Playback: "&RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Playback") $card2= " Record: "&RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Record") $readout= $card1&@CR &$card2 GUICtrlSetData( $Label1, $readout) Case $Button3 $Playback = "iMic USB audio system" $Record = "Realtek AC97 Audio" RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Playback", "REG_SZ",$Playback) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Record", "REG_SZ",$Record) $Card1= " Playback: "&RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Playback") $card2= " Record: "&RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Record") $readout= $card1&@CR &$card2 GUICtrlSetData( $Label1, $readout) Case $Button4 $Playback = "Realtek AC97 Audio" $Record = "iMic USB audio system" RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Playback", "REG_SZ",$Playback) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Record", "REG_SZ",$Record) $Card1= " Playback: "&RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Playback") $card2= " Record: "&RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper", "Record") $readout= $card1&@CR &$card2 GUICtrlSetData( $Label1, $readout) Case $Button5 Run("C:\WINDOWS\system32\sndvol32.exe") Case $Button6 Run("C:\WINDOWS\system32\sndvol32.exe -R") Case $Button7 mastor() $iPID= Run("c:\volumeline/volumeline.exe "&$mastor,"",@SW_HIDE , $STDERR_CHILD + $STDOUT_CHILD) $sGather = '' While Not @error $sGather &= stdOutRead($iPID) WEnd MsgBox(64, 'Info', $sGather) Case $Button8 wave() $iPID= Run("c:\volumeline/volumeline.exe "&$wave,"",@SW_HIDE , $STDERR_CHILD + $STDOUT_CHILD) $sGather = '' While Not @error $sGather &= stdOutRead($iPID) WEnd MsgBox(64, 'Info', $sGather) EndSwitch WEnd Func wave() $ans = Round(100*2/3) ;MsgBox(0,"",$ans) If StringInStr ($card1,"Realtek AC97 Audio")Then $wave = "set:0:0:0: volume:"&$ans Elseif StringInStr ($card1,"iMic USB audio system")Then $wave = "set:0:0:0: volume:"&$ans EndIf Return EndFunc Func mastor() $ans = Round(100*2/3) ;MsgBox(0,"",$ans) If StringInStr ($card1,"Realtek AC97 Audio")Then $mastor = "set:0:0:-1: volume:"&$ans Elseif StringInStr ($card1,"iMic USB audio system")Then $mastor = "set:0:0:-1: volume:"&$ans EndIf Return EndFunc [code/] Link to comment Share on other sites More sharing options...
The Kandie Man Posted December 9, 2006 Share Posted December 9, 2006 Add: #include <constants.au3> to the beginning of your script. "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire 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