cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Choose Language Hide Translation Bar
View Original Published Thread

How to use script to delete all the scripts in the file?

lala
Level VIII

Hello everyone!

How to use script to delete all the scripts in the file? Or no text recording is performed during operation.

 

Thanks!

undefined

This post originally written in Chinese (Simplified) and has been translated for your convenience. When you reply, it will also be translated back to Chinese (Simplified).

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User


回复: 怎样用脚本将文件中的脚本全部删除?

Here is an example of one way to delete the scripts

names default to here(1);
// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );

dt << delete scripts(dt << Get Table Script Names);
Jim

View solution in original post

lwx228
Level VIII

回复: 怎样用脚本将文件中的脚本全部删除?

Try( dt << Delete Table Property( "Source" ) );

View solution in original post

3 REPLIES 3
lala
Level VIII

Reply: How to delete all the scripts in the file with the script?

Such a record is a waste of space, how to set it up so that after various operations, there is no such "source" record when saving the file?

 

undefined

This post originally written in Chinese (Simplified) and has been translated for your convenience. When you reply, it will also be translated back to Chinese (Simplified).

txnelson
Super User


回复: 怎样用脚本将文件中的脚本全部删除?

Here is an example of one way to delete the scripts

names default to here(1);
// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );

dt << delete scripts(dt << Get Table Script Names);
Jim
lwx228
Level VIII

回复: 怎样用脚本将文件中的脚本全部删除?

Try( dt << Delete Table Property( "Source" ) );