From glasspusher at outofoptions.net Thu Jan 5 13:40:50 2023 From: glasspusher at outofoptions.net (Dave) Date: Thu, 5 Jan 2023 11:40:50 -0800 Subject: [proFit-list] want to cycle through all windows and perform an action on the data windows Message-ID: <2022F279-41C5-4241-AAB1-383D70E5B18C@outofoptions.net> 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 From profit at quansoft.com Thu Jan 5 23:23:26 2023 From: profit at quansoft.com (pro Fit Support) Date: Fri, 6 Jan 2023 06:23:26 +0100 Subject: [proFit-list] want to cycle through all windows and perform an action on the data windows In-Reply-To: <2022F279-41C5-4241-AAB1-383D70E5B18C@outofoptions.net> References: <2022F279-41C5-4241-AAB1-383D70E5B18C@outofoptions.net> Message-ID: <99117BDE-30E8-4185-A3FD-F79CAD7DC08B@quansoft.com> 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 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: From glasspusher at outofoptions.net Fri Jan 6 10:00:01 2023 From: glasspusher at outofoptions.net (Dave) Date: Fri, 6 Jan 2023 08:00:01 -0800 Subject: [proFit-list] want to cycle through all windows and perform an action on the data windows In-Reply-To: <99117BDE-30E8-4185-A3FD-F79CAD7DC08B@quansoft.com> References: <2022F279-41C5-4241-AAB1-383D70E5B18C@outofoptions.net> <99117BDE-30E8-4185-A3FD-F79CAD7DC08B@quansoft.com> Message-ID: Hi Kurt, Thanks, that looks like it does the job. 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. Dave > On Jan 5, 2023, at 9:23 PM, pro Fit Support wrote: > > 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 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 > > _______________________________________________ > 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: From profit at quansoft.com Fri Jan 6 13:57:11 2023 From: profit at quansoft.com (pro Fit Support) Date: Fri, 6 Jan 2023 20:57:11 +0100 Subject: [proFit-list] want to cycle through all windows and perform an action on the data windows In-Reply-To: References: <2022F279-41C5-4241-AAB1-383D70E5B18C@outofoptions.net> <99117BDE-30E8-4185-A3FD-F79CAD7DC08B@quansoft.com> Message-ID: <2BAE202F-B9C2-4727-8724-6330D6433DAD@quansoft.com> Right, Dave This is documented in the online help under GetWindowProperty and SetWindowProperties. We will try to make this clearer in the documentation for the next minor update. Best Kurt > On 6 Jan 2023, at 17:00, Dave wrote: > > Hi Kurt, > Thanks, that looks like it does the job. > > 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. > > Dave > >> On Jan 5, 2023, at 9:23 PM, pro Fit Support wrote: >> >> 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 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 >> >> _______________________________________________ >> proFit-list mailing list >> proFit-list at quantum-soft.com >> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com > > _______________________________________________ > 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: From profit at quansoft.com Mon Feb 6 23:09:07 2023 From: profit at quansoft.com (pro Fit Support) Date: Tue, 7 Feb 2023 06:09:07 +0100 Subject: [proFit-list] [Ann] pro Fit 7.1.4 Message-ID: <23A1C66A-CCC3-4C9A-AB34-09702DFA045F@quansoft.com> Dear pro Fit users We have just released pro Fit 7.1.4. This update comes with a major new feature, code completion: when working on a new function or writing scripts in Pascal or Python, pro Fit will now display a list of calls matching what you just started typing. You can then select one, see their definitions, arguments, and some help text, and quickly insert them into your code by hitting the tab key. In addition, pro Fit 7.1.4 comes with some other minor improvements and fixes: - Better reporting of the script instructions that triggered a run-time error in Python - Added an example file illustrating how to import and export binary data using Python - Improved the stability of the Python interpreter - Various bug fixes. If you obtained pro Fit from the App Store, version 7.1.4 will be installed with your next update. If you downloaded it from our website, the update is at https://quansoft.com/pro-fit-downloads/ Best regards Your QuantumSoft team -------------- next part -------------- An HTML attachment was scrubbed... URL: From glasspusher at outofoptions.net Tue Feb 7 09:51:43 2023 From: glasspusher at outofoptions.net (Dave) Date: Tue, 7 Feb 2023 07:51:43 -0800 Subject: [proFit-list] [Ann] pro Fit 7.1.4 In-Reply-To: <23A1C66A-CCC3-4C9A-AB34-09702DFA045F@quansoft.com> References: <23A1C66A-CCC3-4C9A-AB34-09702DFA045F@quansoft.com> Message-ID: <5BB7FB2B-6C8D-48E8-A3B5-0F6AEAA3AA93@outofoptions.net> Thanks! Spiffy new web site you have there! > On Feb 6, 2023, at 9:09 PM, pro Fit Support wrote: > > Dear pro Fit users > > We have just released pro Fit 7.1.4. > > This update comes with a major new feature, code completion: when working on a new function or writing scripts in Pascal or Python, pro Fit will now display a list of calls matching what you just started typing. You can then select one, see their definitions, arguments, and some help text, and quickly insert them into your code by hitting the tab key. > > In addition, pro Fit 7.1.4 comes with some other minor improvements and fixes: > > - Better reporting of the script instructions that triggered a run-time error in Python > - Added an example file illustrating how to import and export binary data using Python > - Improved the stability of the Python interpreter > - Various bug fixes. > > If you obtained pro Fit from the App Store, version 7.1.4 will be installed with your next update. If you downloaded it from our website, the update is at https://quansoft.com/pro-fit-downloads/ > > > Best regards > > Your QuantumSoft team -------------- next part -------------- An HTML attachment was scrubbed... URL: From profit at quansoft.com Tue Feb 7 10:52:45 2023 From: profit at quansoft.com (pro Fit Support) Date: Tue, 7 Feb 2023 17:52:45 +0100 Subject: [proFit-list] [Ann] pro Fit 7.1.4 In-Reply-To: <5BB7FB2B-6C8D-48E8-A3B5-0F6AEAA3AA93@outofoptions.net> References: <23A1C66A-CCC3-4C9A-AB34-09702DFA045F@quansoft.com> <5BB7FB2B-6C8D-48E8-A3B5-0F6AEAA3AA93@outofoptions.net> Message-ID: Thanks! An overhaul of the website was long overdue. Best Kurt QuantumSoft > On 7 Feb 2023, at 16:51, Dave wrote: > > Thanks! Spiffy new web site you have there! > > >> On Feb 6, 2023, at 9:09 PM, pro Fit Support wrote: >> >> Dear pro Fit users >> >> We have just released pro Fit 7.1.4. >> >> This update comes with a major new feature, code completion: when working on a new function or writing scripts in Pascal or Python, pro Fit will now display a list of calls matching what you just started typing. You can then select one, see their definitions, arguments, and some help text, and quickly insert them into your code by hitting the tab key. >> >> In addition, pro Fit 7.1.4 comes with some other minor improvements and fixes: >> >> - Better reporting of the script instructions that triggered a run-time error in Python >> - Added an example file illustrating how to import and export binary data using Python >> - Improved the stability of the Python interpreter >> - Various bug fixes. >> >> If you obtained pro Fit from the App Store, version 7.1.4 will be installed with your next update. If you downloaded it from our website, the update is at https://quansoft.com/pro-fit-downloads/ >> >> >> Best regards >> >> Your QuantumSoft team > > _______________________________________________ > 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: