Include() with WildcardsI have a main script that calls exterior JSL scripts depending on the content of a particular column. The exterior JSL scripts themselves and their names are revised periodically to reflect spec changes. Can wildcards be used with Include() to bypass any naming change to the script that gets called?
Automation and ScriptingRe: Include() with WildcardsI don't think so but if the file is always in same folder, you can figure out which file you should include by first checking all file names.
Re: Include() with WildcardsA friend at work made a similar suggestion.
This appears to work.
Script_Options = Files in Directory("\\Directory Name\");
//Keyphrase is the unique string to identify the script that should execute
For( i = 1, i <= N Items( Script_Options ), i++,
If( Contains( Script_Options[i], "Keyphrase" ), scripttorun = Script_Options[i]););
Chosen = "\\Directory Name\"||scripttorun;
Include(Chosen);