I was just wondering whether ExtendScript has any concept like a main method, whereby if the current script is included by another script like a library import it will not execute this main function/method and only execute it when the script is run directly.
Similar to Java's main() method and Python's __main__.
If not, is there a workaround to mimic such behavior generically?