ユーザーからの入力を求めるテキスト ボックスを表示するにはどうすればよいですか?こんにちは、
データを分析する基本的なスクリプトを作成しようとしています。
スクリプトにリンクされているサムネイルを押すと、
1. ユーザーに範囲を入力するように依頼します。
2. 最大値と最小値を示すデータテーブルを作成します。
3. 最小値、最大値、ターゲットを含むグラフを生成します。
これまでのところ、私にできることは、データ テーブルまたはグラフのスクリプトを取得し、それを JMP のショートカットに個別に組み込むことだけです。 ユーザーにクエリを生成するボックスを生成する方法がわかりません。また、グラフとデータ テーブルを一緒に組み込むこともできません。 これに役立つ基本的なチュートリアル セットをアドバイスしていただけますか?
敬具、
イレイナ
Re: ユーザーからの入力を求めるテキスト ボックスを表示するにはどうすればよいですか。こんにちは、ジャーモさん
再度、感謝します! もう 1 つの質問: ファイルパス文字列の定義テキストで userFirstName と userLastName を使用するとスクリプトは機能するのに、b1、b2 を使用すると機能しないのはなぜですか。
// Defining firstname and lastname string
userFirstName = "XXXX";
userLastName = "YYYY";
//changing username variables based on user input
w = New Window( "Defining User Name", <<MODAL></MODAL>
最高、
遅い
Re: ユーザーからの入力を求めるテキスト ボックスを表示するにはどうすればよいですか。モーダル ウィンドウを使用していて、それを閉じるのが「早すぎる」ため、このエラーが発生します。 モーダル ウィンドウは、基本的に特定のボタン タイトルを使用する必要がある特別なタイプのウィンドウです。スクリプトガイド > ツリーの表示 > JSL のモーダル ウィンドウ > モーダル ウィンドウの構築
注記:モーダル ウィンドウには、ウィンドウを閉じるためのボタンが少なくとも 1 つ必要です。 使用できますわかりました、はい、いいえ、 またはキャンセルモーダルウィンドウのボタンにラベルを付けるには。 モーダル ウィンドウにこれらのボタンの少なくとも 1 つが含まれていない場合、JMP はわかりましたボタン。
w << closeWindow; を削除します。 [文字列の更新] ボタンから。 そのボタンを押したときにウィンドウを閉じたい場合(OKボタンが不要になります)、OKボタンを追加してクリックメッセージを送信します。 必要に応じて [OK] ボタンを非表示にすることもできると思います
Names Default To Here(1);
// Defining firstname and lastname string
userFirstName = "XXXX";
userLastName = "YYYY";
//changing username variables based on user input
w = New Window("prototype",
<<MODAL></MODAL>
Re: ユーザーからの入力を求めるテキスト ボックスを表示するにはどうすればよいですか。こんにちは、ジャーモさん
ありがとう! これはとてもうまくいきました! しかし、さらに 2 つの問題に遭遇しました。 それらを説明するとしたら、次のようになります。
// Defining firstname and lastname string
userFirstName = "XXXX";
userLastName = "YYYY";
//changing username variables based on user input
w = New Window( "prototype", <<MODAL></MODAL>
まず、更新文字列を押すと正しいテーブルが吐き出されますが、エラーもスローされます。

次に、変数 userFirstName と userLastName を使用するとスクリプトは「機能」します。つまり、変数 userFirstName と userLastName を使用すると複数のファイルのインポートが実行されますが、連結文字列で b1、b2 を使用すると機能しません。 理由については、(テキスト編集ボックスを使用して) b1、b2 変数を定義するために使用している部分がローカルであるためだと思います。 b1、b2 変数は残りのスクリプトに存在し続けないのでしょうか? その場合、それらをグローバル変数として存在させるにはどうすればよいですか。
どうすればエラーを解消できますか? ウィンドウに << モーダル句を追加したことが原因のようです。 ただし、スクリプトを一時停止して、オペレーターが名前の入力が正しいかどうかを確認できるようにするには、これを行う必要があります。
理想的には、私が構築しようとしているワークフローは次のとおりです。
ユーザーがスクリプトを実行する
スクリプトはポップアップ ボックスを表示し、ユーザーに姓名を定義するよう求めます。
このスクリプトを使用すると、ユーザーは自分のエントリが正しいことを確認できます (現在の出力よりも filePathString を表示する方が適切です)。
ユーザーが [OK] をクリックした後、スクリプトは続行され、いくつかの異なる filePathString の新しい変数を使用します。
私の目的に合わせてこのスクリプトにデータ入力テキスト ボックスを組み込む方法は他にもたくさんありますので、ご協力いただければ幸いです。
ありがとう、
遅い
Re: ユーザーからの入力を求めるテキスト ボックスを表示するにはどうすればよいですか。Send がテーブルに「評価」されているため、そこに送信されます (<< を意味します)送信() )おそらく、リストを Eval List() でラップしてそこにある値を評価するだけで十分でしょう。
Names Default To Here(1);
// Defining firstname and lastname string
userFirstName = "XXXX";
userLastName = "YYYY";
//changing username variables based on user input
w = New Window("prototype", // 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("First Name: "), b1 = Text Edit Box(userFirstName)), // data entry
Spacer Box(size(1, 10)), // a little vertical space
H List Box(Text Box("Last Name: "), b2 = Text Edit Box(userLastName)), // more data entry
Spacer Box(size(1, 30)), // a little vertical space
H Center Box( // center the button
Button Box("Update Strings", // this script runs when the button is pressed...
// make a new table with the values...
dt = New Table("StringCheck",
New Column("Name",
Character,
Set Values(Eval List({b1 << get text(), b2 << get text()}))
)
);
// optionally, close the dialog. Or, you might want to run it again...
w << closeWindow; // just the dialog, not the report
)
)
)
)
);
Re: ユーザーからの入力を求めるテキスト ボックスを表示するにはどうすればよいですか。こんにちは、クレイジさん
古いスレッドに返信しても大丈夫だと思います。 後でスクリプト内で文字列として使用する変数を作成したいと思っています(ユーザーに応じて変更されるファイルインポート用のユーザーディレクトリ)。これを達成するためにスクリプトを調整しようとしています。
この考え方は、変数が最初にデフォルト値を使用して作成されるということです。 次に、入力ボックスが表示され、ユーザーが値を変更すると、スクリプトが続行され、インポートで更新された変数が使用されます。
//Import multiple files
Multiple File Import(
<<SET folder=""></SET>
したがって、以下はスクリプトの最初に記述されます。
// Defining firstname and lastname string
userFirstName = "XXXX";
userLastName = "YYYY";
//changing username variables based on user input
w = New Window( "prototype", // 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( "First Name: " ), b1=Text Edit Box( userFirstName ) ), // data entry
Spacer Box( size( 1, 10 ) ), // a little vertical space
H List Box( Text Box( "Last Name: " ), b2=Text Edit Box( userLastName ) ), // more data entry
Spacer Box( size( 1, 30 ) ), // a little vertical space
H Center Box( // center the button
Button Box( "Update Strings", // this script runs when the button is pressed...
// make a new table with the values...
dt = New Table( "StringCheck", New Column( "Name", Character, Set Values( {b1<< get text(), b2 << get text()} ) ) );
// optionally, close the dialog. Or, you might want to run it again...
w << closeWindow; // just the dialog, not the report
)
)
)
)
);データ入力ウィンドウと、文字列「Name」を持つ StringCheck というテーブルを正常に取得しましたが、2 つの値は「Send」です。

