On 02/12/2010 11:45 AM, Thomas Adam wrote:
> On 12 February 2010 10:34, Nathan Hüsken <f...@lonely-star.org> wrote:
>   
>> I am getting there, just a little piece missing.
>> For testing, I did:
>> AddToFunc Tile
>> +   I SetEnv cur_x $[w.x]
>> +   I SetEnv cur_y $[w.y]
>> +   I SetEnv cur_width $[w.width]
>> +   I SetEnv cur_height $[w.height]
>> +   I All PipeRead 'echo $[cur_x] $[w.x] >> ./test_out'
>>
>> In the hope that $[w.x] in "All" would apply to the context of the
>> window all is calling on currently.
>> But the result is, the $[cur_x] $[w.x] both give me the x position of
>> the current focused window.
>>     
> Depends how you're calling it.  I suspect what you're doing is trying
> to run that function in a window-context -- that is something like
> this:
>
> Pick Tile
>
> Which is the same thing, as if you'd invoked this from a menu on a
> window, for instance.    What you probably want to do is call it like
> this:
>
> NoWindow Tile
>
> Which would force the function to run in the context of the root
> window, allowing the All command to work as you might expect.
>   
Hey,

You just made my day. Calling a function with NoWindow did it!
Thanks!
Nathan

Reply via email to