![]() |
Random SMS sound
I was wondering if anybody knew of a program or simple script that can intercept SMS and play a random audio file from a folder.
I have a lot of funny audio clips and wanted to have them play at random when i get an SMS. Now i have already made a few scripts in the past but my memory sometime works like RAM and gets "reset" and im drawing blanks on how to even do DBUS right now, even thou i made something like this for the simple brightness in the past. |
Re: Random SMS sound
Quote:
To put it simply you would need to use a script triggered by dbus. You need to use either dbus-scripts, dbuscron or a custom script with some kind of loop and dbus-monitor. When your script intercepts the 'sms received' dbus message it needs to use awk, sed, grep, etc to alter the config file for a given profile. So, populate list of folder of random sounds then replace reference to sound in profile config. |
Re: Random SMS sound
yes that sounds like what i was thinking, my thinking where in the line of turning off sms tone an having the script take over like custom brightness (version 1 :) )
|
Re: Random SMS sound
This is not quite what you want but might be simpler to implement. Instead of choosing the file when the SMS arrives, choose it for the next SMS that will arrive. A casual user won't notice any difference.
Now how do you do that? You can employ some dbus magic but the simplest approach is, run a cron job that will periodically link the SMS notification file to the next file in your folder. If you receive SMS randomly (as most people do), the effect will be a random file played on the next SMS. |
Re: Random SMS sound
Thanks, i actually like the idea of "next sms" it seems as "less" work for the N900 as it does not have to do it in "real time".
Now i just have to read up on all the DBUS again...., damm this memory |
Re: Random SMS sound
dbus-monitor and a test sms is usually what I use to "remember" what to look for when the dbus fires :p
|
Re: Random SMS sound
yes i know, just haven’t had the time yet... :(
but when i do ill post in post #1 the "results" |
Re: Random SMS sound
well i been busy or something, but now after almost a year i think i will complete this.... :p
and so far i have this working FOR TESTING!! Code:
#! /bin/sh |
Re: Random SMS sound
/home/user/.profiled/custom.ini :), will post when i get it working with random (or next audio file)
EDIT: nope not that ini file.... |
Re: Random SMS sound
Well... trying to edit a conf to change next does not work....
but adapting my random script for my old diy alarm that would play random sounds from a folder until a random code had been entered to stop it. Code:
#! /bin/sh |
Re: Random SMS sound
Why not just make the SMS sound silence? Then you don't need a click sound.
|
Re: Random SMS sound
Success with the method of changing next SMS sound.
Code:
#! /bin/sh |
All times are GMT. The time now is 09:57. |
vBulletin® Version 3.8.8