I have attached an updated version of Win Screen which fixes the bug
where Screen exits and reports that it can not find the Matlab command
window.
Best,
Allen
PS. For the curious, here is the comment I added to source code,
explaing the details.
where Screen exits and reports that it can not find the Matlab command
window.
Best,
Allen
PS. For the curious, here is the comment I added to source code,
explaing the details.
> 10/17/02 awi Changed GetMATLABCommandWindow() to use
> EnumWindows(). Xuemei Zhang exploited
> an undocumented usage of FindWindow() where the window
> class string passed
> was NULL. This worked until Windows XP. Note that we
> can't know the class
> name and use FindWindow() because newer versions of
> Matlab do not use a static string for that but
> instead construct it at runtime. (It seems to be
> storing window pointers in the window class string ! Ack!)
> So instead we enumerate all top-level windows and
> choose one with a title bar
> containing (case insensitive) the substring "MATLAB
> COMMAND". Doing a case insensitive substring search
> should make GetMATLABCommandWindow() more robust to
> any future changes Mathworks might make to the name of the
> command window, and it solves the problem in a simple
> way of dealing with existing variants.