Vai al contenuto

Events and actions

You can configure events and actions in various areas of GF_View (ex.: global events, events on keys, events on widgets).Events are conditions that may occur at runtime (ex.: pressing a key, clicking the mouse, variable = value, etc.), while actions specify what the runtime has to do when such event occurs.For example, with events and actions you can change page by pressing a key, set a variable when a mathematical condition is checked, etc.When an event is created (or selected), you can, selecting it, add an action to execute through the instructions SCRIPT.Some events (e.g.: global events) can be conditioned by an access expression.The access expression must provide a boolean result TRUE/FALSE. It’s also possible to create complex expressions, using parenthesis and AND/OR/XOR operators (see: Script). Conditions examples:Var1 = 5Var1 > Var2 + 3(Var1 > 5) AND ((Var2 + 7 < Var3) OR (Var4 = 0)The associated action will be executed at condition transition FALSE => TRUE.So, to be able to execute actions again it’necessary to get them to the FALSE state.Wrong condition example:condition myVar=myVarexecScript myScriptIn this scenario the “myScript” script will be executed just one time as the expression “myVar = myVar” will always stay at TRUE state.