thanks! it worked! but I was trying to make a continuous volume controller with a "kind-of-slider", and it's very slow the command until the execution of the line ends. So I'll try to make a shortcut (keystroke) or something..
EDIT: I have seen some addon to keyboard emulate or maybe i'll try to use Osculator.