Embeds a WebGadget / WebViewGadget into a ContainerGadget allowing for borders.
#Cr_WebView_Gadget#Cr_WebView_Inspect — includes #Cr_WebView_Gadget; same as #PB_WebView_Debug#Cr_WebGadget_BorderLess (default)#Cr_WebGadget_Flat#Cr_WebGadget_Raised#Cr_WebGadget_Single#Cr_WebGadget_DoubleCr_WebGadget(gadget, x, y, width, height, url.s = #Null$, flags = #Cr_WebGadget_BorderLess)
Resizes both the ContainerGadget and embedded WebGadget / WebViewGadget in a single call.
Cr_WebGadget_Resize(gadget, x, y, width, height)
Loads a WebGadget / WebViewGadget with HTML code.
SetGadgetItemText is used with the flag #PB_WebView_HtmlCode.SetGadgetText with the file:// protocol.Cr_WebGadget_SetHTML(gadget, html.s = #Null$, local = #False)
Navigates a WebGadget / WebViewGadget to the specified URL.
SetGadgetText.Cr_WebGadget_SetURL(gadget, url.s)
Attempts to cleanly end the running program.
#Window Number of the main window (useful if the window does not close immediately).Cr_WebSocket_Close(HideWindow = #Null)
Establishes a network connection to the Chrome DevTools Protocol (CDP) API.
Cr_WebSocket_PageData.Cr_WebSocket_Connect(PageID.s, PortNumber.l = #Null)
Extracts page data from a JSON string into a structured List.
Cr_WebSocket_PageData(*PageData, List PageData.PAGE_DATA())
Enable or disable browser-specific accelerator keys for the WebViewGadget.
Ctrl+F — Find on pageCtrl+P — PrintCtrl+R / F5 — RefreshCtrl+Plus / Ctrl+Minus / Ctrl+0 — Zoom in / out / resetCtrl+Shift+I — Open DevToolsAlt+Left / Alt+Right — Back / ForwardF6 — Focus address bar (in some contexts)Ctrl+U — View sourceCtrl+S — Save pageCtrl+A — Select all (when focused in page context)Ctrl+C / Ctrl+V / Ctrl+X — Copy / Paste / Cut (in some configurations)F12 — Open DevToolsCtrl+Shift+J — Open DevTools consoleEnableAcceleratorKeys(Gadget, Enable)
Set the visibility of a WebViewGadget, typically used when the parent window is minimized and then restored.
SetWebViewVisible(Gadget, Visible)
Brings a window to the top of the Z-order, attaching to the foreground thread if necessary.
#True (default), the window is also made visible via SW_SHOW.BringWindowToTop(hWnd, ShowWindow = #True)
Using the window title as a comparison, checks whether the program is currently running.
CheckInstance(WindowTitle.s, AllowContinue = #True)
Returns a PureBasic image created from a Base64-encoded string.
ConvertBase64(Base64_Image.s)
Searches the active TCP table and returns a port number in the range 9000–9999 that is bound to 127.0.0.1.
FindPortNumber(PortNumber.l)
Forces a window to visually appear active without changing actual focus.
ForceActiveWindow(hWnd, AlwaysActive)
Generates and returns a random GUID (Globally Unique Identifier), also known as a UUID.
GenerateUUID()
Animates a window or gadget to a new position and size.
#PB_Ignore — Position axis is not changed.#PB_InPlace — Expands or contracts from the center on that axis.#PB_Left / #PB_Right / #PB_Center — Align horizontally within the work area.#PB_Top / #PB_Bottom / #PB_Center — Align vertically within the work area.#PB_Ignore to leave unchanged.ResizeWindowEx(Window, X, Y, Width, Height, DelayTime = 5)
Validates a URL and returns it if valid; otherwise, returns an empty string.
ValidateURL(URL.s)