Id like to execute different action on the first run of the script
for example the first try i want to execute:
Print("First Hello")
and on the second run.
Print("Hello World")
i don't understant how to do this, because if i store a variable within the script itself every run the variable will be redefined.
i tried something like this, playing with a new stored variable within blender,
try:
bpy.context.scene["Auto-Copy Start"] += 1
except:
bpy.context.scene["Auto-Copy Start"] = 1
and it can totally work. for example
try:
bpy.context.scene["Auto-Copy Start"] += 1
Print("Hello World")
except:
bpy.context.scene["Auto-Copy Start"] = 1 #that mean its the first run
Print("First Hello")
But if i save the file and re-run my script it will not work anymore with the saved file, this technique work only for the first run once per file only.
Or i want the first run to execute the first code per blender session. Is this possible ?