Jump to content

Recommended Posts

Posted

I already have a strong suspicion that the answer to this is, "No. It can't be done." but I'll ask anyway.

Is there any way for a script to detect whether it is running as the main script, or if it is being included in another script?

Posted

I have no certain answer, but I think that there is a way to determine if the exe file was extracted (being as a child from other process) or it is the only process. May be this could be done analyzing process table before process and after it. This is my opinion.

Posted

@electrico

Thank you for your reply. I probably wasn't very clear on what I was looking for.

I am looking to have the script (compiled or not) determine if it is being run as a script, or being included as a UDF.

Posted

Not possible. The reason is that if you are using #include, it should be a file that is always meant to be #include-d.

That is what I suspected. Thank you.

  • 12 years later...
  • Jos locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...