Re: 如何让JSL弹出对话框等待用户填写参数?你需要模态的选项。
A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.模态窗口等待响应;在它关闭之前你不能做任何其他事情。
Re: 如何让JSL弹出对话框等待用户填写参数?谢谢克雷格!
Re: 如何让JSL弹出对话框等待用户填写参数?文本编辑框,而不是数字编辑框。

另外,看看模态对话框,尤其是如何从模态对话框中获得答案。
Re: 如何让JSL弹出对话框等待用户填写参数?谢谢专家!

Re: 如何让JSL弹出对话框等待用户填写参数?对于模态,只需更改示例:
ex = New Window( "Dialog() example",
<<MODAL></MODAL>// because the window is modal, the window must be closed before the following code runs
If(
ex["button"] == 1, // not canceled
// then show the value
write(ex["variable"] ), // note: variable is the name of the variable holding the text edit box<BR />// else report no selection
write("CANCEL"); // cancel button or red X was pressed
);
脚本索引中的示例需要稍微重写才能更有用。 我已经解决了主要问题并在上面添加了评论。 主要问题是示例中的 if 子句是一个令人困惑的带有分号的双语句。
编辑:修复格式(出于某种原因,代码格式化程序想要弄乱最终的 else 语句)
Re: 如何让JSL弹出对话框等待用户填写参数?怎样才能使这个完整的操作成为可能呢?
谢谢专家!

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
ex = New Window( "Example: Text Edit Box",
Outline Box( "Picker Example",
H List Box( Text Box( "Label:" ), Text Edit Box() )
)
);
//Wait for me to input text "JANE"
na = EvalContextBox;//??The variable automatically retrieves the filled text
dt << Select Where( :name == na );
d3 = dt << Subset(
Output Table( "tmp" ),
Selected Rows( 1 ),
selected columns( 0 )
);
Re: 如何让JSL弹出对话框等待用户填写参数?这是一个工作示例。您需要包含 << 模态,为文本编辑框分配一个变量,并在用户退出模态对话框之前检索文本编辑框的值。
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
ex = New Window( "Example: Text Edit Box", << modal,
panel Box( "Picker Example",
H List Box(
Text Box( "Label:" ),
teb = Text Edit Box() ) ),
panel box("Options",
h list box(
ok_button = button box("OK", na = teb << get text),
canc_button = button box("Cancel", na = "")
)
)
);
show(na);
// Wait for me to input text "JANE"
dt << Select Where( :name == uppercase(na) );
d3 = dt << Subset( Output Table( "tmp" ), Selected Rows( 1 ), selected columns( 0 ) );Re: 如何让JSL弹出对话框等待用户填写参数?有两种相互竞争的方法。
@pmroz示例显示了一种使用 << 模态对话框的方法。OK 按钮上的 JSL 回调函数将对话框中的值复制到全局变量中。
上面的几个答案,我使用了 <
Re: 如何让JSL弹出对话框等待用户填写参数?ex=New Window("",<<MODAL></MODAL>回复:如何让JSL弹出对话框等待用户填写参数?我可以在 JSL 参数中调整对话框的起始宽度吗?
- 谢谢专家!
ex=New Window("",<<MODAL></MODAL><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-04-07_09-58-22.png" style="width: 469px;"><span class="lia-inline-image-display-wrapper" image-alt="2023-04-07_09-58-22.png" style="width: 469px;"><img src="https://us.v-cdn.net/6038925/uploads/images/51793i66A7DA8932565CE0/2023-04-07_09-58-22.png" role="button" title="2023-04-07_09-58-22.png" alt="2023-04-07_09-58-22.png" /></span></SPAN>
如何让JSL弹出一个对话框并等待用户填写参数?单个JSL如何让它在运行时弹出一个对话框,当我填写文本时,它可以读取内容并将其传递给变量并继续运行?
谢谢!
高级统计建模自动化和脚本编写内容组织