このスクリプトリストを式に正しく挿入する方法こんにちは、みんな、
私は、アウトライン ボックスに含まれるテキスト編集ボックスとその内容を取得できるスクリプトを書こうとしています (これはユーザーが編集でき、任意の数の 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>
Re: このスクリプトリストを式に正しく挿入するにはどうすればいいですか?こんにちは、ベン。
あなたがしようとしていることを実行する 1 つの方法 (多くの方法があると思いますが) は、新しいウィンドウ スクリプトで 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>
Re: このスクリプトリストを式に正しく挿入するにはどうすればいいですか?あるいは、後で使用するために新しいウィンドウ式を作成する場合は、次のようにします。
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;