[proFit-list] getting number of rows of a data window in applescript

Dave glasspusher at outofoptions.net
Sat Jun 11 10:53:37 CDT 2011


Hi Chris,
	Thanks. I'll keep an eye out for this. I had a bad recent experience working with Python at a real crummy job, and am trying to mentally disentangle the language from the experience ;)

Does pro Fit work well with a standard Python install? One thing that annoyed me about Python on a mac and numpy (although I could be mistaken) was it seemed I had to add library upon library using macports for the stuff I was using at the old place, due to what seemed to be a library incompatibilities with the standard mac Python install. What a pain in the neck.

Cheers,
	Dave

On Jun 4, 2011, at 5:26 AM, Chris Lee wrote:

> Note that this will, as far as I recall, return the number of rows in a window, independently of whether or not it has data in it. So if you have 200 rows, and only the first 175 are used, nrRows will still return 200. If you need to take that into account, then I recommend using some of the masked array functions in numpy.
> 
> Cheers
> Chris
> 
> I am responsible for the concept of this email. Unfortunately, autocorrect is responsible for the contents.
> 
> On Jun 3, 2011, at 5:38 PM, Dave Sopchak <dsopchak at enervault.com> wrote:
> 
>> Far out! 
>> 
>> Apparently, I was trying too hard. 
>> 
>> Thanks, Scott.
>> 
>> Dave
>> 
>> On Jun 3, 2011, at 8:32 AM, Scott Lasley wrote:
>> 
>>> This works for me in Snow Leopard with the latest version of proFit
>>> 
>>> tell application "pro Fit 6.2.4" to get nrRows of window 1
>>> 
>>> hth,
>>> Scott
>>> 
>>> On Jun 3, 2011, at 10:48 AM, Dave Sopchak wrote:
>>> 
>>>> Hi all,
>>>>   I'm trying to write a script to get the number of rows in a data window, so I can select the first half. None of the below methods are working for me- nothing seems to be able to return the number of rows in a data window. Any ideas? Thanks.
>>>> 
>>>> Dave
>>>>   --get index of last row of window 1
>>>>   --select last row of window 1
>>>>   --get index of selected row of window 1
>>>>   --return count of properties of window 1
>>>>   --get nrRows of properties of window 1
>>> 
>>> 
>>> _______________________________________________
>>> 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




More information about the proFit-list mailing list