[proFit-list] want to cycle through all windows and perform an action on the data windows
pro Fit Support
profit at quansoft.com
Thu Jan 5 23:23:26 CST 2023
Dear Dave
Happy new year to you, too.
Use the property “type” of the window object. The following script iterates through all document windows and flags the ones that are data windows:
w = pf.NextWindow(0)
while w != 0:
o = pf.GetWindowObject(window = w)
print ("found: ", o.name)
if o.type == pf.dataWindow:
print (" -> is a data window with", o.nrRows, "rows and", o.nrCols, "columns")
w = pf.NextWindow(w)
Hope this helps.
Best regards
Kurt
QuantumSoft
> On 5 Jan 2023, at 20:40, Dave <glasspusher at outofoptions.net> wrote:
>
> Hi folks,
>
> Happy new year to all.
>
> 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.
>
> I was thinking of iterating through all windows (pf.NextWindow), checking if it was a data window, if so, running the script, but…
>
> …I don’t see where I can query a window as to if it’s a data window or not
>
> 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?
>
> Maybe I’m missing something.
>
> Any help is appreciated
>
> Dave
>
>
> _______________________________________________
> proFit-list mailing list
> proFit-list at quantum-soft.com
> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20230106/28288202/attachment-0001.html>
More information about the proFit-list
mailing list