您可以訪問報告的Helpkey值嗎?我想確認一個報告是某個平台,比如雙變量,如果標題被更改,Helpkey似乎有我想要的信息。如果我不能使用幫助鍵,還有另一種方法可以確認嗎?我能弄清楚的唯一方法是驗證有2個連續軸。
也許一種不同的方法可行。 此腳本查看所有打開的窗口以查找報告並顯示其腳本。 該腳本告訴您如何重新創建報告,並且可能還包含您需要的信息。
// get a list of open windows
wlist = Window();
// some of them might be platforms
For( i = 1, i <= N Items( wlist ), i += 1,
ob = Try( wlist[i][Outline Box( 1 )] );
// see if there is an outline box
If( Type( ob ) == "DisplayBox",
// the outline box might be a platform owner,
// see if it is a scriptable object
platform = ob << getscriptableObject;
If( Type( platform ) == "Scriptable",
// found one. display its script
Show( platform << getscript );
s = platform << getscript;
If( Head( s ) == Expr( distribution() ),
If(
Head( Arg( s, 1 ) ) ==
Expr( ContinuousDistribution ),
Print( "ok" );//
, //
Print( "no" );//
)//
, //
Print( "not close" )
);
);
);
);
有幾個窗口打開,有兩個報告:
platform << getscript = Bivariate(Y(:weight), X(:height), Fit Line({Line Color({213, 72, 87})}));
"not close"
platform << getscript = Distribution(Continuous Distribution(Column(:weight)), Nominal Distribution(Column(:age)));
"ok"
該腳本作為表達式返回;您既可以使用表達式函數來研究它,也可以將其轉換為帶有char()的字符串,並使用字符函數來研究它。
c = char(NameExpr(s)); // convert to character
"Distribution(Continuous Distribution(Column(:weight)), Nominal Distribution(Column(:age)))"
contains(c,"Nominal Distribution") // find location of text
56