[PD] activate patch window at startup?

Palle Dahlstedt palle at ituniv.se
Mon Nov 22 15:24:57 CET 2004


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 at 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



-- 
***********************************
Palle Dahlstedt
Composer, Ph.D.
IT University, Chalmers University of Technology
Innovative Design / Art & Technology Program
Goteborg, Sweden

Art & Science Research Fellow,
Department of Computer Science
Liverpool University
Liverpool, U.K.




More information about the Pd-list mailing list