こんにちは、みんな
XPATH関数に関するいくつかの議論を検討し、JMPを使用した後、JSLヘルプが以下のスクリプトで出てきました。
変動チャートからデスクトップフォルダへのグラフをPNGファイルとして処理するためのこのスクリプトを共有したかった。
これは、乗算グラフを使用してレポートを作成するときに非常に役立ちます。
これが他のプラットフォームで機能するための主要かつ重要なパラメーターは、「xpath」関数と対応するf(i)関数をoutlinebox関数で分割するために使用される数値です。
この場合、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();
);
//-------------------------