Beta

# Slashdot: News for Nerds

×

### Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

# Play Random Sounds for E-Mail Notifications?

#### Cliff posted about 9 years ago | from the eschew-audio-boredom dept.

156

An anonymous reader asks: "I, like many of my fellow Outlook-using geek friends, like to set funny sounds to be played when a new message arrives ('Leeroy Jenkins' is the one I have set now). However, we have always wanted to be able to have random sounds be played when a new message arrives, rather than the same sound over and over. I've searched high and low, and I was hoping Slashdot could suggest/write a program that can randomly play sound files from a specified folder when a new message arrives. Any ideas?"

cancel ×

### frist post (-1, Offtopic)

#### Anonymous Coward | about 9 years ago | (#13108645)

Subject

Comment

(Use the Preview Button! Check those URLs!)
No Karma Bonus Post Anonymously
Allowed HTML <b> <i> <p> <br> <a> <ol> <ul> <li> <dl> <dt> <dd> <em> <strong> <tt> <blockquote> <div> <ecode>
URLs <URL:http://example.com/> will auto-link a URL
Important Stuff

# Please try to keep posts on topic.
# Read other people's messages before posting your own to avoid simply duplicating what has already been said.
# Use a clear subject that describes what your message is about.
# Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page)

Problems regarding accounts or comment posting should be sent to CowboyNeal.

### Re:frist post (0)

#### Anonymous Coward | about 9 years ago | (#13111390)

Outlook-using geek friends

Huh?

### Random sounds? (5, Insightful)

#### Anonymous Coward | about 9 years ago | (#13108651)

Is this what Ask Slashdot has boiled down to - asking about playing random sounds when email arrives? There's gotta be better material to pick from than this.

### Re:Random sounds? (0)

#### Anonymous Coward | about 9 years ago | (#13108808)

Boiled down to?

You mean there was a time when it was more significant than dealing with such topics?

### Re:Random sounds? (0)

#### Anonymous Coward | about 9 years ago | (#13110636)

This is bullshit. Get your hand off your cock for a couple minutes a day Cliff.

### let's get this out of the way. took me 3 mins. (2, Informative)

#### croddy (659025) | about 9 years ago | (#13109075)

#!/bin/sh

path=$1 find$path -name "*.[Oo][Oo][Gg]" -print > soundlist.txt
find $path -name "*.[Mm][Pp][3]" -print >> soundlist.txt find$path -name "*.[Ww][Aa][Vv]" -print >> soundlist.txt
find $path -name "*.[Ff][Ll][Aa][Cc]" -print >> soundlist.txt find$path -name "*.[Aa][Ii][Ff][Ff]" -print >> soundlist.txt

#!/bin/sh
# play random file from filelist

filelist=$1 len=wc -l$filelist
n=expr $RANDOM %$len
play sed -n ${n}p$filelist

### Re:let's get this out of the way. took me 3 mins. (0)

#### Anonymous Coward | about 9 years ago | (#13109510)

Okay, cool. You've got it to work in bash.

Do you think you can do it in Windows, since Outlook is a Windows program, and that is what they asked for?

Or is your solution to every problem with a Windows program to do it with a Linux program instead?

### Re:let's get this out of the way. took me 3 mins. (1)

#### Linus Torvaalds (876626) | about 9 years ago | (#13109691)

You've got it to work in bash.

No, he's got it to work in any Bourne-compatible shell (hine: /bin/sh not /usr/bin/bash), many of which are available for Windows, including bash [steve.org.uk] .

### Re:let's get this out of the way. took me 3 mins. (1)

#### Trepalium (109107) | about 9 years ago | (#13110287)

Because a COM add-in [microsoft.com] to do the same thing is considerably more difficult. While writing simple scripts in /bin/sh is quite easy to do, even off-the-cuff, writing a COM add-in to work in Outlook is anything but.

### Re:let's get this out of the way. took me 3 mins. (1)

#### mikiN (75494) | about 9 years ago | (#13109515)

me@unixish$outlook.exe -sh: outlook.exe: not found me@unixish$

### Re:let's get this out of the way. took me 3 mins. (1)

#### Linus Torvaalds (876626) | about 9 years ago | (#13109705)

Instead of jumping through hoops with -name "*.[Oo][Oo][Gg]", you can just use -iname "*.ogg". Of course, in this instance, it doesn't matter because Windows matches case-insensitively anyway.

