Ignore //!I have some scripts set to autorun when opened using //! at the beginning of those scripts . I need to run a find and replace text to standardize all of the graph sizes inside of these files to be the same
(ex. Size(526,247)>> Size(1900,800) )
Since there are a bunch of graphs in a bunch of different files ( and I will continue creating new files) I was wondering if there is any way in a script to ignore the //! at the beginning of these files? That way I can open the file, search it, and replace the desired text, without running the script inside it...
ScriptingRe: Ignore //!I meant a way for a script to open a file (starting with //!) without actually running it. I found the workaround
Either:
open(C:\filepath\filename.jsl, Run JSL(0))
//this open method will actually open the file but ignore the the "//!" at the beginning of a jsl file
//OR
text_to_fix = Load Text File(filename.jsl)
text_to_fix = munger(text_to_fix,1,"Size(","FIXED IT" );
//then loop the munger to find and replace everything I need and save the fixed text over the old text
(sorry if that is all confusing...)
Re: Ignore //!Press and hold the CNTL key while opening the file, and it will open without running the script.