안녕 모두
XPATH 기능에 대한 몇 가지 논의를 검토하고 JMP JSL을 사용한 후 아래 스크립트와 함께 도움말이 나왔습니다.
변동성 차트에서 데스크탑 폴더로 그래프를 PNG 파일로 처리하기 위한 이 스크립트를 공유하고 싶었습니다.
이것은 곱셈 그래프로 보고서를 작성할 때 정말 도움이 됩니다.
이것이 다른 플랫폼에서 작동하기 위한 주요 매개변수는 "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();
);
//-------------------------