将 put 中的用户设置为新变量你好,
我正在创建一个脚本,它接受用户输入并将这些输入输出到数据表中。
我下面的脚本输出一个数据表,但不插入用户变量,有人能够提供帮助,因为我认为我可能误解了如何插入它。
v1 = text = " ID"; // two numbers with default
w = New Window( "Synch Request", // opens a window with a title and this content...
Border Box( top( 20 ), bottom( 20 ), Left( 20 ), Right( 20 ), // window dressing
V List Box( // V and H lists nest to organize the display boxes
H Center Box( Text Box( "Please select the tool you wish to view and the date to view from" ) ), // a second title, centered
Spacer Box( size( 1, 30 ) ), // a little vertical space
H List Box( Text Box( "Tool: " ), tool = Text Edit Box( v1 ) ), // data entry
Spacer Box( size( 1, 10 ) ), // a little vertical space
H List Box( Text Box( "Date: " ), date = Calendar Box( ) ), // more data entry
Spacer Box( size( 1, 30 ) ), // a little vertical space
H Center Box( // center the button
Button Box( "Execute", // this script runs when the button is pressed...
// make a new table with the values...
tool_val = tool << GetSelected();
date_val = date << GetSelected();
dt = New Table( "Untitled",
New Column( "a", Character, Set Values( tool_val ) ),
New Column( "b", Numeric,
"Continuous",
//Required due to original format
Format("y/m/d h:m:s"), Set Values( {date} ) ) );
// optionally, close the dialog. Or, you might want to run it again...
w << closeWindow; // just the dialog, not the report
)
)
)
)
);高级统计建模自动化和脚本编写消费者和市场研究实验设计大规模定制质量和工艺工程回复:将 put 中的用户设置为新变量查看日志,什么内容
show(date_val);
打印?
对于日期问题也可以采用以下格式:
Format("y/m/d h:m:s"),
有时 JMP 对格式可能有点挑剔。 您可以从“b”列中删除格式,然后查看它是否用 datenum 值填充该行。 然后您可以尝试从格式菜单中查看可用的格式。


回复:将 put 中的用户设置为新变量它适用于 Windows 10 上的 JMP 15 和 JMP 16。JMP 的版本以及操作系统是什么?
回复:将 put 中的用户设置为新变量谢谢,该脚本的主要思想是将这两个变量输入到单独的脚本中。
我的第一个 ID 变量有效,但日期似乎不起作用。
回复:将 put 中的用户设置为新变量查看日志,它给出了很好的错误消息。
这里可能是带有一些支持打印的固定脚本(我得到的值不是 << 被选中的值,而且我还以不同的方式将值设置为新表)。
Names Default To Here(1);
v1 = text = " ID"; // two numbers with default
w = New Window("Synch Request", // opens a window with a title and this content...
Border Box(top(20), bottom(20), Left(20), Right(20), // window dressing
V List Box( // V and H lists nest to organize the display boxes
H Center Box(Text Box("Please select the tool you wish to view and the date to view from")), // a second title, centered
Spacer Box(size(1, 30)), // a little vertical space
H List Box(Text Box("Tool: "), tool = Text Edit Box(v1)), // data entry
Spacer Box(size(1, 10)), // a little vertical space
H List Box(Text Box("Date: "), date = Calendar Box()), // more data entry
Spacer Box(size(1, 30)), // a little vertical space
H Center Box( // center the button
Button Box("Execute", // this script runs when the button is pressed...
// make a new table with the values...
tool_val = tool << get text;
show(tool_val);
date_val = date << get date;
show(date_val);
dt = New Table("Untitled",
New Column("a", Character, Values(Eval List({tool_val}))),
New Column("b",
Numeric,
"Continuous",
//Required due to original format
Format("y/m/d h:m:s"),
Values(Eval List({date_val}))
)
);
// optionally, close the dialog. Or, you might want to run it again...
w << closeWindow; // just the dialog, not the report
)
)
)
)
);
根据您的脚本,考虑使用模式窗口可能也是一个好主意