OnApplicationStart/OnApplicationEnd ?



  • Hello,
    I m using OnApplicationStart function to set my global variables that are used along the threads to calculate sums/substracts and many more.
    During the the threads other infos are written in to the same txt file.
    At the end of the script i would like to save the calculation results (saved in global variables) to the same text file at the end with "write" function
    When the code is placed on main script section, everytime a thread is finished the global variables are written to txt file.
    I just want to write at the end only once.
    I thought on OnApplicationEnd function, does it exist? if no is there any solution to my problem?
    Thanks again for the time you are taking to help!



  • @HNB said in OnApplicationStart/OnApplicationEnd ?:

    I thought on OnApplicationEnd function, does it exist? if no is there any solution to my problem?

    1522.xml



  • @Fox
    Oh My God!
    Hatz Off man with this function !!!
    Thank you



  • @Fox said in OnApplicationStart/OnApplicationEnd ?:

    1522.xml

    Thank you for pointing me on it.
    It was working fine on 1 script i made, but now, i dont know what is happening.
    The "call function on several threads" seems to never stop. And if i set 5 threads, the 5 threads have to terminate before 5 new begin. What am i missing?

    alt text

    alt text


Log in to reply