[proFit-list] changing x and y axis range with applescript?

Dave glasspusher at outofoptions.net
Tue Dec 7 10:25:17 CST 2010


Hi Kurt,
	That's progress, but I'm still running into trouble. I can't seem to access any of the properties of a curve. One thing I'm wondering, are "first" and "last" reserved keywords in Applescript?

See below. Thanks!

Dave


tell application "pro Fit 6.2.1"
	-- these compile but don't execute
	get line dash of xAxis of curves 1 of shape "1" of window 1
	get name of xAxis of curves 1 of shape "1" of window 1
	set ax to xAxis of curves 1 of shape "1" of window 1
	-- these don't compile
	get first of xAxis of curves 1 of shape "1" of window 1	
	set first of ax to -10
end tell

Error:

error "pro Fit 6.2.1 got an error: Cannot handle this object class. [System error -1723]" number -1723 from line dash of xAxis of curves 1 of shape "1" of window 1

On Dec 6, 2010, at 8:41 PM, Kurt Sutter wrote:

> Dave 
> 
> Try
> 
> get xAxis of curves 1 of shape "1"
> 
> Regards
> 
> Kurt Sutter
> QuantumSoft
> 
> On 6. Dec 2010, at 17:12, Dave wrote:
> 
>> Hi all,
>> 
>> I'm trying to write an applescript that will change the Y1 and Y2 range of a graph.
>> 
>> I see that a graph is represented by the "shape" class, and I figure if I can get the first curve of that, I can get the axis to which it is associated. An "axis" class has properties "first" and "last" which denote the start and end coordinate of that axis, respectively.
>> 
>> However, my plan is hitting a snag. I can't seem to get the first curve of a shape:
>> 
>> 	set curveBall to curves 1 of shape "1"
>> 
>> 
>> error "pro Fit 6.2.1 got an error: Apple event was not handled. [System error -1708]" number -1728 from curves 1 of shape "1"
>> 
>> I can't even find what error -1728 means. Am I accessing the "curves" property correctly? Is this a reasonable way to get to the axes to change their range? 
>> 
>> Any and all help, much 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: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20101207/096121ea/attachment.html>


More information about the proFit-list mailing list