willichan 220 Posted July 26, 2010 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? Join me in supporting Pediatric Therapy Network through Amazon Smile. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator Share this post Link to post Share on other sites
electrico 0 Posted July 26, 2010 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. Share this post Link to post Share on other sites
willichan 220 Posted July 26, 2010 @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. Join me in supporting Pediatric Therapy Network through Amazon Smile. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator Share this post Link to post Share on other sites
Richard Robertson 187 Posted July 26, 2010 Not possible. The reason is that if you are using #include, it should be a file that is always meant to be #include-d. Share this post Link to post Share on other sites
willichan 220 Posted July 26, 2010 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. Join me in supporting Pediatric Therapy Network through Amazon Smile. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator Share this post Link to post Share on other sites