WndMessageBox
Popup a message box.
Python C++ C#
Python
BwApi.WndMessageBox(message, msgBoxType)
C++
BwApiWndMessageBox(message, msgBoxType);
C#
BwApi.WndMessageBox(message, msgBoxType);
Parameters
Param | Variable | Description |
In | message | Message in the popup message box |
In | msgBoxType | Type of the message box |
Out | cmdId | The command ID chosen by the user |
WndFileDialog
Popup a file/folder dialog.
Python C++ C#
Python
BwApi.WndFileDialog(openFile, selectFolder, defaultExtension, defaultFileName, initFolder)
C++
BwApiWndFileDialog(openFile, selectFolder, defaultExtension, defaultFileName, initFolder);
C#
BwApi.WndFileDialog(openFile, selectFolder, defaultExtension, defaultFileName, initFolder);
Parameters
Param | Variable | Description |
In | openFile | Boolean 1 = open file, 0 = save file |
In | selectFolder | Boolean 1 = select a folder, 0 = select a file |
In | defaultExtension | Default file extension |
In | defaultFileName | Defualt file name |
In | initFolder | The default folder to open |
Out | path | Path to the selected file/folder |
If the path is empty it means the user clicked cancel or X.
If more than one filter provided then an "All format" filter will appear.
DefaultExtension only applied when filterList exist with atleast one filter.
SelectFolder will always select a folder regardless if openFile is 0 (save).
WndDialogShow +(_C_API)
Popup a dialog.
Python C++ C# C
Python
BwApi.WndDialogShow(mode, outputPath, callbackObj, callBackID)
C++
BwApiWndDialogShow(mode, outputPath, callbackObj, callBackID);
C#
BwApi.WndDialogShow(mode, outputPath, callbackObj, callBackID);
C
BwApiWndDialogShow_C_API(mode, outputPath, callbackObj, callBackID);
Parameters
Param | Variable | Description |
In | mode | The dialog to preset (see BwApiDialogMode for supported dialogs) |
In | outputPath | If the dialog should output content of any type this parameter will represent the output folder for that content |
In | callbackObj | Class derived from BwApiCallbackBase. The callback will be used to get the dialog's output data including the user's selection |
In | callBackID | Integer value to be sent to the callback (callbackId parameter) |
WndHTMLCreateUrl
Open a UI window from a given URL.
Python C++ C#
Python
BwApi.WndHTMLCreateUrl(url, title, styleJson, wndRect)
C++
BwApiWndHTMLCreateUrl(url, title, styleJson, wndRect);
C#
BwApi.WndHTMLCreateUrl(url, title, styleJson, wndRect);
Parameters
Param | Variable | Description |
In | url | URL path to HTML |
In | title | Title of the window |
In | styleJson | Window style JSON object as string containing all window style information (see Schema/style_window.json schema) |
In | wndRect | Define the location and size of the window |
Out | wndHandlerId | Window ID handler |
If not in user action mode, Will return BW_API_ERROR_USER_ACTION_ONLY error. i.e. The user clicked on a menu item.
Set width, height to -1 to spread the window to the monitor width, height.
WndHTMLCreateHtml
Open a UI window with HTML content.
Python C++ C#
Python
BwApi.WndHTMLCreateHtml(html, title, styleJson, wndRect)
C++
BwApiWndHTMLCreateHtml(html, title, styleJson, wndRect);
C#
BwApi.WndHTMLCreateHtml(html, title, styleJson, wndRect);
Parameters
Param | Variable | Description |
In | html | HTML string |
In | title | Title of the window |
In | styleJson | Window style JSON object as string containing all window style information (see Schema/style_window.json schema) |
In | wndRect | Define the location and size of the window |
Out | wndHandlerId | Window ID handler |
If not in user action mode, Will return BW_API_ERROR_USER_ACTION_ONLY error. i.e. The user clicked on a menu item.
WndHTMLMessageSend
Send a message to the window handle.
Python C++ C#
Python
BwApi.WndHTMLMessageSend(wndHandleId, msg)
C++
BwApiWndHTMLMessageSend(wndHandleId, msg);
C#
BwApi.WndHTMLMessageSend(wndHandleId, msg);
Parameters
Param | Variable | Description |
In | wndHandleId | The handle ID in the system |
In | msg | The message to send |
WndHTMLClose
Close an existing window.
Python C++ C#
Python
BwApi.WndHTMLClose(wndHandleId)
C++
BwApiWndHTMLClose(wndHandleId);
C#
BwApi.WndHTMLClose(wndHandleId);
Parameters
Param | Variable | Description |
In | wndHandleId | The handle ID in the system |
WndHTMLMinimize
Minimize an existing window.
Python C++ C#
Python
BwApi.WndHTMLMinimize(wndHandleId)
C++
BwApiWndHTMLMinimize(wndHandleId);
C#
BwApi.WndHTMLMinimize(wndHandleId);
Parameters
Param | Variable | Description |
In | wndHandleId | The handle ID in the system |
WndHTMLSetFocus
Focus on an existing window.
Python C++ C#
Python
BwApi.WndHTMLSetFocus(wndHandleId)
C++
BwApiWndHTMLSetFocus(wndHandleId);
C#
BwApi.WndHTMLSetFocus(wndHandleId);
Parameters
Param | Variable | Description |
In | wndHandleId | The handle ID in the system |
WndHTMLWindowPositionGet
Get a window position.
Python C++ C#
Python
BwApi.WndHTMLWindowPositionGet(wndHandleId)
C++
BwApiWndHTMLWindowPositionGet(wndHandleId);
C#
BwApi.WndHTMLWindowPositionGet(wndHandleId);
Parameters
Param | Variable | Description |
In | wndHandleId | The handle ID in the system |
Out | wndRect | The rect of the window |
WndHTMLEventRegister +(_C_API)
Register a plugin for specific HTML event type.
Python C++ C# C
Python
BwApi.WndHTMLEventRegister(wndHandleId, eventType, callbackObj)
C++
BwApiWndHTMLEventRegister(wndHandleId, eventType, callbackObj);
C#
BwApi.WndHTMLEventRegister(wndHandleId, eventType, callbackObj);
C
BwApiWndHTMLEventRegister_C_API(wndHandleId, eventType, callbackObj);
Parameters
Param | Variable | Description |
In | wndHandleId | The handle ID in the system |
In | eventType | The event type to register to (see BwApiHTMLEventType enum) |
In | callbackObj | Class derived from BwApi.CallbackBase |
If register to BW_API_EVENT_HTML_CLOSE the calling fucntion can prevent the window from closing if the return value is 1, otherwise return 0 value to close the window.