- Foreword
- Basics
- Interface
- Menu
- File
- Import
- Edit
- View
- Options
- Options
- Tools
- Help
- Windows & Dialogs
- Controls
- Standard
- Additional
- Win32
-
- Property Editors
- Appendices
Tools → Generating Options allows you to set parameters for generating code for the currently active form. Setting parameters here overrides the settings in Options → Options → Code Generator that were in effect when the form was created. They are saved with the form.
Template
In the drop-down control, you can choose a code-generation template. While the Default template is capable of generating either Message Loop or OnEvent AutoIt GUI code, other templates generate only code for one AutoIt mode.
Clicking on the Manage button displays the Code Templates dialog. Here you can view and edit existing code templates, and created new ones.
This dialog has two tabs: Options and Formatting.
Options
If Generate OnEvent code is not checked, only code templates that generate Message Loop code are available in the Template drop-down control. If it is checked, only code templates that generate OnEvent code are available.
In Message-Loop mode, an event is handled in a Case; in OnEvent mode, it is handled by a Click function.
If Generate events for all controls is not checked, event code is only generated for controls that have the OnClick property set in Object Inspector. If it is checked, event code is generated for all controls.
If Expand %var% variables is not checked, Captions are converted to code literally. If it is checked, characters between the <color blue>%</color> signs are taken to be the name of a variable, possibly resulting in an expression.
An example: <color blue>Info for user %user%</color> generates <color blue>“Info for user ” & $user</color>.
AutoIt permits the programmer to code use the default for various parameters to GUI functions by entering -1. If Variables instead of '-1' where possible is unchecked, Koda generates -1 where possible. If it is checked, Koda generates variables and constants that are the defaults.
Formatting
The Indent char can be a tab or a space. The calls to GUI functions (in Message Loop mode), and OnClick functions (in OnEvent mode) are indented Init characters. Other lines are indented an additional Count indent characters times the indent level.
The default is for Koda not to declare control ID and % variables: the Scope of Variables is Not set. Global declares the variables as <color blue>Global</color> in generated code; Local declares them as <color blue>Local</color>.