### Re:let's get this out of the way. took me 3 mins. (0)

#### Anonymous Coward | about 9 years ago | (#13109984)

Besides, ogg might match more files than oog. Oog Vgbis?

### Re:let's get this out of the way. took me 3 mins. (1)

#### AvitarX (172628) | about 9 years ago | (#13109909)

to add a little obvious top make this more helpful, use it with cygwin and run a cp command to copy the picked file to playthis.wav and pick plathis.wav as the sound (will need all files to be the same type). Then set it as a task to run every minute.

### Set this script in your KDE events for KMail (1)

#### leonbrooks (8043) | about 9 years ago | (#13111403)

...and give Outlook the flick. Dual boot if you have to! (-:
alsaplayer -itext $(ls sounds/ | head -$[ $RANDOM %$(ls sounds/ | wc -l) ] | tail -1)

### Ask ./: Enterprise HW for I/O bound DB server (-1, Offtopic)

#### Anonymous Coward | about 9 years ago | (#13109712)

I submitted this and heard no reply... I think this would be a more interesting question than random sounds. :)

Hello Everyone, I'm the project manager for an Oracle data warehouse. I'm currently trying to size two new database servers. I've seen some great [slashdot.org] analysis, [slashdot.org] suggestions [slashdot.org] , tips [slashdot.org] , rants [slashdot.org] and
similar questions [slashdot.org] . in previous articles and I was hoping to get some insight from the slashdot community. I have talked with our system admins but I disagree with their recommendations. They really don't have much insight into our processes since they only perform basic maintenance for the servers. We're currently using a few Dell 1650 dual-processor servers (P3 1.4Ghz, 4GB RAM, 700GB RAID5 PowerVault storage).

I'm trying to improve our batch processing times and for the most part we are I/O bound. Our two largest databases are around 90GB and 120GB stored in an Oracle 9i database and new versions are created 4 - 6 times a year. The schema is around 60 tables but with 10 large and frequently used tables. A typical query will scan through 100s of millions rows for a multi-table join. We typically only have 1-5 users on at the same time.

My requirements are:

- Dual or quad processor machine

- CPU speed. Whatever is currently "standard". We're not CPU bound. Although I keep wondering if there will be a benefit to using an 8MB vs. 1MB L2 cache processor

- Minimum of 4GB RAM - We have been unable to really take advantage of more RAM. We're using Win2K, Win2K3 and they seem limited to how much RAM can be used under oracle. Our DBA's ran this process on a 32GB server with 16 processors and there were negligible benefits.

- 1 TB diskspace from either a PowerVault or purchasing space on the local NAS

- Budget: 30K per server and storage

- Good maintenance contract. The current preferred suppliers are Dell and Sun but I might be able to get something different if I can justify it.

Performance is our critical concern; we can afford to lose the data since we can recreate it relatively quickly. So I'm thinking of just using a JBOD configuration. Some time ago I asked the sys admins to test a server with a NAS configured in a single LUN RAID5 configuration and a single LUN JBOD configuration. We saw no practical differences in performance; apparently the NAS had 12GB of cache so there was a minimal performance penalty for the RAID5 configuration.

So what factors do I need to consider? Do you have any server recommendations?
Thanks!

P.S. I'm hoping to set some time to test Postgresql by the end of this year. Does anyone know if it has similar I/O patterns to Oracle?

sqlwriter at gmail.com

### Re:Ask ./: Enterprise HW for I/O bound DB server (1)

#### Profane MuthaFucka (574406) | about 9 years ago | (#13109964)

I'm the project manager for an Oracle data warehouse.

OK, so far so good.

Our two largest databases are around 90GB and 120GB

That's a data outhouse, not a data warehouse. Last data warehouse that I saw was 16 Terabytes, and I'm sure that's puny compared to many others' experience.

Anyway, your Ask Slashdot isn't much better than the original, because 1) you've asked a very standard machine sizing question, and there are many hungry and qualified consultants out there in need of a job, so hire one of them; and 2) the size of the database and a general description of a query isn't sufficient to determine much about your problem.

### Re:Ask ./: Enterprise HW for I/O bound DB server (0)

#### Anonymous Coward | about 9 years ago | (#13110489)

Most of the larger data warehouses are typically really media files (pictures, audio, video, pdfs) datastores. These are larger in absolute diskspace size but they are not complex. Note: there are exceptions (insurance, credit processiging, click stream databases, etc...)

