Thanks, It works perfect!
I've adapted Roman Cheplyaka's answer to my case, it works also good, but after a while, I've noticed that it writes to xmobar and also to ~/.xsession-errors, maybe I've missed something.
Later, I've seen your answer, tried it and saw it writes only to xmobar and not to ~/.xsession-errors anymore so I keep it.

--- En date de : Sam 23.5.09, Johannes Höhn a écrit :
, Run Com "bash" ["~/system/mpc.sh"] "mpc" 10
worked fine for me with
#! /bin/sh
echo -n "$(mpc --format "%file%" | head -n 1)"