PoojaKrishna Posted June 23, 2009 Share Posted June 23, 2009 Hi friends, Beep() fuction is not working with my vista. It was working correctly but not now. Beep(500,1000) I'm using AutoIt 3.2.10.0 and the device manger of my system shows the beep device status as "This device is working properly". Please help. Pooja. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 23, 2009 Moderators Share Posted June 23, 2009 PoojaKrishna,Beep works fine on my Vista (HP x32 SP2). Must be your machine, sorryM23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
PoojaKrishna Posted June 23, 2009 Author Share Posted June 23, 2009 PoojaKrishna,Beep works fine on my Vista (HP x32 SP2). Must be your machine, sorryM23Thanks for testing Melba. It may be some internal problem of my system. The code is working with my XP system. I tested in two Vista systems and was not working. Link to comment Share on other sites More sharing options...
trancexx Posted June 23, 2009 Share Posted June 23, 2009 Is this working: DllCall("kernel32.dll", "int", "Beep", "dword", 500, "dword", 1000) ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
PoojaKrishna Posted June 24, 2009 Author Share Posted June 24, 2009 Is this working: DllCall("kernel32.dll", "int", "Beep", "dword", 500, "dword", 1000) Not working. Link to comment Share on other sites More sharing options...
Drakthor Posted June 24, 2009 Share Posted June 24, 2009 (edited) Not working.Try: Beep(5000,2000) If that works then your machine cannot sound that frequency. Edited June 24, 2009 by thejay2012 Link to comment Share on other sites More sharing options...
BrettF Posted June 24, 2009 Share Posted June 24, 2009 Well depending on your computer's age, you might actually have to enable it. Check out your sound card mixer. I know mine has an option for PC Beep. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 24, 2009 Share Posted June 24, 2009 If you are using 64 bit Vista, the function is not supported, according to Microsoft.http://msdn.microsoft.com/en-us/library/ms679277(VS.85).aspxWindows Vista x64 and Windows XP 64-Bit Edition: This function is not supported. Link to comment Share on other sites More sharing options...
PoojaKrishna Posted June 24, 2009 Author Share Posted June 24, 2009 Well depending on your computer's age, you might actually have to enable it. Check out your sound card mixer. I know mine has an option for PC Beep. Cheers, Brett Thanks for your suggestions. My system does not have the beep option in sound mixer. The beep fuction in VB6 produces sound in my system. I replaced beep fuction in my AutoIt code with soundplay(). SoundPlay (@ScriptDir&"\Ding.wav,1) The Ding.wav is attached. I hope it will help somebody having the same problem. Ding.wav Pooja. Link to comment Share on other sites More sharing options...
PoojaKrishna Posted June 24, 2009 Author Share Posted June 24, 2009 If you are using 64 bit Vista, the function is not supported, according to Microsoft.http://msdn.microsoft.com/en-us/library/ms679277(VS.85).aspxMine is a Vista, 32 bit edition and the beep() function was working properly with it. Link to comment Share on other sites More sharing options...
GEOSoft Posted June 24, 2009 Share Posted June 24, 2009 Thanks for your suggestions. My system does not have the beep option in sound mixer. The beep fuction in VB6 produces sound in my system. I replaced beep fuction in my AutoIt code with soundplay(). SoundPlay (@ScriptDir&"\Ding.wav,1) The Ding.wav is attached. I hope it will help somebody having the same problem. Ding.wav Pooja.Better yet. Opt("ExpandEnvStrings", 1) $sSnd = RegRead("HKCU\AppEvents\Schemes\Apps\.Default\.Default\.Current", "") SoundPlay($sSnd) George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
PoojaKrishna Posted June 24, 2009 Author Share Posted June 24, 2009 Better yet. Opt("ExpandEnvStrings", 1) $sSnd = RegRead("HKCU\AppEvents\Schemes\Apps\.Default\.Default\.Current", "") SoundPlay($sSnd) George, Thanks for the code. The code is working with wait parameter. Opt("ExpandEnvStrings", 1) $sSnd = RegRead("HKCU\AppEvents\Schemes\Apps\.Default\.Default\.Current", "") SoundPlay($sSnd,1) Pooja Link to comment Share on other sites More sharing options...
GEOSoft Posted June 24, 2009 Share Posted June 24, 2009 George, Thanks for the code. The code is working with wait parameter. Opt("ExpandEnvStrings", 1) $sSnd = RegRead("HKCU\AppEvents\Schemes\Apps\.Default\.Default\.Current", "") SoundPlay($sSnd,1) PoojaThanks for catching that. It's better to use the default sound than it is to add a file (which exists on all Windows systems) to @ScriptDir George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
trancexx Posted June 24, 2009 Share Posted June 24, 2009 Not working.That code was there for you to debug it. You should have done something like this to see what's happening: $aCall = DllCall("kernel32.dll", "int", "Beepu", "dword", 500, "dword", 1000) $iError = @error If $iError Then ConsoleWrite("!DllCall error! @error = " & $iError & @CRLF) Else If $aCall[0] Then ConsoleWrite("No error. Function returned " & $aCall[0] & @CRLF) Else ConsoleWrite("!No error calling the function, but function returned 0. It means function failed." & @CRLF) EndIf EndIf ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
PoojaKrishna Posted June 24, 2009 Author Share Posted June 24, 2009 That code was there for you to debug it. You should have done something like this to see what's happening: $aCall = DllCall("kernel32.dll", "int", "Beepu", "dword", 500, "dword", 1000) $iError = @error If $iError Then ConsoleWrite("!DllCall error! @error = " & $iError & @CRLF) Else If $aCall[0] Then ConsoleWrite("No error. Function returned " & $aCall[0] & @CRLF) Else ConsoleWrite("!No error calling the function, but function returned 0. It means function failed." & @CRLF) EndIf EndIf Thanks for the modified code with debug. Executed it with a small edit "Beepu"->"Beep". It returns "No error. Function returned 1". But no beep was heard. $aCall = DllCall("kernel32.dll", "int", "Beep", "dword", 500, "dword", 1000) $iError = @error If $iError Then ConsoleWrite("!DllCall error! @error = " & $iError & @CRLF) Else If $aCall[0] Then ConsoleWrite("No error. Function returned " & $aCall[0] & @CRLF) Else ConsoleWrite("!No error calling the function, but function returned 0. It means function failed." & @CRLF) EndIf EndIf Link to comment Share on other sites More sharing options...
trancexx Posted June 24, 2009 Share Posted June 24, 2009 (edited) Thanks for the modified code with debug. Executed it with a small edit "Beepu"->"Beep". It returns "No error. Function returned 1". But no beep was heard. $aCall = DllCall("kernel32.dll", "int", "Beep", "dword", 500, "dword", 1000) $iError = @error If $iError Then ConsoleWrite("!DllCall error! @error = " & $iError & @CRLF) Else If $aCall[0] Then ConsoleWrite("No error. Function returned " & $aCall[0] & @CRLF) Else ConsoleWrite("!No error calling the function, but function returned 0. It means function failed." & @CRLF) EndIf EndIf"Beepu" was to put you to the working speed. You should really check your buzzer. Take a screwdriver and go (brake something). But before that run this: RunWait(@ComSpec & " /c " & 'net start Beep', "", @SW_HIDE) Beep(500, 1000) edit: Don't forget #RequireAdmin since you are on Vista Edited June 24, 2009 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
PoojaKrishna Posted June 25, 2009 Author Share Posted June 25, 2009 "Beepu" was to put you to the working speed. You should really check your buzzer. Take a screwdriver and go (brake something). But before that run this: RunWait(@ComSpec & " /c " & 'net start Beep', "", @SW_HIDE) Beep(500, 1000) edit: Don't forget #RequireAdmin since you are on Vista Thanks again for the new code, but no beep. Yes, something is wrong with buzzer. I repalced beep() with soundplay() in my code. WiValdiBB 1 Link to comment Share on other sites More sharing options...
WiValdiBB Posted January 20, 2017 Share Posted January 20, 2017 On 25.06.2009 at 11:05 AM, PoojaKrishna said: Thanks again for the new code, but no beep. Yes, something is wrong with buzzer. I repalced beep() with soundplay() in my code. The same problem, Win 7 32 bits, no beep, PC plays all sounds correctly, interesting what and why Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 20, 2017 Moderators Share Posted January 20, 2017 WiValdiBB, Probably the same reason as 8 years ago - your PC speaker is either not working or not fitted. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
WiValdiBB Posted January 20, 2017 Share Posted January 20, 2017 (edited) 51 minutes ago, Melba23 said: Probably the same reason as 8 years ago - your PC speaker is either not working or not fitted Lenovo Y 550, it's laptop, with XP was fine, just installed Win 7 no beep, even , no SoundPlay for now, all sounds other sounds (system sounds, mp3 musics, movies etc ) are playing perfectly I'm investigating now , reverse to http://www.digitalcitizen.life/how-disable-system-beep-windows-7?page=1 Thx M23 anyway Edited January 20, 2017 by WiValdiBB Link to comment Share on other sites More sharing options...
Recommended Posts