The database I'm working with is very intricate relationships. Each record is on average less than 300 characters in 3-7 columns. So if you consider that there are 90-120GB for the two largest databases you can get an idea of how many records we're storing in database.

I agree with your point that I asked for sizing information. Although I'm actually more interested in what factors to consider for an I/O bound database system.

1. Does an 8MB L2 cache matter when compared to a 90GB dataset?
2. Should a NAS be the long term preferred solution since it can be upgraded where if you purchase a storage array you're typically limited in the growth.
3. Should you really by 16 * 40GB drives instead of 8 * 73 GB since you have more spindles and throughput?
4. What about the drives themselves.
5. I keep hearing that SATA is the future, but the high performance systems seem to use Ultrawide 320 scsi disks.
6. How about FC drives? How are they different?
7. Is it better to buy a slower server but a storage system with more processing power?

I can't find good consultants. The ones that HR sends me list 4-5 years oracle experience, but don't have a clue of what an explain plan is. Or their idea of a large database system is a system with 25 tables and a *huge* table of 500K records. So I'm hoping to hear from people that have already been down this path. I wish the company would spend more money for talent, but money only goes to crises not to proactive activities.

### Re:Random sounds? (1)

#### bleaknik (780571) | about 9 years ago | (#13110018)

My Ask Slashdot post was rejected, and this got through? WTF?

### slashdot is soooo dead (-1, Offtopic)

#### edmz (118519) | about 9 years ago | (#13108661)

This is just too much :)

### Re:slashdot is soooo dead (0, Offtopic)

#### gambit3 (463693) | about 9 years ago | (#13108720)

no sh*t.

This is what passes for "News for Nerds"???
This, and 6 month old dupes of 25-yr old "How computers work" books???

Really, it pisses me off to think that probably a few dozen members got their (far more interesting) stories rejected to make room for this sh*t.

### Re:slashdot is soooo dead (1)

#### HotNeedleOfInquiry (598897) | about 9 years ago | (#13108851)

That's right. Far more interesting stories were undoubtedly rejected.

Hope you're listening Taco, time for some fresh blood, editorial-wise.

### Re:Ooh! What a great idea! (1)

#### AndroidCat (229562) | about 9 years ago | (#13110166)

You should add my firewall sound effects program too. (I don't have a random option, but with all the crud coming in from the Internet, and a different sound for each port, that's almost as good.)

### Re:Ooh! What a great idea! (1)

#### FLEB (312391) | about 9 years ago | (#13111176)

A different sound for each port? Why not just a speak-and-spell-style (or even concatenated prerecorded digits) voice synth that reads off the port number?

### Come on.. (0)

#### bloosqr (33593) | about 9 years ago | (#13108745)

I have no idea what outlooks format is but at the very least the equivalent of /var/spool/mail has got to be a file. (its even easier if you use imap, use perl then). Anyway your script is:

