在 JSL 中提取 jmp 文件的目录大家好,
我已经设法以一种复杂的方式(使用文字和字符操作)做我想做的事情,但我觉得必须有一种更简单的方法来做到这一点。 我想要的只是使用 JSL 中的“选择文件”功能提取刚刚选择的文件的目录,以便下次从该目录开始。 有什么建议么??
谢谢,伊夫
高级统计建模自动化和脚本编写数据存取质量和工艺工程回复:在JSL中提取jmp文件的目录是的,这很好用! 它比我想出的更接近(但更好)。 我只是认为应该有一个内置函数来提取文件的位置(目录路径)。 非常感谢@tx尼尔森!
问候,伊夫
回复:在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
回复:在JSL中提取jmp文件的目录抱歉我按错按钮了!!! 不幸的是,这不是一个解决方案@tx尼尔森。 这只列出已知目录的文件。 我想浏览找到我想要的文件,一旦选择了它,我想保存该目录,以便下次我想浏览时,它从上一个目录开始。
干杯,伊夫
回复:在JSL中提取jmp文件的目录查看脚本索引中的 Files in Directory() 函数
