<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Kurt,<div><span class="Apple-tab-span" style="white-space:pre"> </span>Thanks, that looks like it does the job.</div><div><br></div><div>So the GetWindowObject call can query the same properties that are listed under the Pascal GetWindowProperty call? I think that’s where I didn’t look for answers.</div><div><br></div><div>Dave</div><div><div><br><blockquote type="cite"><div>On Jan 5, 2023, at 9:23 PM, pro Fit Support <profit@quansoft.com> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Dear Dave<div><br></div><div>Happy new year to you, too.</div><div><br></div><div>Use the property “type” of the window object. The following script iterates through all document windows and flags the ones that are data windows:</div><div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255); min-height: 13px;"><br></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(18, 139, 39); background-color: rgb(255, 255, 255);"><span style="">w = </span>pf.NextWindow<span style="">(0)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255); min-height: 13px;"><br></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);"><span style="color: #0000c0">while</span> w != 0:</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(18, 139, 39); background-color: rgb(255, 255, 255);"><span style=""> o = </span>pf.GetWindowObject<span style="">(</span><span style="color: #118987">window</span><span style=""> = w)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);"> <span style="color: #128b27">print</span> (<span style="color: #535353">"found: "</span>, <span style="color: #118987">o</span>.name)</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);"> <span style="color: #0000c0">if</span> o.type == <span style="color: #bf5105">pf.dataWindow</span>:</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(83, 83, 83); background-color: rgb(255, 255, 255);"><span style=""> </span><span style="color: #128b27">print</span><span style=""> (</span>" -> is a data window with"<span style="">, </span><span style="color: #118987">o</span><span style="">.nrRows, </span>"rows and"<span style="">, </span><span style="color: #118987">o</span><span style="">.nrCols, </span>"columns"<span style="">)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(18, 139, 39); background-color: rgb(255, 255, 255);"><span style=""> w = </span>pf.NextWindow<span style="">(</span><span style="color: #118987">w</span><span style="">)</span></div><p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(18, 139, 39); background-color: rgb(255, 255, 255);"> </p><div><br></div><div>Hope this helps.</div><div><br></div><div>Best regards</div><div><br></div><div>Kurt</div><div>QuantumSoft</div><div><br></div><div><br><blockquote type="cite"><div>On 5 Jan 2023, at 20:40, Dave <glasspusher@outofoptions.net> wrote:</div><br class="Apple-interchange-newline"><div><div>Hi folks,<br><span class="Apple-tab-span" style="white-space:pre"> </span><br>Happy new year to all. <br><br>I have a Python script that does some calculations on a data window, and would like to have it act on all data windows that are open. <br><br>I was thinking of iterating through all windows (pf.NextWindow), checking if it was a data window, if so, running the script, but…<br><br>…I don’t see where I can query a window as to if it’s a data window or not<br><br>pf.FrontmostWindow(type) is as close as I see to finding out if a window is a data window, but how do I find out what types all windows are without moving them from the back?<br><br>Maybe I’m missing something. <br><br>Any help is appreciated <br><br>Dave<br><br><br>_______________________________________________<br>proFit-list mailing list<br>proFit-list@quantum-soft.com<br>http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com<br></div></div></blockquote></div><br></div></div>_______________________________________________<br>proFit-list mailing list<br>proFit-list@quantum-soft.com<br>http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com<br></div></blockquote></div><br></div></body></html>