I'trying to use a mouse button to toggle between edit mode on off. I'm using [hid] to get the mouse button and I can send the message to a specified window name.
But how can I send it to the current window that I am working in?
What would I have to use instead of "windowname"?
[s pd-"windowname"]
Thanks, Ingo
Thanks for the suggestion!
[active] can only tell if the current window has the focus or not.
[active] together with [window_name] can actually send the current window name as soon as it gets activated but that would require placing an abstraction in every single patch and subpatch. I have a huge amount of abstractions and subpatches so that is kind of out of the question.
Somehow Pd has to keep track of which window is currently opened and active. Isn't there a way to get that window / sub patch name without sending it from the actual subpatch itself?
Alternatively - is there a way to send letters or ASCII characters from within Pd to Pd? Like CTRL + E for edit mode or anything else that can be done by QWERTY key commands?
Ingo
On 08/28/13 06:25, Ingo wrote:
Somehow Pd has to keep track of which window is currently opened and active.
not really. pd-gui (tcl/tk) handles all those things. if it detects an event on window "foo", it will send a message to Pd with the receiver "foo".
so Pd is quit agnostic about which window is currently open, and allows for multiple windows to send events "simulatenously".
i've been exploiting this in Peer Data, to allow M users patch on N windows at the same time (usually N<=M).
gfmasdr IOhannes