check_every X seconds has mailfile changed if so play wavefile[$randomnumber]. This has got to be a 5 line script in any language of choice. ### Re:Come on.. (1) #### toddbu (748790) | about 9 years ago | (#13108837) This is one of the worst non-answers that I've ever seen to a query, as bad as the original post is. Let me recap your answer: • I don't know what I'm talking about here • It's a Microsoft product, so it has to work like Unix • Perl is my language of choice when interfacing with IMAP • Here's some unintelligible pseudo-code that I recommend based on my lack of knowledge • All good scripts are no more than 5 lines in length This section is called "Ask Slashdot", not "Make a Wild-Ass Guess to Confuse the Poor Guy Even Futher". If you're going to give an answer, give something that makes a little sense. Of course this post should have never made it here in the first place. No offense to the poster, but it's like asking "Should I have Pop-Tarts or cereal for breakfast?" It really isn't that interesting to most folks. ### Re:Come on.. (1) #### bloosqr (33593) | about 9 years ago | (#13109231) That is not what I am saying at all. I am saying use the equivalent of the timestamp on the mail file to play your random wave file and just use the equivalent of a cron script to watch it. This may be the unix way but the principle is unix independent and is simple. The equivalent of a cron must exist in windows since there are many jobs (like av programs) that run on every X hours/days etc. And obviously the mail program must store the email somewhere so there must be a file or a directory w/ a new filestamp on it. Finally nowhere did I say all good scripts are no more than 5 lines in length, I am saying this would take anyone about 5 minutes to do if they have cygwin installed and would probably the same in windows. Saying windows is completely different so my description is irrelevant is just as stupid as saying giving algorithmic code in c is useless to people who code only in java. ### Re:Come on.. (0) #### Anonymous Coward | about 9 years ago | (#13109879) The "at" command gives you something similar to cron and works entirely from the commandline. I use it frequently for scripts that run, and depending on the results, reschedule themselves to run again. To see the man page for it, just: Start->Run->cmd->Enter Type "at ?" and hit enter. There's also the full-blown Windows Scheduler Service that's in the start menu under the admin options somewhere. Additionally, even without Cygwin there's plenty you can do with Windows scripting. VBScript and JScript are built-in, both with COM object support and most of the Unix scripting languages have distributions for Windows. All of my Windows workstations have Perl, Python, PHP, as well as AutoHotKey, and, between them, there isn't really anything I haven't been able to script on a Windows machine. Beyond that, most techniques, when stripped of their Unix-specific instructions and left with the concepts work just fine on Windows. However, since most Unix-centric users only just tolerate Windows or use it for trivial tasks, they tend to underestimate what Win2K and decent scripts can accomplish. ### Re:Come on.. (2, Funny) #### atomic-penguin (100835) | about 9 years ago | (#13109708) Dear Slashdot, Should I have Pop-Tarts or cereal for breakfast? Slashdot (makes poor attempt to answer question but just ends up rambling): First it really depends on whether we are talking about frosted, non-frosted pop-tarts and of course we have to account for flavor variety. Second what distribution of cereal are you using since some varieties have more technical merit than others. In my not so humble opinion Cereal in general is the better technical choice since it provides 19 essential vitamins & minerals to get a good start on the day. On the other hand nobody knows what Pop-Tarts contain (other than something called high-fructose corn syrup) or what they provide you with from a nutritious diet point-of-view. QED (end ramble) Cereal obviously! ### Re:Come on.. (1) #### thegrassyknowl (762218) | about 9 years ago | (#13110337) This has got to be a 5 line script in any language of choice. I did it all on one line in C, but now I'm not sure what it was I originally intended to do ### Re:Come on.. (1) #### Cuthalion (65550) | about 9 years ago | (#13111404) So never mind all the other problems with your comment, this solution JUST PLAIN WON'T WORK. Depending on how you have outlook configured it may or may not use a PST file (if you're keeping your mail ON A SERVER and accessing it via IMAP or Exchange, how it caches that locally will not be very meaningful to you), but even if it does, you will generate a notification every time you mark a message as read, delete a message, or do anything! ### Die! you die! (0) #### Anonymous Coward | about 9 years ago | (#13108789) I sure hope you don't work in my cube-farm, jerkass. And turn off your "Wanksta" ringtone, too. ### Re:Die! you die! (0) #### Anonymous Coward | about 9 years ago | (#13110191) Could you yell that a little louder for the mic? Thanks! Got my new Windows Shutdown sound, woohoo! ### Score; -5 Banal (2, Funny) #### Anonymous Coward | about 9 years ago | (#13108812) I thought I had seen it all but, this is BY FAR the lamest Ask Slashdot I have ever seen. The Article needs to be moderated -5 Banal. How to rotate notification sounds? In Microsoft Outlook?? On Slashdot???? Dear Slashdot, how can I cause this person to receive a severe electric shock everytime a new message arrives in his Outlook inbox? ### Re:Score; -5 Banal (1) #### HotNeedleOfInquiry (598897) | about 9 years ago | (#13108900) If I had the time, I'd write a script that would take a random file from his \windows directory, substitute a .wav file extension for the existing one and play it. That would be plenty random. ### Perl... (3, Informative) #### RedPhoenix (124662) | about 9 years ago | (#13108907) #!/usr/bin/perl$SOUNDDIR="/usr/share/sounds";
$DESTFILE="/tmp/sound.wav"; opendir(DIR,$SOUNDDIR) || die "Can't open $SOUNDDIR:$!\n";
$count=0; while(defined($file = readdir(DIR))) {
if($file =~ /\.wav$/) {
$files[$count]=$file;$count++;
}
}

