Refresh file during the program

Hello i need help
i use the script function to read data from a txt file where i said that my var_1=0 for example
i want to refresh this file during the program, i explain during the program i edit the var_1=10 so i want the program know that i edit the var in the txt file.
I don’t know if it’s possible to refresh it