在 JSL 中提取 jmp 文件的目录大家好,
我已经设法以一种令人费解的方式(使用单词和字符操作)做我想做的事,但我觉得必须有一种更简单的方法来做到这一点。 我想要的只是使用 JSL 中的 Pick File 功能提取我刚刚选择的文件的目录,以便下次从该目录开始。 有什么建议??
谢谢,伊夫
脚本编写Re: 在 JSL 中提取 jmp 文件的目录查看脚本索引中的 Files in Directory() 函数

Re: 在 JSL 中提取 jmp 文件的目录抱歉我按错了按钮!!! 不幸的是,这不是解决方案@txnelson . 这仅列出已知目录的文件。 我想浏览以找到我想要的文件,一旦我选择了它,我想保存目录,以便下次我想浏览时,它从上一个目录开始。
干杯,伊夫
Re: 在 JSL 中提取 jmp 文件的目录看看我下面的脚本,告诉我我是否越来越接近你想要的。
Names Default To Here( 1 );
theDirectory = "";
xx = Pick File( "Pick a File", theDirectory );
theDirectory = Substr( xx, 1, Length( xx ) - Length( Word( -1, xx, "\/" ) ) - 1 );
// now this Pick File will go to the directory that the file from the last
// Pick File was selected from
yy = Pick File( "Pick a File", theDirectory );
// If you want this Pick File to span across different scripts, then it would be a simple
// matter to save the directory in a specific namespace and get the
// directory location from a variable saved in that namespace.
// If you want to have the Pick File directory available from JMP session to JMP session
// then what I have used in the past, is to simply save the character string for the
// directory to a .txt file, using Save Text File() and Load Text File() to make the directory
// persistant