사용자 입력을 새 변수로 설정안녕하세요,
사용자 입력을 받아 이러한 입력을 데이터 테이블로 출력하는 스크립트를 만들려고 합니다.
아래 내 스크립트는 데이터 테이블을 출력하지만 사용자 변수를 삽입하지 않습니다. 삽입하는 방법을 오해하고 있는 것 같아 누군가 도움을 줄 수 있을까요?
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
)
)
)
)
);해석학데이터 테이블스크립팅Re: 사용자 입력을 새 변수로 설정로그를 확인하면 꽤 좋은 오류 메시지가 표시됩니다.
다음은 일부 지원 인쇄가 있는 고정 스크립트일 수 있습니다(<< get selected 이외의 값을 가져오고 새 테이블에 다른 방식으로 값을 설정함).
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
)
)
)
)
);
스크립트에 따라 모달 창 사용을 고려하는 것도 좋은 생각일 수 있습니다.
Re: 사용자 입력을 새 변수로 설정감사합니다. 스크립트의 주요 아이디어는 이 두 변수를 별도의 스크립트에 입력하는 것입니다.
ID의 첫 번째 변수가 작동하지만 날짜가 작동하지 않는 것 같습니다.