On Thu, 28 Sep 2006 13:20:32 +0200 Dominique Michel <[EMAIL PROTECTED]> wrote:
> DestroyFunc Mixer-Volume > AddToFunc Mixer-Volume > + I SetEnv x "$0" > + I PipeRead "echo SetEnv y $(( $[x]/1000000 ))" > + I Exec exec xmessage x: $[x] > + I Exec exec xmessage y: $[y] > + I Exec exec $[A_Player] --volume $[y] The above can certainly be changed such that: DestroyFunc Mixer-Volume AddToFunc Mixer-Volume + I PipeRead 'echo exec exec $[A_PLAYER] --volume $(($0/100000))' Note that if you (as I do), have ExecUseShell to use zsh, then you get arithmetic floting-point stuff for free. ;) > But the shell output integer number in y, it mean only 1 or 0. It will if you use bash, because that doesn't support floating-point arithmetic. > And it is even worse, because when I run > > $ echo 500000/1000000|bc -l > > the shell output is always > > .50000000000000000000 That's not the shell outputting that -- that's simply the result from the command bc. > and that even when I use the french locales. > > Is it possible to get this script to work in any locale case? I am not even understanding how this is a locale-specific issue. -- Thomas Adam
