Chromium WebGadget v4

Developed or developing a new product in PureBasic? Tell the world about it.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Edge WebGadget

Post by JHPJHP »

Updated:
- couple minor improvements
- squashed a bug

Patched a memory leak that would cause examples to intermittently crash.

Image
Last edited by JHPJHP on Sun Jul 10, 2022 2:50 pm, edited 3 times in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Edge WebGadget

Post by JHPJHP »

Updated:
- renamed CE_WebGadget_DevTools_Detail.pb to CE_WebGadget_DevTools_Detail_JS.pb
- added CE_WebGadget_DevTools_Detail.pb
- various minor improvements

Originally, JavaScript was the default method used to connect PureBasic to the DevTools Protocol; see examples ending in JS.
It's worth noting that while returned data can be displayed, it cannot be assign to a variable.

The new examples use only PureBasic script to connect to the DevTools Protocol; returned data can be displayed and/or assigned to a variable.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Edge WebGadget

Post by JHPJHP »

Updated:
- removed JSE examples
- removed SSE examples
- removed DevTools (JavaScript) examples
- improved DevTools examples

This was Part One of a major update, and with the recent changes it should now be easier to use the CEWG framework.
Full control over the Chromium Edge browser (embedded or otherwise) is demonstrated with the included examples.
Last edited by JHPJHP on Thu May 11, 2023 8:24 pm, edited 2 times in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Browser WebGadget

Post by JHPJHP »

Updated:
- rename framework to Chromium Browser WebGadget
- added option to use use either Edge or Chrome browser
- added Google Chrome option to standalone tool
- fixed a bug that affected only foreign language browsers

This was Part Two of a major update, and with the recent changes it should now be easier to use the CBWG framework.

To use Google Chrome instead of Microsoft Edge just set the Constant #CB_WebGadget_Browser_Override = "chrome" at the top of your program, before the IncludeFile; see any of the examples for location of framework Constants.
Last edited by JHPJHP on Thu Jun 30, 2022 12:01 am, edited 1 time in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Browser WebGadget

Post by JHPJHP »

Updated:
- added Headless Mode to standalone tool

Headless Mode runs the browser without a window.

This tool uses WebSockets to access CDP giving users complete control over Microsoft Edge and Google Chrome.
Last edited by JHPJHP on Wed Jun 29, 2022 11:02 pm, edited 2 times in total.
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Chromium Browser WebGadget

Post by ricardo »

JHPJHP wrote: Thu Jun 23, 2022 10:13 pm Updated:
- added Headless Mode to standalone tool
Great!!

Do you have any example (not neccessary headless) with filling and submiting a form?

Best Regards
ARGENTINA WORLD CHAMPION
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Browser WebGadget

Post by JHPJHP »

Hi ricardo
ricardo wrote:Do you have any example (not neccessary headless) with filling and submiting a form?
Currently there are no examples for filling-in and submitting a form, but with the existing examples it should be easy for you to figure out.

--------------------------------

Updated:
- improved CDP_Remote.pb
- various name changes

CDP_Remote.pb
1. Added context menu.
2. Added transparency when window is moved; right-click to hold transparency.
3. Added Base64 to PB Image Procedure for capturing screenshot; also works in Headless Mode.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Browser WebGadget

Post by JHPJHP »

Updated:
- improved CDP_Control_Panel.pb
- some name changes

Instead of listing all improvements, I'll just provide the following instructions to help demonstrate some of the new features.
- tool now supports Opera, Chrome and Edge browsers

1. Select Headless Browser (optional).
2. Press Select Browser button (choose browser).
3. Press Connect Port button.
4. Press Connect DevTools button.
5. Right-mouse-click Command List.
6. Select Send All.
Last edited by JHPJHP on Wed Jun 29, 2022 10:59 pm, edited 1 time in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Browser WebGadget

Post by JHPJHP »

Updated:
- modified sending DevTools commands
- improved (standalone) CDP Control Panel

Send DevTools Command
Previously, an array was used to send multiple commands, but it posed limitations when sending commands that were in direct response to data received from previously sent commands.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Browser WebGadget

Post by JHPJHP »

Updated (CDP Control Panel):
- added Command Queue
- added Command Delay
- added user-defined CLS files
- various other improvements

Command Queue
Provides better control over sending multiple Commands.

Command Delay
Provides a user-defined delay between Commands.
Delay occurs after a command has been executed and before the next command is called.
Delay is ignored for a single command or the last item in a command set.

User-Defined CLS File (per browser)
Remove leading underscore from file to override default settings.
Last edited by JHPJHP on Fri Jul 01, 2022 6:53 am, edited 1 time in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Browser WebGadget

Post by JHPJHP »

Updated (CDP Control Panel):
- added CheckBrowsers Procedure
- added Vivaldi browser
- added Brave browser
- added Epic browser
- added Port Connection view
- squashed a bug

See this post for basic instructions.

CheckBrowsers Procedure
Iterate through registry keys to determine if the browser was installed.

Supported Browsers: Edge, Chrome, Opera, Vivaldi, Brave, Epic
Last edited by JHPJHP on Fri Jul 15, 2022 3:14 am, edited 3 times in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Browser WebGadget

Post by JHPJHP »

Updated (CDP Control Panel):
- added multiple views
- various minor changes

Multiple Views
Show / Hide Display (returned JSON / Port Connection).

Minor Changes
WindowX, WindowY and Display View values are saved via ADS and will survive a restart (executable only).
Last edited by JHPJHP on Thu Jul 07, 2022 3:21 pm, edited 1 time in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Browser WebGadget

Post by JHPJHP »

Updated:
- squashed a couple bugs
- some minor improvements

Squashed Bugs
1. Variable already in use was causing intermittent crashes.
2. Rebuilding JSON from file was missing type Boolean.

--------------------------------

Update Reposted
Might have found another memory bug, applied a quick fix, time and testing will tell.
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Chromium Browser WebGadget

Post by ricardo »

Congrats, doing a great job!
ARGENTINA WORLD CHAMPION
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium Browser WebGadget

Post by JHPJHP »

Hi ricardo,
ricardo wrote:Congrats, doing a great job!
Thank you for your post.

----------------------

Updated (CDP Control Panel):
- improved Port Listening / Connection
Last edited by JHPJHP on Tue Jul 05, 2022 4:50 pm, edited 1 time in total.
Locked