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에서 이것이 가능하다면 예를 들어 주시겠습니까?
자동화 및 스크립팅