<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nfz</id>
	<title>Code::Blocks - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nfz"/>
	<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php/Special:Contributions/Nfz"/>
	<updated>2026-05-27T07:59:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Wizard_Scripting_Commands&amp;diff=4330</id>
		<title>Wizard Scripting Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Wizard_Scripting_Commands&amp;diff=4330"/>
		<updated>2006-12-20T02:46:50Z</updated>

		<summary type="html">&lt;p&gt;Nfz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Code::Blocks]]&lt;br /&gt;
In this page, all the wizards-related script commands are listed and explained.&lt;br /&gt;
&lt;br /&gt;
Before we start, remember that in every wizard script there is a global variable defined named ''Wizard''. This is the object that all the following commands are known under.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Adding wizard pages =&lt;br /&gt;
The script writer creates a wizard by adding various pre-defined and/or custom pages to the wizard object. The order the pages are added define the order in which they will appear (almost).&lt;br /&gt;
&lt;br /&gt;
The script has the chance to interfere with the wizards operation any time the user presses &amp;quot;Next&amp;quot; or &amp;quot;Back&amp;quot; on the wizard dialog. For more on this, please read [[Wizard Page Events]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''NOTE: The following commands only make sense inside the BeginWizard() script function.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_2args|1=&lt;br /&gt;
== AddInfoPage(pageId,intro_msg) ==&lt;br /&gt;
&lt;br /&gt;
Add an informational page. It contains an informational text. It also contains a checkbox labelled &amp;quot;Skip&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Usually used for the first page to be displayed by the wizard and it explains in a few words what this wizard will do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Intro_panel.png]]&lt;br /&gt;
|3=pageId&lt;br /&gt;
|4=wxString&lt;br /&gt;
|5=The page's ID.&lt;br /&gt;
|6=info_msg&lt;br /&gt;
|7=wxString&lt;br /&gt;
|8=The info text&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_1args|1=&lt;br /&gt;
== AddFilePathPage(showHeaderGuard) ==&lt;br /&gt;
&lt;br /&gt;
Add a page that allows for the selection of a file. This file might not exist. Usually used by wizards of type ''wizFiles'' for the selection of the output files.&lt;br /&gt;
&lt;br /&gt;
It also contains a ''header guard'' text box which can be visible or not. Usually used when the file in question is a C/C++ header, in which case you might want to allow the user to customize the ''header guard'' word. Note that if this is visible it is also auto-updated to match the selected filename. The auto-update takes the filename part (no path), capitalizes it and replaces any non-character or non-digit to an underscore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:File_path_panel.png]]&lt;br /&gt;
|3=showHeaderGuard&lt;br /&gt;
|4=bool&lt;br /&gt;
|5=If true, a ''header guard'' text box will be visible&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_1args|1=&lt;br /&gt;
== AddProjectPathPage() ==&lt;br /&gt;
&lt;br /&gt;
Add a page that allows the user to customize the new project. Usually used by wizards of type ''wizProject''.&lt;br /&gt;
&lt;br /&gt;
This page contains text boxes to set the project title, filename and base directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Project_path_panel.png]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_4args|1=&lt;br /&gt;
== AddCompilerPage(compilerID, validCompilerIDs, allowCompilerChange, allowConfigChange) ==&lt;br /&gt;
&lt;br /&gt;
Perhaps the most used pre-defined wizard page. It contains a compiler selection list and a couple of well-known pre-defined build targets: Debug and Release.&lt;br /&gt;
&lt;br /&gt;
The compilers' list can contain all supported compilers or a script-defined list. It can also be selected whether compiler selection will be enabled or not.&lt;br /&gt;
&lt;br /&gt;
Finally, the build targets related settings can be either visible or not. If they 're visible, they allow the user to customize per-target the target's name, working directory and objects output (intermediate) directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Compiler_panel.png]]&lt;br /&gt;
| 3=compilerID | 4=wxString | 5=The preselected compiler ID for the list. If this string is empty, the globally default compiler will be selected.&lt;br /&gt;
| 6=validCompilerIDs | 7=wxString | 8=A semicolon separated list of valid compiler IDs to include in the list. If you want all available compilers to be listed, use &amp;lt;code&amp;gt;_T(&amp;quot;*&amp;quot;)&amp;lt;/code&amp;gt;. If you want only GCC-based or MSVC-based compilers to appear in the list, use &amp;lt;code&amp;gt;_T(&amp;quot;gcc*;msv*&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
| 9=allowCompilerChange | 10=bool | 11=If true, the user will be able to change the compiler selection. If false, the selection will be read-only.&lt;br /&gt;
| 12=allowConfigChange | 13=bool | 14=If true, the settings for the two pre-defined build targets (Debug/Release) will be shown and available for the user to customize. If false, they will not be visible.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_6args|1=&lt;br /&gt;
== AddBuildTargetPage(targetName, isDebug, showCompiler, compilerID, validCompilerIDs, allowCompilerChange) ==&lt;br /&gt;
&lt;br /&gt;
Adds a page for creating a new build target. This page allows the user to enter a name for the new build target, set its working directory, set its objects output (intermediate) directory and, optionally, a compiler selection list.&lt;br /&gt;
&lt;br /&gt;
It also contains a checkbox to denote whether this target should have debugging symbols enabled or not.&lt;br /&gt;
&lt;br /&gt;
The compilers' list can contain all supported compilers or a script-defined list. It can also be selected whether compiler selection will be enabled or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Build_target_panel.png]]&lt;br /&gt;
| 3=targetName | 4=wxString | 5=The new target's name.&lt;br /&gt;
| 6=isDebug | 7=bool | 8=If true, the &amp;quot;Enable debugging symbols&amp;quot; check box will be checked.&lt;br /&gt;
| 9=showCompiler | 10=bool | 11=If true, the compiler selection list will be visible.&lt;br /&gt;
| 12=compilerID | 13=wxString | 14=The preselected compiler ID for the list. If this string is empty, the globally default compiler will be selected.&lt;br /&gt;
| 15=validCompilerIDs | 16=wxString | 17=A semicolon separated list of valid compiler IDs to include in the list. If you want all available compilers to be listed, use &amp;lt;code&amp;gt;_T(&amp;quot;*&amp;quot;)&amp;lt;/code&amp;gt;. If you want only GCC-based or MSVC-based compilers to appear in the list, use &amp;lt;code&amp;gt;_T(&amp;quot;gcc*;msv*&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
| 18=allowCompilerChange | 19=bool | 20=If true, the user will be able to change the compiler selection. If false, the selection will be read-only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_4args|1=&lt;br /&gt;
== AddGenericSingleChoiceListPage(pageId, descr, choices, defChoice) ==&lt;br /&gt;
Adds a page that contains a script-defined list and the user can select one single value from it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Generic_single_choice_list.png]]&lt;br /&gt;
| 3=pageId | 4=wxString | 5=The page's ID.&lt;br /&gt;
| 6=descr | 7=wxString | 8=The description displayed at the top of the page.&lt;br /&gt;
| 9=choices | 10=wxString | 11=Semicolon separated list of the available selections.&lt;br /&gt;
| 12=defChoice | 13=int | 14=The pre-selected choice. This is used only the first time this page is displayed. The user's selection is stored in the Code::Blocks configuration file and remembered for subsequent uses of this page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_4args|1=&lt;br /&gt;
== AddGenericSelectPathPage(pageId, descr, label, defValue) ==&lt;br /&gt;
Adds a page that allows the user to select a folder from the filesystem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Generic_select_path.png]]&lt;br /&gt;
| 3=pageId | 4=wxString | 5=The page's ID.&lt;br /&gt;
| 6=descr | 7=wxString | 8=The description displayed at the top of the page.&lt;br /&gt;
| 9=label | 10=wxString | 11=The label above the text box (e.g. &amp;quot;Location of Foo:&amp;quot;).&lt;br /&gt;
| 12=defValue | 13=wxString | 14=The pre-selected path. This is used only the first time this page is displayed. The user's selection is stored in the Code::Blocks configuration file and remembered for subsequent uses of this page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_1args|1=&lt;br /&gt;
== AddPage(pageId) ==&lt;br /&gt;
&lt;br /&gt;
Adds a custom page from XRC resource.&lt;br /&gt;
&lt;br /&gt;
The wizard allows the script to add custom pages from XRC. Each such page must actually be a wxPanel inside the XRC. This wxPanel's name is then used as the ''pageID'' parameter.  Note that all custom page panels are placed in wizard.xrc.&lt;br /&gt;
|3=pageId&lt;br /&gt;
|4=wxString&lt;br /&gt;
|5=The page's ID. This must match the wxPanel's name in the XRC resource.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Operating on GUI controls =&lt;br /&gt;
The wizard allows scripts to operate on the controls currently visible (i.e. on the current page the user is viewing).&lt;br /&gt;
By &amp;quot;operate on&amp;quot; I mean get and set their values.&lt;br /&gt;
This is especially useful for custom XRC pages (else what would they be good for?) and a couple of the pre-defined pages.&lt;br /&gt;
&lt;br /&gt;
In this section, the script commands that allows the script to operate on page controls are explained by control type.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Text controls (wxTextCtrl) ==&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_2args|1=&lt;br /&gt;
=== SetTextControlValue(control_name, value) ===&lt;br /&gt;
Sets the value of the text control identified by &amp;lt;code&amp;gt;control_name&amp;lt;/code&amp;gt;.&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
|6=value&lt;br /&gt;
|7=wxString &lt;br /&gt;
|8=The new value&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_1args|1=&lt;br /&gt;
=== GetTextControlValue(control_name) ===&lt;br /&gt;
Gets the value of the text control identified by &amp;lt;code&amp;gt;control_name&amp;lt;/code&amp;gt;.&lt;br /&gt;
|2=The control's current value (wxString).&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Checkbox controls (wxCheckBox) ==&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_2args|1=&lt;br /&gt;
=== CheckCheckbox(control_name, value) ===&lt;br /&gt;
Checks or unchecks the checkbox identified by &amp;lt;code&amp;gt;control_name&amp;lt;/code&amp;gt;.&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
|6=value&lt;br /&gt;
|7=bool &lt;br /&gt;
|8=Check if true, uncheck if false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_1args|1=&lt;br /&gt;
=== IsCheckboxChecked(control_name) ===&lt;br /&gt;
Gets the check-state of the checkbox identified by &amp;lt;code&amp;gt;control_name&amp;lt;/code&amp;gt;.&lt;br /&gt;
|2=The control's current check-state (bool).&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combobox controls (wxComboBox) ==&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_2args|1=&lt;br /&gt;
=== SetComboboxSelection(control_name, value) ===&lt;br /&gt;
Sets the selected item in the combobox identified by &amp;lt;code&amp;gt;control_name&amp;lt;/code&amp;gt;.&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
|6=value&lt;br /&gt;
|7=int&lt;br /&gt;
|8=The item's index. Use -1 for no selection&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_1args|1=&lt;br /&gt;
=== GetComboboxSelection(control_name) ===&lt;br /&gt;
Gets the selected item in the combobox identified by &amp;lt;code&amp;gt;control_name&amp;lt;/code&amp;gt;.&lt;br /&gt;
|2=The control's currently selected index (int).&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_1args|1=&lt;br /&gt;
=== GetComboboxStringSelection(control_name) ===&lt;br /&gt;
Gets the selected item's string in the combobox identified by &amp;lt;code&amp;gt;control_name&amp;lt;/code&amp;gt;.&lt;br /&gt;
|2=The control's currently selected item's string (wxString).&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_1args|1=&lt;br /&gt;
=== GetCompilerFromCombobox(control_name) ===&lt;br /&gt;
Assuming you have used FillComboboxWithCompilers() (below) to fill the combobox, this returns the selected compiler's ID.&lt;br /&gt;
|2=The control's currently selected item's string (wxString).&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_1args|1=&lt;br /&gt;
=== FillComboboxWithCompilers(control_name) ===&lt;br /&gt;
Fills the combobox with a list of compilers.&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radiobox controls (wxRadioBox) ==&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_2args|1=&lt;br /&gt;
=== SetRadioboxSelection(control_name, value) ===&lt;br /&gt;
Sets the selected item in the radiobox identified by &amp;lt;code&amp;gt;control_name&amp;lt;/code&amp;gt;.&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
|6=value&lt;br /&gt;
|7=int&lt;br /&gt;
|8=The item's index. Use -1 for no selection&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_1args|1=&lt;br /&gt;
=== GetRadioboxSelection(control_name) ===&lt;br /&gt;
Gets the selected item in the radiobox identified by &amp;lt;code&amp;gt;control_name&amp;lt;/code&amp;gt;.&lt;br /&gt;
|2=The control's currently selected index (int).&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Listbox controls (wxListBox) ==&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_2args|1=&lt;br /&gt;
=== SetListboxSelection(control_name, value) ===&lt;br /&gt;
Sets the selected item in the listbox identified by &amp;lt;code&amp;gt;control_name&amp;lt;/code&amp;gt;.&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
|6=value&lt;br /&gt;
|7=int&lt;br /&gt;
|8=The item's index. Use -1 for no selection&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_1args|1=&lt;br /&gt;
=== GetListboxSelection(control_name) ===&lt;br /&gt;
Gets the selected item in the listbox identified by &amp;lt;code&amp;gt;control_name&amp;lt;/code&amp;gt;.&lt;br /&gt;
|2=The control's currently selected index (int).&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The control's name&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== All controls (common functions) ==&lt;br /&gt;
&lt;br /&gt;
{{Function_Description_2args|1=&lt;br /&gt;
=== EnableWindow(control_name, value) ===&lt;br /&gt;
Enables/disables the window (control) identified by &amp;lt;code&amp;gt;control_name&amp;lt;/code&amp;gt;.&lt;br /&gt;
|3=control_name &lt;br /&gt;
|4=wxString &lt;br /&gt;
|5=The window's (control) name&lt;br /&gt;
|6=value&lt;br /&gt;
|7=bool&lt;br /&gt;
|8=Enable if true, disable if false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(to be continued)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Mandrav|Mandrav]] 11:28, 9 July 2006 (EDT)&lt;/div&gt;</summary>
		<author><name>Nfz</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Wizard_scripts&amp;diff=4329</id>
		<title>Wizard scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Wizard_scripts&amp;diff=4329"/>
		<updated>2006-12-20T02:42:25Z</updated>

		<summary type="html">&lt;p&gt;Nfz: /* What files do I need to create a valid wizard? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Code::Blocks]]&lt;br /&gt;
When you click &amp;quot;File-&amp;gt;New&amp;quot;, you 're presented with wizards to create various new things. These are:&lt;br /&gt;
&lt;br /&gt;
* New project&lt;br /&gt;
* New build target inside the active project&lt;br /&gt;
* New file(s)&lt;br /&gt;
* New anything (custom)&lt;br /&gt;
* User template&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:New_wiz.png|&amp;quot;New...&amp;quot; dialog]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All the above functionality (except user templates) is provided by wizard scripts. In this section, I 'm gonna try to explain everything about wizard scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before starting out creating your own wizard scripts or editing existing ones, these are &amp;quot;must read&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
* [[Wizard Scripting Commands]]&lt;br /&gt;
* [[Wizard Page Events]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Where are they located? ==&lt;br /&gt;
Wizard scripts are located under the Code::Blocks' data folder.&lt;br /&gt;
The base wizards folder is &amp;lt;tt&amp;gt;[Code::Blocks install dir]/share/codeblocks/templates/wizards&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Scripts are arranged in subfolders (one for each wizard) inside the above folder.&lt;br /&gt;
To make this clear, the structure of this folder is displayed below with the &amp;quot;console&amp;quot; wizard expanded to see all its files:&lt;br /&gt;
&lt;br /&gt;
 Base folder&lt;br /&gt;
   console&lt;br /&gt;
     c&lt;br /&gt;
       main.c&lt;br /&gt;
     cpp&lt;br /&gt;
       main.cpp&lt;br /&gt;
     logo.png&lt;br /&gt;
     wizard.png&lt;br /&gt;
     wizard.script&lt;br /&gt;
     wizard.xrc&lt;br /&gt;
   fltk&lt;br /&gt;
   ...&lt;br /&gt;
   ...&lt;br /&gt;
   empty&lt;br /&gt;
   ...&lt;br /&gt;
   ...&lt;br /&gt;
   common_functions.script&lt;br /&gt;
   config.script&lt;br /&gt;
&lt;br /&gt;
== What files do I need to create a valid wizard? ==&lt;br /&gt;
There are three files that are absolutely needed for your wizard to be registered correctly:&lt;br /&gt;
* '''logo.png''' - The wizard's icon. This will be displayed in the &amp;quot;New...&amp;quot; dialog.&lt;br /&gt;
* '''wizard.png''' - The wizard's bitmap. This bitmap is displayed on the left side in the wizard dialog.&lt;br /&gt;
* '''wizard.script''' - The wizard's script. You didn't think you could have a scripted wizard without a script, did you? ;)&lt;br /&gt;
* '''wizard.xrc''' - The wizard's custom pages. This file is optional but if you are using custom pages then all the panels as XRC resources must be placed in wizard.xrc.&lt;br /&gt;
&lt;br /&gt;
== How do I edit an existing wizard? ==&lt;br /&gt;
That's easy: edit its script :). This can be done easily from within Code::Blocks. Just right-click on the wizard's icon in the &amp;quot;New...&amp;quot; dialog. The same context menu contains an option to edit the global configuration script (''config.script'').&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Edit_wiz_script.png|Wizard scripts context menu]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that no restart is needed if you edit a script. Just save it and launch the wizard again :).&lt;br /&gt;
&lt;br /&gt;
Code::Blocks needs to be restarted only when editing the global configuration script. An informational message is displayed in this case so you don't wonder why your changes are not taking any effect ;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I create a new wizard? ==&lt;br /&gt;
First thing you should do is read about [[Wizard Scripting Commands]] and use it as a reference on what commands are accepted and what their syntax is.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I register my new wizard? ==&lt;br /&gt;
Wizard scripts are registered with Code::Blocks by adding a registration line in the global wizards configuration script (config.script).&lt;br /&gt;
&lt;br /&gt;
Let's look at the registration of an existing wizard:&lt;br /&gt;
&lt;br /&gt;
 // config.script&lt;br /&gt;
 function RegisterWizards()&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
     RegisterWizard(wizProject,     _T(&amp;quot;empty&amp;quot;),        _T(&amp;quot;Empty project&amp;quot;),         _T(&amp;quot;Console&amp;quot;));&lt;br /&gt;
 &lt;br /&gt;
     // more wizards following&lt;br /&gt;
     ...&lt;br /&gt;
     ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The arguments to the RegisterWizard() function are as follows:&lt;br /&gt;
&lt;br /&gt;
# The type of output for this wizard. Can be one of the following, self-explaining types:&lt;br /&gt;
#* wizProject&lt;br /&gt;
#* wizTarget&lt;br /&gt;
#* wizFiles&lt;br /&gt;
#* wizCustom&lt;br /&gt;
# The subfolder where this wizard's files are located&lt;br /&gt;
# The wizard's title, as will appear in the &amp;quot;New...&amp;quot; dialog&lt;br /&gt;
# The wizard's category. Free-form text. If your wizard fits one of the existing categories, please use it.&lt;br /&gt;
&lt;br /&gt;
After you add the new wizard in ''config.script'', you must restart Code::Blocks to re-initialize all the registered wizards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Mandrav|Mandrav]] 07:51, 9 July 2006 (EDT)&lt;/div&gt;</summary>
		<author><name>Nfz</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Wizard_scripts&amp;diff=4328</id>
		<title>Wizard scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Wizard_scripts&amp;diff=4328"/>
		<updated>2006-12-20T02:41:10Z</updated>

		<summary type="html">&lt;p&gt;Nfz: /* Where are they located? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Code::Blocks]]&lt;br /&gt;
When you click &amp;quot;File-&amp;gt;New&amp;quot;, you 're presented with wizards to create various new things. These are:&lt;br /&gt;
&lt;br /&gt;
* New project&lt;br /&gt;
* New build target inside the active project&lt;br /&gt;
* New file(s)&lt;br /&gt;
* New anything (custom)&lt;br /&gt;
* User template&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:New_wiz.png|&amp;quot;New...&amp;quot; dialog]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All the above functionality (except user templates) is provided by wizard scripts. In this section, I 'm gonna try to explain everything about wizard scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before starting out creating your own wizard scripts or editing existing ones, these are &amp;quot;must read&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
* [[Wizard Scripting Commands]]&lt;br /&gt;
* [[Wizard Page Events]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Where are they located? ==&lt;br /&gt;
Wizard scripts are located under the Code::Blocks' data folder.&lt;br /&gt;
The base wizards folder is &amp;lt;tt&amp;gt;[Code::Blocks install dir]/share/codeblocks/templates/wizards&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Scripts are arranged in subfolders (one for each wizard) inside the above folder.&lt;br /&gt;
To make this clear, the structure of this folder is displayed below with the &amp;quot;console&amp;quot; wizard expanded to see all its files:&lt;br /&gt;
&lt;br /&gt;
 Base folder&lt;br /&gt;
   console&lt;br /&gt;
     c&lt;br /&gt;
       main.c&lt;br /&gt;
     cpp&lt;br /&gt;
       main.cpp&lt;br /&gt;
     logo.png&lt;br /&gt;
     wizard.png&lt;br /&gt;
     wizard.script&lt;br /&gt;
     wizard.xrc&lt;br /&gt;
   fltk&lt;br /&gt;
   ...&lt;br /&gt;
   ...&lt;br /&gt;
   empty&lt;br /&gt;
   ...&lt;br /&gt;
   ...&lt;br /&gt;
   common_functions.script&lt;br /&gt;
   config.script&lt;br /&gt;
&lt;br /&gt;
== What files do I need to create a valid wizard? ==&lt;br /&gt;
There are three files that are absolutely needed for your wizard to be registered correctly:&lt;br /&gt;
* '''logo.png''' - The wizard's icon. This will be displayed in the &amp;quot;New...&amp;quot; dialog.&lt;br /&gt;
* '''wizard.png''' - The wizard's bitmap. This bitmap is displayed on the left side in the wizard dialog.&lt;br /&gt;
* '''wizard.script''' - The wizard's script. You didn't think you could have a scripted wizard without a script, did you? ;)&lt;br /&gt;
* '''wizard.xrc''' - The wizard's custom pages. This file is optional but if you are using custom pages then all the panels must be placed in wizard.xrc.&lt;br /&gt;
&lt;br /&gt;
== How do I edit an existing wizard? ==&lt;br /&gt;
That's easy: edit its script :). This can be done easily from within Code::Blocks. Just right-click on the wizard's icon in the &amp;quot;New...&amp;quot; dialog. The same context menu contains an option to edit the global configuration script (''config.script'').&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Edit_wiz_script.png|Wizard scripts context menu]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that no restart is needed if you edit a script. Just save it and launch the wizard again :).&lt;br /&gt;
&lt;br /&gt;
Code::Blocks needs to be restarted only when editing the global configuration script. An informational message is displayed in this case so you don't wonder why your changes are not taking any effect ;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I create a new wizard? ==&lt;br /&gt;
First thing you should do is read about [[Wizard Scripting Commands]] and use it as a reference on what commands are accepted and what their syntax is.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I register my new wizard? ==&lt;br /&gt;
Wizard scripts are registered with Code::Blocks by adding a registration line in the global wizards configuration script (config.script).&lt;br /&gt;
&lt;br /&gt;
Let's look at the registration of an existing wizard:&lt;br /&gt;
&lt;br /&gt;
 // config.script&lt;br /&gt;
 function RegisterWizards()&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
     RegisterWizard(wizProject,     _T(&amp;quot;empty&amp;quot;),        _T(&amp;quot;Empty project&amp;quot;),         _T(&amp;quot;Console&amp;quot;));&lt;br /&gt;
 &lt;br /&gt;
     // more wizards following&lt;br /&gt;
     ...&lt;br /&gt;
     ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The arguments to the RegisterWizard() function are as follows:&lt;br /&gt;
&lt;br /&gt;
# The type of output for this wizard. Can be one of the following, self-explaining types:&lt;br /&gt;
#* wizProject&lt;br /&gt;
#* wizTarget&lt;br /&gt;
#* wizFiles&lt;br /&gt;
#* wizCustom&lt;br /&gt;
# The subfolder where this wizard's files are located&lt;br /&gt;
# The wizard's title, as will appear in the &amp;quot;New...&amp;quot; dialog&lt;br /&gt;
# The wizard's category. Free-form text. If your wizard fits one of the existing categories, please use it.&lt;br /&gt;
&lt;br /&gt;
After you add the new wizard in ''config.script'', you must restart Code::Blocks to re-initialize all the registered wizards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Mandrav|Mandrav]] 07:51, 9 July 2006 (EDT)&lt;/div&gt;</summary>
		<author><name>Nfz</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Wizard_scripts&amp;diff=4327</id>
		<title>Wizard scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Wizard_scripts&amp;diff=4327"/>
		<updated>2006-12-20T02:40:27Z</updated>

		<summary type="html">&lt;p&gt;Nfz: /* What files do I need to create a valid wizard? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Code::Blocks]]&lt;br /&gt;
When you click &amp;quot;File-&amp;gt;New&amp;quot;, you 're presented with wizards to create various new things. These are:&lt;br /&gt;
&lt;br /&gt;
* New project&lt;br /&gt;
* New build target inside the active project&lt;br /&gt;
* New file(s)&lt;br /&gt;
* New anything (custom)&lt;br /&gt;
* User template&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:New_wiz.png|&amp;quot;New...&amp;quot; dialog]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All the above functionality (except user templates) is provided by wizard scripts. In this section, I 'm gonna try to explain everything about wizard scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before starting out creating your own wizard scripts or editing existing ones, these are &amp;quot;must read&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
* [[Wizard Scripting Commands]]&lt;br /&gt;
* [[Wizard Page Events]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Where are they located? ==&lt;br /&gt;
Wizard scripts are located under the Code::Blocks' data folder.&lt;br /&gt;
The base wizards folder is &amp;lt;tt&amp;gt;[Code::Blocks install dir]/share/codeblocks/templates/wizards&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Scripts are arranged in subfolders (one for each wizard) inside the above folder.&lt;br /&gt;
To make this clear, the structure of this folder is displayed below with the &amp;quot;console&amp;quot; wizard expanded to see all its files:&lt;br /&gt;
&lt;br /&gt;
 Base folder&lt;br /&gt;
   console&lt;br /&gt;
     c&lt;br /&gt;
       main.c&lt;br /&gt;
     cpp&lt;br /&gt;
       main.cpp&lt;br /&gt;
     logo.png&lt;br /&gt;
     wizard.png&lt;br /&gt;
     wizard.script&lt;br /&gt;
   fltk&lt;br /&gt;
   ...&lt;br /&gt;
   ...&lt;br /&gt;
   empty&lt;br /&gt;
   ...&lt;br /&gt;
   ...&lt;br /&gt;
   common_functions.script&lt;br /&gt;
   config.script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What files do I need to create a valid wizard? ==&lt;br /&gt;
There are three files that are absolutely needed for your wizard to be registered correctly:&lt;br /&gt;
* '''logo.png''' - The wizard's icon. This will be displayed in the &amp;quot;New...&amp;quot; dialog.&lt;br /&gt;
* '''wizard.png''' - The wizard's bitmap. This bitmap is displayed on the left side in the wizard dialog.&lt;br /&gt;
* '''wizard.script''' - The wizard's script. You didn't think you could have a scripted wizard without a script, did you? ;)&lt;br /&gt;
* '''wizard.xrc''' - The wizard's custom pages. This file is optional but if you are using custom pages then all the panels must be placed in wizard.xrc.&lt;br /&gt;
&lt;br /&gt;
== How do I edit an existing wizard? ==&lt;br /&gt;
That's easy: edit its script :). This can be done easily from within Code::Blocks. Just right-click on the wizard's icon in the &amp;quot;New...&amp;quot; dialog. The same context menu contains an option to edit the global configuration script (''config.script'').&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Edit_wiz_script.png|Wizard scripts context menu]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that no restart is needed if you edit a script. Just save it and launch the wizard again :).&lt;br /&gt;
&lt;br /&gt;
Code::Blocks needs to be restarted only when editing the global configuration script. An informational message is displayed in this case so you don't wonder why your changes are not taking any effect ;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I create a new wizard? ==&lt;br /&gt;
First thing you should do is read about [[Wizard Scripting Commands]] and use it as a reference on what commands are accepted and what their syntax is.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I register my new wizard? ==&lt;br /&gt;
Wizard scripts are registered with Code::Blocks by adding a registration line in the global wizards configuration script (config.script).&lt;br /&gt;
&lt;br /&gt;
Let's look at the registration of an existing wizard:&lt;br /&gt;
&lt;br /&gt;
 // config.script&lt;br /&gt;
 function RegisterWizards()&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
     RegisterWizard(wizProject,     _T(&amp;quot;empty&amp;quot;),        _T(&amp;quot;Empty project&amp;quot;),         _T(&amp;quot;Console&amp;quot;));&lt;br /&gt;
 &lt;br /&gt;
     // more wizards following&lt;br /&gt;
     ...&lt;br /&gt;
     ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The arguments to the RegisterWizard() function are as follows:&lt;br /&gt;
&lt;br /&gt;
# The type of output for this wizard. Can be one of the following, self-explaining types:&lt;br /&gt;
#* wizProject&lt;br /&gt;
#* wizTarget&lt;br /&gt;
#* wizFiles&lt;br /&gt;
#* wizCustom&lt;br /&gt;
# The subfolder where this wizard's files are located&lt;br /&gt;
# The wizard's title, as will appear in the &amp;quot;New...&amp;quot; dialog&lt;br /&gt;
# The wizard's category. Free-form text. If your wizard fits one of the existing categories, please use it.&lt;br /&gt;
&lt;br /&gt;
After you add the new wizard in ''config.script'', you must restart Code::Blocks to re-initialize all the registered wizards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Mandrav|Mandrav]] 07:51, 9 July 2006 (EDT)&lt;/div&gt;</summary>
		<author><name>Nfz</name></author>
	</entry>
</feed>