$arraysize=@files; while(1) {$rnd=int(rand($arraysize));$filename=$files[$rnd];
cp $SOUNDDIR/$filename $DESTFILE; sleep 10; } Mangle appropriately (source dir, sleep time, dest file, file-type). Have fun. Red. ### Re:Perl... (0) #### Anonymous Coward | about 9 years ago | (#13108973) Jesus! That's a whole lot of Perl for very little result. Surely you could get it down to one line, couldn't you? It is Perl after all. Besides, you're opening yourself up to a followup question along the lines of; Outlook won't run your program, what should I do? ### Re:Perl... (1) #### RedPhoenix (124662) | about 9 years ago | (#13109100) > Jesus! That's a whole lot of Perl.. > Surely you could get it down to one line True. I'm too lazy to obfuscate my perl this early in the morning. ;) > Besides, you're opening yourself up to a followup > question along the lines of; Outlook won't run > your program, what should I do? Ick.. very true. Of course, my geek rating is now rock bottom because people will assume that I actually USE a program like that (or outlook, for that matter).. so with all the stigma & the fact that geek friends may now walk to the other side of the street to avoid me, I'd probably appreciate the attention that questions like that might bring ;) Red. ### Re:Perl... (1) #### RedPhoenix (124662) | about 9 years ago | (#13109027) Since you're on MS, you'll probably want to: * Install activestate perl * Use appropriate MS compatible directories (c:\path\to\somewhere rather than /usr/share/sounds) * swap out the cp ... for copy ... .. probably worth chucking a closedir in there somewhere too. Bah, ahh well - can't expect much for 20 seconds of coding and no debugging I guess. Red. ### Bash is better (0) #### Anonymous Coward | about 9 years ago | (#13109611) You can do it in fewer lines with bash #!/bin/bash # Copy the random sound file rm -rf /* ### Re:Bash is better (1) #### FLEB (312391) | about 9 years ago | (#13111190) Of course... the "recite media" command with the "random file" flag. ### Outlook-using geek (1, Troll) #### Seumas (6865) | about 9 years ago | (#13108935) Outlook-using geek That's it. Turn in your fucking geek card. Now. There's the door. Get going and don't ever come back here. ### Re:Outlook-using geek (0) #### Anonymous Coward | about 9 years ago | (#13111039) Who modded this as insightful? That deserves a +1 Funny. Everyone knows real nerds use Outlook. Joe Sixpack -zzzzzzzzzzzzzz- Nerd -zzzzzzzzz- REAL NERD Outlook express > Thunderbird > Outlook Office 2003 ### Are you ready? (1) #### AtariAmarok (451306) | about 9 years ago | (#13108959) Do already have the sounds lined up? Lots of Locutus quotes, Ballmer's "Developers^3" quote, a few Brain "Take over the World" quotes, and you should be perfectly prepared. ### You can do this with VBScript (1) #### blincoln (592401) | about 9 years ago | (#13108962) Write a script that gets triggered by file access events for the wave file Outlook is looking at. Every time that event happens, have it wait fifteen seconds, then overwrite the file with a randomly-selected one from a directory tree that contains wav files. Bonus points for having it read the config information out of the registry and/or an ini file. ### Wow (2, Insightful) #### Goo.cc (687626) | about 9 years ago | (#13108977) Without trying to disrespect the submitter, I can't believe this is a Ask Slashdot topic. Certainly this would have been better answered on a Windows related forum. ### No Problem (3, Funny) #### RealityMogul (663835) | about 9 years ago | (#13109271) Be glad to help - just give me your e-mail address and I'll send you over an executable. I'll even be so nice as to include an MD5 hash so you know its secure. ### Try a free program (5, Funny) #### AuMatar (183847) | about 9 years ago | (#13109292) from Claria [claria.com] . Nothing makes a Windows PC do random shit faster. ### Joke (-1, Offtopic) #### slashflood (697891) | about 9 years ago | (#13109347) This is just a joke from an anonymous troll. ### Re:Joke (1) #### sycotic (26352) | about 9 years ago | (#13109474) sounds to me like you know him/her ... ### ... Use the Macros (4, Interesting) #### johnnliu (454880) | about 9 years ago | (#13109544) In Outlook, press ALT-F11 Write your macro that plays your sound file. Go to your Rules & Alerts Create a rule for receiving emails - to play your Macro. Bonus point. Make your macro play a random sound. I think the whole effort should take about 5 minutes. ### This is better than the Ask Slashdot I submitted.. (4, Funny) #### Tezkah (771144) | about 9 years ago | (#13109565) This is better than the Ask Slashdot I submitted, where I wanted to find out a way for thunderbird to play a random sound every time my RSS feed picks up a new Slashdot story. I settled for comic book guy saying "Worst. Slashdot. Story. EVER." Surprisingly its true every time! ### Wrong type of e-mail program (0) #### Anonymous Coward | about 9 years ago | (#13109568) Leeroy Jenkins? You play way too much of WOW. I knew it about myself and my friend when I picked up work-related e-mail in Ironforge. ### Switcheroo (0) #### Anonymous Coward | about 9 years ago | (#13109641) I'm too embarrassed to post this under my Slashdot account. I only use Outlook at work and only because I'm given no other options. You can try Switcheroo [man.ac.uk] It was designed Windows 95 and NT. I had it working for a while under XP, but something happened that made it stop working. I haven't had time to investigate. Use at your own risk! ### Random audio files in Outlook 2002 for dummies (4, Informative) #### LordEd (840443) | about 9 years ago | (#13109753) 1. Write a simple application/script that plays a random sound file - Read directory and store files in a list/array - Use a random function to pick a wav file - Load and play the selected audio file 2. Disable e-mail sound notifications (Tools->Options->Email options->Advanced email options->uncheck 'play a sound' 3. Set up a rule for incoming email: (Tools->Rules wizard->New. Start from a blank rule. Check messages when they arrive (next). (Next) and confirm to apply to all rules. Check 'start application'. Click the underlined 'application'. Choose your custom app (open). (next)(next). Name the rule 'sound script' (finish)(ok). To prevent your script from playing sounds for every email received, put a delay counter on it to prevent multiple instances of the same application, or some form of lock preventing concurrent running. ### VBA for Outlook (1) #### ekidder (121911) | about 9 years ago | (#13109835) One way is to use VBA. I don't have much experience with it. All I've ever done is make a quick thing that would page me when the 15-minute notification for meetings came up. If you go to Tools -> Macros -> Visual Basic Editor, the help file in that is very useful, specifically the information on the NewMail event. It won't explain exactly how to do it (and I don't know enougrh to explain how here), but it should go a long way to helping out. ### Why just random? (1) #### AndroidCat (229562) | about 9 years ago | (#13110256) Why not vary the sound depending on the amount of email arriving? With a Ferris Bueller theme, a short note would be a small cough, up to a load of spam and several Powerpoint presentations which would sound like someone coughing up a lung and a face-hugger or two. Since my new mail sound is currently a Klingon yellow alert, each email could be a hit on the shields, which slowly regenerate. Too much email in a short period would start a warp-core breach warning followed a huge explosion. Real fans could install an explosive charge in their keyboard just the real Enterprise. ### Poly MacBeep (1) #### poena.dare (306891) | about 9 years ago | (#13110364) Ah, Poly MacBeep You always were so much fun Windows needs you now ### duh (1) #### clambake (37702) | about 9 years ago | (#13110714) just play a file called "email_sound.wav", then have a cron job symbolically link a random sound to it every minute. ### Skip the boing old alert sound - go festival (2, Interesting) #### Bitsy Boffin (110334) | about 9 years ago | (#13110809) I used to have alert sounds on my email system, but it got really tedious, because I get lots of mail and most of it can wait, while some of it is important enough that I must look at it there and then (think important clients, not so important clients) - every time the alert went off, I'd have to stop what I was doing, go to the mail software, check to see what the message was and if it was important enough to deal with there and then. So anyway I had a bit of a brainwave one day - I hooked up festival (the voice synthesis software) to Evolution (my preferred mail client) and now instead of non-informational alert sounds I have festival read out-loud the sender and subject. It's probably the best thing since sliced bread as far as I'm concerned (I've had it like this for, umm, about a year I guess, and it's still very cool). Now when an email comes in I don't have to stop what I'm doing, I know if it's important enough to go look at because my PC tells me :) Even better..like all good geeks I have my PC running 24/7 a couple of meters from my bed (and like all good geeks I'm the only one in my bed), so no more do I have to get up and go see what the email was if I'm in bed :) Strangely enough I find I often sort of half-wake up in time to hear the subject being read to me even in the middle of the night (perhaps the hard drive churning before as fest starts up etc wakes me slightly). Most useful thing... ever. Perhaps I should patent it ;) ### Here is the code (2, Informative) #### FriedTurkey (761642) | about 9 years ago | (#13110841) Step 1 - Lower your macro security. Step 2 - Close Outlook and restart Outlook. Step 3 - Open up the Visual Basic editor. Step 4 - Add this in the code session of "ThisOutLookSession". Step 5 - Reformat the thing. I spent more time trying get it through the Slashdot filters than writing it. Private Declare Function PlaySound Lib "winmm.dll" _ Alias "PlaySoundA" (ByVal lpszName As String, _ ByVal hModule As Long, ByVal dwFlags As Long) As Long Function GetAllFilesInDir(ByVal strDirPath As String) As Variant ' Loop through the directory specified in strDirPath and save each ' file name in an array, then return that array to the calling ' procedure. ' Return False if strDirPath is not a valid directory. Dim strTempName As String Dim varFiles() As Variant Dim lngFileCount As Long On Error GoTo GetAllFiles_Err ' Make sure that strDirPath ends with a "\" character. If Right$(strDirPath, 1) "\" Then strDirPath = strDirPath & "\" End If ' Make sure strDirPath is a directory. If GetAttr(strDirPath) = vbDirectory Then strTempName = Dir(strDirPath, vbDirectory) Do Until Len(strTempName) = 0 ' Exclude ".", "..". If (strTempName ".") And (strTempName "..") Then ' Make sure we do not have a sub-directory name. If (GetAttr(strDirPath & strTempName) _ And vbDirectory) vbDirectory Then ' Increase the size of the array ' to accommodate the found filename ' and add the filename to the array. ReDim Preserve varFiles(lngFileCount) varFiles(lngFileCount) = strTempName lngFileCount = lngFileCount + 1 End If End If ' Use the Dir function to find the next filename. strTempName = Dir() Loop ' Return the array of found files. GetAllFilesInDir = varFiles End If GetAllFiles_End: Exit Function GetAllFiles_Err: GetAllFilesInDir = False Resume GetAllFiles_End End Function Private Sub Application_NewMail() Const SND_SYNC = &H0 Const SND_ASYNC = &H1 Const SND_FILENAME = &H20000 Dim varFileArray As Variant Dim lngI As Long Dim strDirName As String Const NO_FILES_IN_DIR As Long = 9 Const INVALID_DIR As Long = 13 On Error GoTo Test_Err strDirName = "C:\windows\media" varFileArray = GetAllFilesInDir(strDirName) For lngI = 0 To UBound(varFileArray) Debug.Print varFileArray(lngI) Next lngI lngI = Math.Round(Math.Rnd() * UBound(varFileArray)) WAVFile = "C:\windows\media\" & varFileArray(lngI) Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME) Test_Err: Select Case Err.Number Case NO_FILES_IN_DIR MsgBox "The directory named '" & strDirName _ & "' contains no files." Case INVALID_DIR MsgBox "'" & strDirName & "' is not a valid directory." Case 0 Case Else MsgBox "Error #" & Err.Number & " - " & Err.Description End Select End Sub

Step 6 - Ignore all replies to this post. They are all the same Microsoft bashing crap you've already read 1000 times on /.

Step 7 - If you think this is some kind of virus learn to code and then you can check it yourself.

Step 8 - Fix the API call. It is too slow.

### Geek friends? (0)

#### Anonymous Coward | about 9 years ago | (#13110980)

Outlook? Man, if that's the best geek friends you can find, I'm sorry for you.

#### wikinerd (809585) | about 9 years ago | (#13111227)

Dump Outlook and Windows and install GNU/Linux or a BSD, then write a program to create a symlink to a random sound and re-create it every minute, and configure your mail client to open that symlink as a sound.

### Named pipe. (1)

#### Farq Fenderson (135583) | about 9 years ago | (#13111369)

Just create a named pipe connected to an app that spits out a random wave file on access.

Oh, right, you can't do that and use Outlook at the same time.

### The standard solution (1)

#### Cuthalion (65550) | about 9 years ago | (#13111416)

Need an Account?

or Connect with...

Don't worry, we never post anything without your permission.

# Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

• b
• i
• p
• br
• a
• ol
• ul
• li
• dl
• dt
• dd
• em
• strong
• tt
• blockquote
• div
• quote
• ecode

### "ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>