Thank you both, Peter and Ken
yes, the end-construct as a slick alternative to If-then is something I've seen in many scripts, as some kind of error-checking. It's the evaluation of 1 that threw me off. Sent my mind into a spinning circle. In general, I find verbose and wordy code lines easier to understand than super-short nested snippets where every symbol carries enormous clout.
Have begun writing up my own SC help topics, and realize I must adopt a rather nonchalant attitude towards the whole thing. My only way to cope with it and avoid frustration is by thinking of it as "figures of speech" - the way I tackle real languages as well. Not trying to make sense of it - very contrary to what I expected programming to be like - but rather trying to match parrot-phrases to circumstances. Similar to "awesome" or "nice to meet you".
So what I've learned here, it helps to humanize a script. Instead of bossing it around in a military tone of voice, you throw it a bone like end(1) and let it arrive at the decision itself, instead of commanding it to END.
klownboy wrote:you didn't find information on "_Terminate in the scripting command since it's not a command but a special type of script you can have within a script resource file [ ::rtfm "idh_scripting.htm#idh_scripting_multi"; ] The "_Terminate is a special script ...
Whoa - I am like zig-zagging to some kind of understanding. Every time I think I got something figured out, it's different yet again. So this terminate-finale is NOT a label you made up after all, but a proper XY thing with proper documentation and all.
klownboy wrote: However, if you call a script via load or sub the "_Terminate" section is not called or run automatically.
Have to read this a few more times, and also the help section that goes along with it. Not easy to digest.
All this must have completely escaped my attention when I read SC help - and I did so repeatedly. If you have no hands-on use case to which it applies, a newbie mind like mine treats those words as synomyns. Script-resource, script-file, multi-script, multi-LINE-script....
klownboy wrote:you may have seen end(1==1), as establishing the true condition
Yes, in SC help, and it seemed complete nonsense. Or rather, so plain obvious that it looks like fools' gibberish. Now of course, I see what you mean. It's trickery to make the script go "Yes, right" and quit. And (1==1) is a synonym for (1) - unless I got something wrong once again.
Concerning those if-lines and if(exists("<curitem>") == 1) - I am still gnawing on it. Need to drag it apart into wider indents and colorize the nested components.
Enough scripting for me today, I better let it rest for while so it can settle and take root.