こんにちは、みんな
XPATH 関数と使用された JMP JSL ヘルプに関するいくつかの議論を確認した後、以下のスクリプトが表示されました。
変動グラフからデスクトップ フォルダへのグラフを PNG ファイルとしてコピーするためのこのスクリプトを共有したいと考えました。
これは、乗算グラフを含むレポートを作成するときに非常に役立ちます。
これが他のプラットフォームで機能するための主要かつ重要なパラメータは、outlinebox 関数で「xpath」関数と対応する f(i) 関数を分割するために使用される数値です。
この場合、xpath 分割数は = 2 でした。
f(i) = 2*i-1。
//-------------------------
Clear Log();
Names Default To Here( 1 );
while( 1,
If( Is Directory( "$DESKTOP/Graph" ) == 0,
//if no directory -> create folder and display Message
rc = Create Directory( "$DESKTOP/Graph" );
//copy graphs
for( i = 1, i <= N Items( Current Report() << XPath( "//OutlineBox" ) ) / 2, i++,
Current Report()[Outline Box( 2 * i - 1 )] << Save Picture(
"$DESKTOP/Graph/Graph" || Char( i ) || ".PNG", "PNG"
);
Wait( 0.001 );
);
//display Message
New Window( "Message",
modal,
H List Box(
Spacer Box( size( 5, 0 ) ),
Text Box( "All graphs are saved at new folder at Desktop/Graph" )
)
);
//if there is directory -> check if empty if no break if yes continue
,
if( N Items( Files In Directory( "$DESKTOP/Graph" ) ) > 0,
New Window( "Message",
modal,
H List Box( Spacer Box( size( 5, 0 ) ), Text Box( "Please empty folder DESKTOP/Graph" ) )
);
Break();
,
//copy graphs
for( i = 1, i <= N Items( Current Report() << XPath( "//OutlineBox" ) ) / 2, i++,
Current Report()[Outline Box( 2 * i - 1 )] << Save Picture(
"$DESKTOP/Graph/Graph" || Char( i ) || ".PNG", "PNG"
);
Wait( 0.001 );
);
//display Message
New Window( "Message",
modal,
H List Box(
Spacer Box( size( 5, 0 ) ),
Text Box( "All graphs are saved at new folder at Desktop/Graph" )
)
);
)
);
Break();
);
//-------------------------