There is an if statement in the screen and if it's true, it should show some screen elements and run a function in the background that does some calculations for me.
The function takes one argument and this is the code snippet:
Code: Select all
screen name():
modal True
if variable1:
$ functionname(arg)
hbox:
(...)
However, the function is always run, no matter the boole of the variable. I know that this might be true for functions without arguments, but is it also true for functions with arguments?
I also tried using the on statement replacing the function with
Code: Select all
on "show" action [Function(functionname,arg)]
Any ideas, how I should proceed? Thanks!
Edit:
It seems a timer does work:
Code: Select all
timer 0.01 action [Function(functionname,arg)]