Google+
Join free weekly webinars
Find us on
Back

Scripting

Scripting in EventIDE is many times simpler than in other programs

EventIDE offers a revolutionary simple scripting paradigm, which is completely free of any routines or functions related to the experiment design. This eliminates learning curve for new users and allows virtually any programming language (with all its power) to be employed in EventIDE. To prove the advantage of our paradigm, we compared the code length (number of statements) and code complexity (number of unique statements) for two classic experiments implemented in EventIDE versus other popular stimulus presentation packages. You can see that EventIDE is a tremendous winner on the following figures:

 

pic name pic name

 

No new routines to learn

Scripting in EventIDE is supplementary to visual design and required only for runtime adjustments and customization of the experiment logic. Accordingly, there is no new routines nor related API that you would need to learn. Only standard programming statements are used in scripting, such as variable assignments, loop, etc. See how simple is a complete script for the Stroop task designed in EventIDE:

/// Adjusting the stimulus on a new trial

	WordText=Word;
	WordColor=TextColor;
/// Choosing a feedback after participant's response

	if (TriggeredButton == CorrectKey) // correct response
	    {    
	    FeedBackText = "Correct"; 
	    IsNegativeTonePlaying=false;
	    }
	else
	    if (RT != 0) // wrong response
	        { 
	        FeedBackText = "Wrong"; 
	        IsNegativeTonePlaying=true;
	        }
	        else // Too late
	        { 
	        FeedBackText = "Too late"; 
	        IsNegativeTonePlaying=true;
	        }

Plugable scripting languages

EventIDE allows to plug different languages for user scripting, with C# 4.0 as a default choice. C# represents a new generation of C-based languages with a very familiar syntax for anyone, who knows C, C++, Java or Matlab. C# is a very powerful and professional language. Although you would rarely need its advanced features, you may like to learn that EventIDE itself has been developed with C#.

 

Event-driven code architecture and flat control flow

While scripting in EventIDE, you don't need to manage a main control flow that conditionally calls different subroutines. Instead, you split your code into short and flat segments that are attached to selected events in your experiment  (event-driven code architecture). You can still share data and use global variables across all code segments.

 

Comfortable code editor

EventIDE provides a powerful code editor that is packed with features for efficient code editing. For example, the syntax highlighting improves code readability, whereas the Intellipromt code completion assists in writing language statements and variable names. There are also tools for code navigation, formatting and search.

 

High-speed code execution, alike C++

EventIDE precompiles your scripts on the start of an experiment. In contrast to other scripting engines, precompilation allows to achieve high-speed code execution, comparable with the native C++ code.

 

Runtime debugging tools

While debugging your scripts in EventIDE, you can use a number of dedicated tools. For example, you can set breakpoints and monitor and change variables at runtime.