이 스크립트 목록을 표현식에 올바르게 삽입하는 방법은 무엇입니까?안녕하세요 여러분,
사용자가 편집할 수 있고, 텍스트 편집 상자(TEB)의 개수와 내용, 그리고 여러 개의 아웃라인 상자 아래에 반복될 수 있는 텍스트 편집 상자의 내용을 가져오는 스크립트를 작성하려고 합니다.
제가 겪고 있는 어려움은 TEB 파일들의 스크립트를 목록 형태로 성공적으로 추출한 후, 그 목록을 스크립트 명령으로 삽입하여 새 창에서 실행하고 싶다는 것입니다 (기본적으로 TEB 파일의 내용과 형식을 복사해서 저장하는 것이죠). 하지만 이 부분을 어떻게 해야 제대로 삽입/대체하고 새 창에 표시할 수 있을지 모르겠습니다.
//Example list that would track the name of OBs that could potentially change
OB_Titles={"Title 1", "Title 2"};
//Example window where there would be grabbable text boxes - these can vary in number
report_win=new window("Test", Text_OB=Outline Box(OB_Titles[1],
Text Edit Box("1"),
Text Edit Box("2"),
Text Edit Box("3"),
));
//Grabbing the reference of the boxes using the OB title list in order to get references to the TEBs
text_boxes = report_win <<
XPath("//OutlineBox[normalize-space(text())='" || OB_Titles[1] || "']//TextEditBox");
text_box_script=text_boxes<
<GET script=""></GET>
제목: 이 스크립트 목록을 표현식에 올바르게 삽입하는 방법안녕 벤,
제가 생각하기에 당신이 하려는 작업을 수행하는 한 가지 방법(물론 여러 가지 방법이 있겠지만)은 새 창 스크립트에서 vlistbox에 대한 핸들을 만들고 창이 나타나면 각 텍스트 상자를 추가하는 것입니다.
건배,
브래디
Names Default to Here(1);
OB_Titles={"Title 1", "Title 2"};
//Example window where there would be grabbable text boxes - these can vary in number
report_win=new window("Test", Text_OB=Outline Box(OB_Titles[1],
Text Edit Box("1"),
Text Edit Box("2"),
Text Edit Box("3"),
));
//Grabbing the reference of the boxes using the OB title list in order to get references to the TEBs
text_boxes = report_win <<
XPath("//OutlineBox[normalize-space(text())='" || OB_Titles[1] || "']//TextEditBox");
text_box_script=text_boxes<
<GET script=""></GET>
제목: 이 스크립트 목록을 표현식에 올바르게 삽입하는 방법또는 나중에 사용할 새 창 표현식을 만들려면 다음과 같이 할 수 있습니다.
nwExpr = Expr(
New Window( "Test",
Outline Box( "Parent OB", comm_OB = Outline Box( OB_Titles[1],
_VLB_SPEC ) )
)
);
// build up the vlistbox with its arguments
vlbExpr = Expr( V List Box() );
For Each( {s}, text_box_script, Insert Into( vlbExpr, Name Expr( s ) ) );
// once built, substitute into nwExpr
substitute Into (nwExpr, expr(_VLB_SPEC), nameexpr(vlbExpr));
// to show the window, evaluate nwExpr
nwExpr;