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 : ポップアップ ウィンドウからのユーザー入力に基づいて変数を定義する解決策を見つけました。 数値には「Text Edit Box」と「Get Text」を使用しました。 「Number Edit Box」と「Get」に変更したところ、動作しました。:
// 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 : ポップアップ ウィンドウからのユーザー入力に基づいて変数を定義するこんにちは、
追加の問題に飛び込みました。
なんとかモーダル ウィンドウを開き、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 : ポップアップ ウィンドウからのユーザー入力に基づいて変数を定義するどうもありがとうございます!
私が犯した過ちを説明してくれてありがとう。これは間違いなく将来的に役立ちます。
良い一日を過ごしてください!
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>