Re: スクリプト ウィンドウを開かずにキャンセル ボタンだけを表示して、他のスクリプトを呼び出して実行する JSL スクリプトを作成するにはどうすればよいですか?これであなたが求めていることが行われるはずです。 JMP はコンピューター上のフォルダー内のすべてのスクリプトを非常に迅速に実行したため、キャンセル ボタンが機能するかどうかは確認していません。
/*JMP STATISTICAL DISCOVERY LLC (“JMP”) PERMITS THE USE OF THIS COMPUTER SOFTWARE CODE (“CODE”) ON AN AS-IS BASIS AND AUTHORIZES YOU TO USE THE CODE SUBJECT TO THE TERMS LISTED HEREIN. BY USING THE CODE, YOU AGREE TO THESE TERMS. YOUR USE OF THE CODE IS AT YOUR OWN RISK. JMP MAKES NO REPRESENTATION OR WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRIGEMENT, AND TITLE, WITH RESPECT TO THE CODE.
You may use the Code solely as part of a software product you currently have licensed from JMP, JMP’s parent company SAS Institute Inc. (“SAS”), or one of JMP’s or SAS’s subsidiaries or authorized agents (the “Software”), and not for any other purpose. The Code is designed to add functionality to the Software but has not necessarily been tested. Accordingly, JMP makes no representation or warranty that the Code will operate error-free. JMP is under no obligation to maintain, support, or continue to distribute the Code.
Neither JMP nor its licensors shall be liable to you or any third-party for any general, special, direct, indirect, consequential, incidental, or other damages whatsoever arising out of or related to your use or inability to use the Code, even if JMP has been advised of the possibility of such damages. Except as otherwise provided above, the Code is governed by the same agreement that governs the Software. If you do not have an existing agreement with JMP or SAS governing the Software, you may not use the Code.
JMP and all other JMP Statistical Discovery LLC product or service names are registered trademarks or trademarks of JMP Statistical Discovery LLC in the USA and other countries. ® indicates USA registration. Other brand and product names are registered trademarks or trademarks of their respective companies.
*/
Names Default To Here( 1 );
//get scripts to run
lstScripts = Files In Directory( "$Documents/My Scripts/" );
//set up stop button
nw = New Window( "Running",
Text Box( "Running all the scripts" ),
Button Box( "Cancel", Stop() )
);
For Each( {i}, lstScripts,
If( Word( -1, i, "." ) == "jsl", //make sure it's a .jsl file
include( "$Documents/My Scripts/" || Char( i ) ); //run it
Wait( 0 ); //this allows JMP to recognize if cancel button has been pressed
)
);
nw << close window;Re: スクリプト ウィンドウを開かずにキャンセル ボタンだけを表示して、他のスクリプトを呼び出して実行する JSL スクリプトを作成するにはどうすればよいですか?@Jed_Campbellありがとう、
あなたのスクリプト(以下のわずかに変更されたバージョン)がパス内のメインスクリプトをどのように呼び出すのかはわかりません。
私の場合、メイン スクリプトは他のすべてのスクリプトを呼び出します。 これが私が必要とする機能です。
また、スクリプトで生成されたウィンドウ (nw) のメイン スクリプトに表示されたログ (下部) をキャプチャして表示することは可能ですか。 いずれにせよ、私の場合、元のスクリプトと変更された以下のスクリプトは機能しませんでした。
Names Default To Here( 1 );
path2Scripts = "C:\Users\UserName\Documents\Scripts_v0.1.4"; //change this as necessary
//get scripts to run
lstScripts = Files In Directory(path2Scripts);
//set up stop button
nw = New Window( "Running", << modal,
Text Box( "Running all the scripts" ),
Button Box( "Cancel", Stop() )
);
For Each( {i}, lstScripts,
If( Word( -1, i, "." ) == "jsl", //make sure it's a .jsl file
include( path2Scripts || Char( i ) ); //run it
Wait( 0 ); //this allows JMP to recognize if cancel button has been pressed
)
);
nw << close window;私は何を取りこぼしたか?
Re: スクリプト ウィンドウを開かずにキャンセル ボタンだけを表示して、他のスクリプトを呼び出して実行する JSL スクリプトを作成するにはどうすればよいですか?ああ、最初の質問を誤解していたようです。 私が提供したスクリプトは、キャンセル ボタンを表示し、フォルダー内のすべてのスクリプトを実行します。 私の理解が正しければ、他のすべてのスクリプトを実行するためのスクリプトがすでに作成されているということになります。 この場合、このファイルのスクリプトは次のようになります。
//!
//the //! comment on the first line causes the script to run, rather than open
Names Default To Here (1);
clear log();
//set up stop button
nw = New Window( "Running", << modal,
Text Box( "Running all the scripts" ),
Button Box( "Cancel", Stop() )
);
include("path/to/main/scipt.jsl"); //your file that runs all the scripts
logtxt = get log();
wait(0); を必ず挿入してください。メイン スクリプト ファイル内のステートメント。 そうしないと、JMP ではキャンセル ボタンが機能しない可能性があります。
Re: スクリプト ウィンドウを開かずにキャンセル ボタンだけを表示して、他のスクリプトを呼び出して実行する JSL スクリプトを作成するにはどうすればよいですか?JSL を自動実行するための鍵は、これをスクリプトの最初の行に追加することです。
//!
スクリプトをダブルクリックするとスクリプトが実行されますが、スクリプト ファイルは開きません。
たとえば、これを空のスクリプトに貼り付けて保存し、それをダブルクリックします。
//!
Speak("ha, ha, I just ran a script.");スクリプト ウィンドウを開かずにキャンセル ボタンだけを表示して、他のスクリプトを呼び出して実行する JSL スクリプトを作成するにはどうすればよいですか?myScript.jslというJSLスクリプトを作成したいのですが、ダブルクリックして開くと、スクリプトウィンドウでそれ自体が開かれませんが、「スクリプト実行中」と停止するための「キャンセル」ボタンを表示するモーダルウィンドウを表示しながら、myScript.jsl内で呼び出される他のスクリプトを実行します。更なる実行。
これが JSL で可能であれば、例を教えていただけますか?
自動化とスクリプト作成