MATLAB Programming/Psychtoolbox/Screen Commands/GetWindowByTitle

Usage:

[windowPtr,rect]=Screen('GetWindowByTitle',title);

Get window pointer for window with specified title.