DjProg 3 Posted October 21, 2010 Report Share Posted October 21, 2010 Hello All, I need to generate a beep in javascript (for some reason the traditional windows command line solutions don't wan't to work correctly). I think I should be able to do this with a RUN JAVASCRIPT function. Unfortunately i'm a real total noob in javascript . Can maybe someone help me ? Thanks a lot, Cheers, PS : if you are curious : it's because my script will pause and ask user to input some data... and to be faster I need to alert the user asap when the script is waiting for him Quote Link to post Share on other sites
IRobot 43 Posted October 21, 2010 Report Share Posted October 21, 2010 The only way I know of doing it in JS is to embed a sound file (e.g. .wav) in HTML, and then play it using code. Unless your users are falling asleep , I'd suggest using pop-up dialog prompts. Quote Link to post Share on other sites
UBotBuddy 331 Posted October 21, 2010 Report Share Posted October 21, 2010 Oh I would love to have something like that. A beep. Just a simple beep. Back in the old days all you have to do was press Alt and type 007 (I think) and then release the Alt key. A simple beep would pop out of the speaker. Geez, now you have to embed a file call some code. I would love a timed Message Box to pop up doing the same sound effect and then disappearing after a preset period of time. Ahhh....the dreams we are having. lol Quote Link to post Share on other sites
JohnB 255 Posted October 21, 2010 Report Share Posted October 21, 2010 The problem with popups is they are not modal, and they can sit there for quite awhile unnoticed if your bot is minimized or behind another screen.(I tried that solution and those were my results). John Quote Link to post Share on other sites
IRobot 43 Posted October 21, 2010 Report Share Posted October 21, 2010 The problem with popups is they are not modal, and they can sit there for quite awhile unnoticed if your bot is minimized or behind another screen.(I tried that solution and those were my results).The solution to that is to pause the bot until the user has confirmed the dialog. Playing a sound is possible, but a workaround for a newbie coder was offered. Also, a sound would be no good if the user had no sound on their computer or was hard of hearing. I guess it depends on the context in which the bot is to be used, but my point was that you should never make assumptions about users. Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted October 21, 2010 Report Share Posted October 21, 2010 The other alternative to this is the "Focus Chosen" Command then Pause the bot. It will steal your focus when executed. Quote Link to post Share on other sites
meter 145 Posted October 21, 2010 Report Share Posted October 21, 2010 It will be possible to have beeps in Ubot soon ^^ Anyways, I'll code something for you soon as I get home. Quote Link to post Share on other sites
meter 145 Posted October 22, 2010 Report Share Posted October 22, 2010 BEEP BEEP BEEP http://sites.google.com/site/metermeter1/herpderp/beep.zip?attredirects=0&d=1 Just run it via the Shell command. Quote Link to post Share on other sites
DjProg 3 Posted October 22, 2010 Author Report Share Posted October 22, 2010 BEEP BEEP BEEP http://sites.google.com/site/metermeter1/herpderp/beep.zip?attredirects=0&d=1 Just run it via the Shell command. Thanks, but damn it doesn't beep. i'm just supposed to run a SHELL and then select the exe right ? All shell commands that i tried didn't work, that's why i wanted to use javascript (i'm on a virtual XP running on MAC OSX so it might be a reason why shell XP commands don't work the way it's expected) Quote Link to post Share on other sites
IRobot 43 Posted October 22, 2010 Report Share Posted October 22, 2010 It's beep beep beepin' for me mate! I can run meter's beep through: shell > cmd.exe /c beep.exe It's likely to be a problem with your PC/OS, especially if you can't run other command line stuff... Quote Link to post Share on other sites
DjProg 3 Posted October 22, 2010 Author Report Share Posted October 22, 2010 It's beep beep beepin' for me mate! I can run meter's beep through: shell > cmd.exe /c beep.exe It's likely to be a problem with your PC/OS, especially if you can't run other command line stuff... Even double clicking on meter's EXE didn't work for me... i guess it has something to do with the virtualization (I guess I don't really have an "internal" speaker with a virtualized XP) I found a way , command line : mplay32 /play /close c:\windows\media\Vista_MSNMSGR_NewMessage.wav (assuming you have such a wav file in c:\windows\media\) it's not a beep, but it's good for me !!! http://screencast.com/t/67lJjfEzsd Cheers, Quote Link to post Share on other sites
meter 145 Posted October 22, 2010 Report Share Posted October 22, 2010 ^That works too. Good trick, cheers! -meter Quote Link to post Share on other sites
UBotBuddy 331 Posted October 22, 2010 Report Share Posted October 22, 2010 I just want a node that beeps. But then again I want a node that drives me to work and actually does my work for me. Thus letting me sleep when I am not botting. lol Quote Link to post Share on other sites
JohnB 255 Posted October 22, 2010 Report Share Posted October 22, 2010 Works for me just by calling the exe (from shell) Quote Link to post Share on other sites
Praney Behl 314 Posted October 30, 2010 Report Share Posted October 30, 2010 Well if it still didn't work for you, then I compiled some for you.. Praneybeep.ubot Quote Link to post Share on other sites
JohnB 255 Posted October 30, 2010 Report Share Posted October 30, 2010 I just want a node that beeps. But then again I want a node that drives me to work and actually does my work for me. Thus letting me sleep when I am not botting. lol You guys work? http://ubotstudio.com/forum/public/style_emoticons/default/rolleyes.gif Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.