機能させるためにいくつかのことを試しましたが、「送信」がどこから来ているのか一生わかりません。
助けていただければ幸いです、ありがとう、
遅い
Re: ユーザーからの入力を求めるテキスト ボックスを表示するにはどうすればよいですか。うーん。 そのJSLをテストしたのだろうか。 NumberEditBox は、フィールドが変更されても v1/v2 変数を更新しないため、レポートは常に同じになります。 これは次のようにあるべきです:
v1 = 30; // two numbers with default
v2 = 40; // values; these will go in a data table
w = New Window( "prototype", // 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( "value 1: " ), b1=Number Edit Box( v1 ) ), // data entry
Spacer Box( size( 1, 10 ) ), // a little vertical space
H List Box( Text Box( "value 2: " ), b2=Number Edit Box( v2 ) ), // more data entry
Spacer Box( size( 1, 30 ) ), // a little vertical space
H Center Box( // center the button
Button Box( "make report", // this script runs when the button is pressed...
// make a new table with the values...
dt = New Table( "Untitled", New Column( "a", Set Values( {b1<<GET></GET>
ボックスを記憶するための追加の b1 変数と b2 変数、およびこれらのボックスへの <
The report isn't created until after the button is pressed. Artistic license.ボタンが押されるまで、レポートは作成されません。 芸術的ライセンス。
Re: ユーザーからの入力を求めるテキスト ボックスを表示するにはどうすればよいですか。このスレッドには別のインスタンスがあるようですここ。 そこに投稿した返信もご覧ください。
Re: ユーザーからの入力を求めるテキスト ボックスを表示するにはどうすればよいですか。JMP では、カスタム プロンプトを使用してモーダル ダイアログまたは非モーダル ダイアログを作成できます。
モーダル ダイアログでは、完了するまで他のことはできません。 http://www.jmp.com/support/help/Modal_Windows.shtml
非モーダル ダイアログを使用すると、他のウィンドウで作業し、後でモードレス ウィンドウに戻ることができます。 http://www.jmp.com/support/help/Constructing_Display_Trees.shtml#259363
あなたが説明する内容の非モーダルなプロトタイプは次のようになります。
v1 = 30; // two numbers with default
v2 = 40; // values; these will go in a data table
w = New Window( "prototype", // 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( "value 1: " ), Number Edit Box( v1 ) ), // data entry
Spacer Box( size( 1, 10 ) ), // a little vertical space
H List Box( Text Box( "value 2: " ), Number Edit Box( v2 ) ), // more data entry
Spacer Box( size( 1, 30 ) ), // a little vertical space
H Center Box( // center the button
Button Box( "make report", // this script runs when the button is pressed...
// make a new table with the values...
dt = New Table( "Untitled", New Column( "a", Set Values( {v1, v2} ) ) );
// launch a platform to analyze the data...
dt << Distribution( Continuous Distribution( Column( :a ), Quantiles( 0 ), Summary Statistics( 0 ), Vertical( 0 ), Outlier Box Plot( 0 ) ) );
// optionally, close the dialog. Or, you might want to run it again...
w << closeWindow; // just the dialog, not the report
)
)
)
)
);
Prototype dialogプロトタイプダイアログ