- Home
- General Usage
- DCX Controls
- DCX Features
- About DCX
|
| Web2 Control |
WebView2 HTML control. Root control: Static
NB: This control requires WebView2Loader.dll to be present somewhere LoadLibrary() can find it, or in the same directory as dcx.dll.
NB: The control also requires WebView2 installed & will try to install it if not found.
Download WebView2
|
| /xdid flags |
| Control commands are input to the control with the /xdid command. |
|
/xdid -c |
| Clear the cache. |
| Syntax: |
/xdid -c [DNAME] [ID] (TYPE) |
| Example: |
/xdid -c dcx 4 cookies |
| Parameters: |
| TYPE |
Can be any of |
| empty |
If no argument supplied all caches are cleared. |
| downloads |
Only clear the downloads history. |
| browsing |
Only clear the browsing history. |
| cookies |
Only clear the cookies. |
|
/xdid -g |
| This command is like hitting the Home button in a browser. |
| Syntax: |
/xdid -g [DNAME] [ID] (URL) |
| Example: |
/xdid -g dcx 4 http://dcx.scriptsdb.org |
| | | Note. If a url is supplied then it is set as the home url for all future calls. |
|
/xdid -i |
| This command is like hitting the Forward button in a browser. |
| Syntax: |
/xdid -i [DNAME] [ID] |
| Example: |
/xdid -i dcx 4 |
|
/xdid -j |
| This command lets you execute some javascript code. |
| Syntax: |
/xdid -j [DNAME] [ID] [JAVASCRIPT CODE] |
| Example: |
/xdid -j dcx 4 alert('Hello') |
|
/xdid -k |
| This command is like hitting the Back button in a browser. |
| Syntax: |
/xdid -k [DNAME] [ID] |
| Example: |
/xdid -k dcx 4 |
|
/xdid -m |
| This does the same as /xdid -n but allows setting some flags too. |
| Syntax: |
/xdid -m [DNAME] [ID] [+FLAGS] [+MASK] (URL) |
| Example: |
/xdid -m dcx 4 +bf +b http://dcx.scriptsdb.org |
| Parameters: |
| +FLAGS |
Can be any combination of |
| m |
toggle Managing new windows. |
| u |
toggle downloads. |
| U |
toggle downloads dialog. |
| f |
toggle fullscreen on/off |
| s |
toggle statusbar on/off |
| A |
toggle Mute on/off |
| C |
toggle Default context menus on/off |
| D |
toggle Scripting Dialog on/off |
| S |
toggle Scripting on/off |
| W |
toggle Web Messages on/off |
| +MASK |
is used to set the flags on or off /xdid -m dname +bf +b will turn the address bar on, & disable fullscreen. |
| URL |
is optional, if not supplied then you can use the command to just set flags. |
|
/xdid -n |
| This command lets you navigate to an url. |
| Syntax: |
/xdid -n [DNAME] [ID] [URL] |
| Example: |
/xdid -n dcx 4 http://dcx.scriptsdb.org |
|
/xdid -r |
| This command is like hitting the Refresh button in a browser. |
| Syntax: |
/xdid -r [DNAME] [ID] |
| Example: |
/xdid -r dcx 4 |
|
/xdid -t |
| This command is like hitting the Stop button in a browser. |
| Syntax: |
/xdid -t [DNAME] [ID] |
| Example: |
/xdid -t dcx 4 |
|
/xdid -C |
| Capture a preview of the current website. |
| Syntax: |
/xdid -C [DNAME] [ID] [+FLAGS] (FILENAME) |
| Example: |
/xdid -C dcx 4 + sample.png |
| Parameters: |
| +FLAGS |
Can be any one of |
| p |
png format. |
| j |
jpeg format. |
| FILENAME |
The filename to save the image as. |
|
/xdid -P |
| Open the print dialog for the current website. |
| Syntax: |
/xdid -P [DNAME] [ID] [+FLAGS] |
| Example: |
/xdid -P dcx 4 +b |
| Parameters: |
| +FLAGS |
Can be any one of |
| b |
Browser dialog. |
| s |
System dialog (default). |
| $xdid() Properties |
| The $xdid identifier is a given mIRC alias that communicates with the DCX DLL to extract information in DCX controls. |
|
$xdid().contextmenus |
| This property lets you retrieve the default context menus state. $true if the menus are enabled. |
| Syntax: |
$xdid(dialog, ID).contextmenus |
| Example: |
$xdid(dcx, 4).contextmenus |
|
$xdid().datafolder |
| This property lets you retrieve the data folder being used. |
| Syntax: |
$xdid(dialog, ID).datafolder |
| Example: |
$xdid(dcx, 4).datafolder |
|
$xdid().downloaddialog |
| This property lets you retrieve the web message state. $true if the dialog is enabled. |
| Syntax: |
$xdid(dialog, ID).downloaddialog |
| Example: |
$xdid(dcx, 4).downloaddialog |
|
$xdid().downloads |
| This property lets you retrieve the downloads state. $true if downloads are enabled. |
| Syntax: |
$xdid(dialog, ID).downloads |
| Example: |
$xdid(dcx, 4).downloads |
|
$xdid().fullscreen |
| This property lets you retrieve the fullscreen state of the webview. $true if fullscreen is enabled. |
| Syntax: |
$xdid(dialog, ID).fullscreen |
| Example: |
$xdid(dcx, 4).fullscreen |
|
$xdid().managed |
| This property lets you retrieve the managed window state. $true if opeing new windows is managed. |
| Syntax: |
$xdid(dialog, ID).managed |
| Example: |
$xdid(dcx, 4).managed |
|
$xdid().mute |
| This property lets you retrieve the audio mute state. $true if the audio is muted. |
| Syntax: |
$xdid(dialog, ID).mute |
| Example: |
$xdid(dcx, 4).mute |
|
$xdid().ready |
| This property lets does nothing atm. |
| Syntax: |
$xdid(dialog, ID).ready |
| Example: |
$xdid(dcx, 4).ready |
|
$xdid().scriptdialog |
| This property lets you retrieve the scripting dialog state. $true if the dialog is enabled. |
| Syntax: |
$xdid(dialog, ID).scriptdialog |
| Example: |
$xdid(dcx, 4).scriptdialog |
|
$xdid().scripts |
| This property lets you retrieve the scripting state. $true if scripting enabled. |
| Syntax: |
$xdid(dialog, ID).scripts |
| Example: |
$xdid(dcx, 4).scripts |
|
$xdid().statusbar |
| This property lets you retrieve the enabled state of the statusbar. If it is $true the statusbar is displayed, otherwise it's hidden. |
| Syntax: |
$xdid(dialog, ID).statusbar |
| Example: |
$xdid(dcx, 4).statusbar |
|
$xdid().statustext |
| This property lets you retrieve the text displayed in the statusbar. |
| Syntax: |
$xdid(dialog, ID).statustext |
| Example: |
$xdid(dcx, 4).statustext |
|
$xdid().url |
| This property lets you retrieve the current loaded url. |
| Syntax: |
$xdid(dialog, ID).url |
| Example: |
$xdid(dcx, 4).url |
|
$xdid().version |
| This property lets you retrieve the webview2 version. |
| Syntax: |
$xdid(dialog, ID).version |
| Example: |
$xdid(dcx, 4).version |
|
$xdid().webmessage |
| This property lets you retrieve the web message state. $true if web messages are enabled. |
| Syntax: |
$xdid(dialog, ID).webmessage |
| Example: |
$xdid(dcx, 4).webmessage |
| Web2 Control Events |
| These events are fired when activity occurs in the Web2 Control control. |
|
cache |
| Sent when the cache has been cleared. |
| Syntax: |
/cb_alias DNAME cache ID ERRORCODE |
| Example: |
/cb_alias dcx cache 4 1 |
|
contextmenu |
| When a context menu is about to be opened. |
| Syntax: |
/cb_alias DNAME contextmenu ID KIND X Y |
| Example: |
/cb_alias dcx contextmenu 4 COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_IMAGE 10 10 |
| Return | cancel Return this value to block opening the menu. |
|
devtools |
| When the browser state changes. |
| Syntax: |
/cb_alias DNAME devtools ID STATE |
| Example: |
/cb_alias dcx devtools 4 securityState=secure |
|
dl_begin |
| When downloading is about to begin. |
| Syntax: |
/cb_alias DNAME dl_begin ID TOTALBYTES FILENAME |
| Example: |
/cb_alias dcx dl_begin 4 1000000 c:\downloads\file.zip |
| Return | cancel - return this value to block the download. change [filename] - return this value to change the filename. (MUST be the full filepath) |
|
dl_canceled |
| Download has been canceled. |
| Syntax: |
/cb_alias DNAME dl_canceled ID REASON FILENAME |
| Example: |
/cb_alias dcx dl_canceled 4 1 c:\downloads\file.zip |
| Parameters: |
| REASON |
The reason WebView2 gave. |
| FILENAME |
The filename being downloaded too. |
|
dl_complete |
| When the downloading is complete. |
| Syntax: |
/cb_alias DNAME dl_complete ID FILENAME |
| Example: |
/cb_alias dcx dl_complete 4 c:\downloads\file.zip |
|
dl_progress |
| Downloading progress update. |
| Syntax: |
/cb_alias DNAME dl_progress ID CURRENT TOTAL FILENAME |
| Example: |
/cb_alias dcx dl_progress 4 259700 1000000 c:\downloads\file.zip |
| Parameters: |
| CURRENT |
Current dowload position. |
| TOTAL |
Maximum download position. |
| FILENAME |
The filename being downloaded too. |
| Return | cancel return this value to stop the download. | | | | Note. TOTAL can be 0, so make sure to check this before performing any calculation with it. |
|
externaluri |
| When an external uri scheme is clicked. |
| Syntax: |
/cb_alias DNAME externaluri ID URI |
| Example: |
/cb_alias dcx externaluri 4 irc://irc.sample.com/ |
| Return | cancel Return this value to block navigation. |
|
favicon |
| When the favicon changes. |
| Syntax: |
/cb_alias DNAME favicon ID [changed|saved|failed] [URL|FILE] |
| Example: |
/cb_alias dcx favicon 4 changed https://www.sample.com/favicon.ico |
| Return | save filename - return this value to save the favicon. (filename must be the full path to the file) | | | | Note. The save return value is only valid for changed events |
|
fullscreen |
| When the fullscreen state changes. |
| Syntax: |
/cb_alias DNAME fullscreen ID [fullscreen state] |
| Example: |
/cb_alias dcx fullscreen 4 1 |
| Return | $false return this value to stop the change. |
|
help |
| Launched when you click on a control using the ? contexthelp button. |
| Syntax: |
/cb_alias DNAME help ID |
| Example: |
/cb_alias dcx help 4 |
|
nav_begin |
| When the text is clicked. |
| Syntax: |
/cb_alias DNAME nav_begin ID URL |
| Example: |
/cb_alias dcx nav_begin 4 http://dcx.scriptsdb.org/ |
| Return | cancel return this value to block the navigation. |
|
nav_complete |
| When the control is finished navigating to the URL. |
| Syntax: |
/cb_alias DNAME nav_complete ID URL |
| Example: |
/cb_alias dcx nav_complete 4 http://dcx.scriptsdb.org/ |
|
proc_error |
| When an error occurs in the browser process. |
| Syntax: |
/cb_alias DNAME proc_error ID KIND |
| Example: |
/cb_alias dcx proc_error 4 COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED |
| Return | reload Return this value to attempt to fix the issue and display the page. |
|
script |
| When the script command finishes. |
| Syntax: |
/cb_alias DNAME script ID [Script result] |
| Example: |
/cb_alias dcx script 4 whatever the script returned |
|
source_changed |
| When a source page changes. |
| Syntax: |
/cb_alias DNAME source_changed ID URL |
| Example: |
/cb_alias dcx source_changed 4 https://www.sample.com/ |
|
status |
| When the statusbar text changes. |
| Syntax: |
/cb_alias DNAME status ID NEW_TEXT |
| Example: |
/cb_alias dcx status 4 New statusbar text |
|
title |
| when the title changes. |
| Syntax: |
/cb_alias DNAME title ID NEW_TEXT |
| Example: |
/cb_alias dcx title 4 The other page title |
|
win_close |
| When a script is requesting a window be closed. |
| Syntax: |
/cb_alias DNAME win_close ID URL |
| Example: |
/cb_alias dcx win_close 4 https://www.sample.com/ |
| | Note.- This event ONLY triggers if new window managment is enabled via xdid -m dname id +m +m.
- From the WebView docs:
- WindowCloseRequested triggers when content inside the WebView requested to close the window,
- such as after window.close is run.The app should close the WebView and related app window if that makes sense to the app.
|
|
win_open |
| When a new window is attempting to open. |
| Syntax: |
/cb_alias DNAME win_open ID URL |
| Example: |
/cb_alias dcx win_open 4 https://www.sample.com/ |
| Return | cancel Return this value to block the new window from opening. | | | | Note. This event ONLY triggers if new window managment is enabled via xdid -m dname id +m +m. |
|