JSL:ポップアップウィンドウからのユーザー入力に基づいて変数を定義しますこんにちは、
ユーザーがコードにアクセスせずに変数を定義できるポップアップウィンドウを作成したいと思います。 以前の投稿に基づいてユーザーエントリを取得するためにポップアップを取得できましたが、変数に渡すことができませんでした。
これを手伝ってくれませんか。
前もって感謝します
// Indicate here the name of the input HTML table
input_table = "http://xxx.html";
// Indicate here the name you want for your JMP data table
JMP_table_name = "JMP data table";
w = New Window( "User inputs", // 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( "Report Generator" ) ), // a second title, centered
Spacer Box( size( 1, 30 ) ), // a little vertical space
H List Box( Text Box( "input_table: " ), input_table=Text Edit Box("http://xxx.html") ), // data entry
Spacer Box( size( 1, 30 ) ), // a little vertical space
H List Box( Text Box( "JMP_table_name: " ), JMP_table_name=Text Edit Box("JMP data table") ), // more data entry
Spacer Box( size( 1, 30 ) ), // a little vertical space
H Center Box( // center the button
Button Box( "Submit", // this script runs when the button is pressed...
input_table = result["input_table"];
JMP_table_name = result["JMP_table_name"];
w << closeWindow; // close the dialog
)
)
)
)
);スクリプティングRe:JSL:ポップアップウィンドウからのユーザー入力に基づいて変数を定義しますスクリプトにはいくつかの問題があります。1つ目は、Input_table変数とJMP_table_name変数のデータ型を変更することです。最初は文字列として定義されますが、次にそれらを表示フィールドとして再定義します。
次に、JMPがウィンドウを開いているという理由だけで、JSL処理を停止せず、ユーザー入力を待ちます。ウィンドウがモーダルウィンドウとして定義されていない限り、JMPは処理を続行します。以下のスクリプトの変更を参照してください。時間をかけてスクリプトガイドを読むことを強くお勧めします。
// Indicate here the name of the input HTML table
input_table = "http://xxx.html";
// Indicate here the name you want for your JMP data table
JMP_table_name = "JMP data table";
w = New Window( "User inputs", <<MODAL></MODAL>
Re:JSL:ポップアップウィンドウからのユーザー入力に基づいて変数を定義しますどうもありがとう!
私が犯した間違いを説明してくれてありがとう。これは間違いなく将来それを通して私を助けます。
良い一日を過ごしてください!
Re:JSL:ポップアップウィンドウからのユーザー入力に基づいて変数を定義しますこんにちは、
私は別の問題に飛びつきました。
モーダルウィンドウを開くことができ、input_tableとJMP_table名のスクリプト内で新しい変数定義を渡しました。
変数を調べてみると、正しく更新されていることがわかります。
次に、スクリプトの残りの部分は、ユーザーが指定したテーブルを(ボタンの外側で)開くなどのアクションを実行することになっていますが、実行されません。
スクリプト全体をモーダルウィンドウに入れてみました。wait()も追加してみましたが、これは役に立ちません。
モーダルウィンドウなしでスクリプトを実行すると、正常に機能するため、問題は間違いなくそこから発生します。
これを解決する方法はありますか?
これがコードです。
// Initialize variables with default values
// Number of input data tables (default = 1)
nb_join_tables = 2;
//links to the input HTML tables
input_table_01 = "http://xxx.html";
input_table_02 = "http://xxx.html";
//Create a pop up window to request user inputs for the variables
w = New Window( "User inputs", <<MODAL></MODAL>
Re:JSL:ポップアップウィンドウからのユーザー入力に基づいて変数を定義します私は解決策を見つけました。 数値には「テキスト編集ボックス」と「テキストの取得」を使用しました。 「番号編集ボックス」と「取得」に変更しましたが、動作します。:
// Initialize variables with default values
// Number of input data tables (default = 1)
nb_join_tables = 2;
//links to the input HTML tables
input_table_01 = "http://xxx.html";
input_table_02 = "http://xxx.html";
//Create a pop up window to request user inputs for the variables
w = New Window( "User inputs", <<MODAL></MODAL>