Hi,
I'm running an installation that has to startup a pd patch on unattended
boot (in Windows2000), and then accept keyboard inputs (via [key]).
However, the console window gets the focus by default. I've found some
previous answers to this question, but they don't work. I've tried sending
"vis 1" messages with loadbang, and that opens up windows, but does not
give them primary focus in Windows.
It seems like when the console has the focus (as on startup), focus can
never be transferred to patch windows by "vis 1" messages. Only when a
patch window has focus (e.g., after clicking in it), the "pd-mypatch vis
1" message makes subpatches appear _and_ get focus.
I've tried this in both 0.37 and 0.38. No difference, it seems.
Any hints or workarounds?
Thanks,
Palle Dahlstedt
Hallo, Palle Dahlstedt hat gesagt: // Palle Dahlstedt wrote:
It seems like when the console has the focus (as on startup), focus can
never be transferred to patch windows by "vis 1" messages. Only when a
patch window has focus (e.g., after clicking in it), the "pd-mypatch vis
1" message makes subpatches appear _and_ get focus.
I think, there also is a "click" message to "pd-mypatch", but I cannot access the docs right now. Maybe that helps. If not, I'm sure toxy can help.
Frank Barknecht _ ______footils.org__
Hi,
I'll answer this myself, to tell how I solved the problem. I tried
everything within PD (except toxy, which was beyond my time-fram to
understand and get up and running), but did not succeed in getting the
patch window to be the active window on startup.
Instead, I found the freeware, open-source automation tool AutoIt (for
win), which can (among loads of other things) activate any window based on
substrings in the window title. So I made a small script that is started
in the background. It waits for the PD patch window to open, and when it
exists, it makes it active. Then I loop this script, since M*cr*s*ft may
try to put some dialog on top. So if the PD patch looses focus, it will
instanly get it back. The background script ends when the patch window is
closed (which it isn't).
All this, to make keyboard input - or rather soldered-in IR motion
detector relays - possible in an unattended installation.
Maybe of help to someone.
/Palle
On Thu, 18 Nov 2004 11:25:26 +0100, Frank Barknecht fbar@footils.org
wrote:
Hallo, Palle Dahlstedt hat gesagt: // Palle Dahlstedt wrote:
It seems like when the console has the focus (as on startup), focus can never be transferred to patch windows by "vis 1" messages. Only when a patch window has focus (e.g., after clicking in it), the "pd-mypatch vis 1" message makes subpatches appear _and_ get focus.
I think, there also is a "click" message to "pd-mypatch", but I cannot access the docs right now. Maybe that helps. If not, I'm sure toxy can help.
Ciao