defines a script to be used either on load or during an event.


  • To use , you first need to load GUIKit using Needs["GUIKit`"].
  • is used to associate scripting code either as general code to be executed when the widget definition is read in or as code bound to a specific event, to be executed each time the event occurs within a BindEvent expression.
  • By default, the language of a is Wolfram Language code unless an alternate language is specified. You can use Language -> "xml" to specify that the content of the is a string of GUIKitXML.
  • is HoldAllComplete so that evaluation does not occur when processing blocks.
  • The following options can be given:
  • LanguageAutomaticthe language the script code is written in
    ScriptSourceNonean external file that contains the script code

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Click for copyable input

Define a function to be called whenever a button's event occurs: