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 WebGadget

Post by JHPJHP »

Updated:
- various Framework improvements

I just finished writing a complete list of improvements with descriptions, but when I submitted my post nothing was returned; I guess it timed-out.

One or more of the various updates may fix the previously reported problem. Unfortunately, I'm not able to confirm if the problem has been fixed because I'm not able to reproduce it. I can't even confirm there was a problem, but I'll keep testing none-the-less. :lol:

Why use the Chromium WebGadget over other options :?:
1. No dependencies; works with or without WebView2 installed.
2. No worries about an abandon project; the Chromium WebGadget is not effected by changes to WebView2.
3. Most major browsers have adopted the Chrome DevTools Protocol, fully accessible from the Chromium WebGadget.
4. Can be used as a WebGadget or applied to any installed Chromium browser.
5. Can run in Headless Mode when applied to a Chromium browser.
6. Headless mode supports controlling any Chromium browser remotely.
7. There are a wide variety of examples including Progressive Web Apps (PWA) via ISAPI.
8. The WebSocket scripts are cross platform, used for accessing the Chrome DevTools Protocol.
Last edited by JHPJHP on Thu Dec 15, 2022 7:22 pm, edited 2 times in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Updated:
- renamed Control Panel to Remote Command
- renamed folder IIS ISAPI Sites to ISAPI PWApps
- some minor framework improvements
JHPJHP wrote:... I can't even confirm there was a problem, but I'll keep testing none-the-less.
1. I found a 2015 ISO of Windows 10; before Chromium Edge.
2. I created a Hyper-V virtual machine (4 GB of RAM) using the Windows 10 ISO; Windows 11 host.
3. I updated the Windows 10 virtual machine, but only to the point where Microsoft Edge was replaced by Chromium Edge.
4. I executed the Chromium WebGadget compiled examples; all worked without an issue.
5. I updated the Windows 10 virtual machine to Version 20H2 using Windows Update.
6. I executed the Chromium WebGadget compiled examples; all worked without an issue.
7. I used the Microsoft Update Assistant (20H2 no longer supported) to update the Windows 10 virtual machine to Version 22H2.
8. I executed the Chromium WebGadget compiled examples; all worked without an issue.

RECAP: Works in a virtual environment with 4 GB of RAM, on all versions of Windows 10 where Chromium Edge was available, and Windows 11.
Last edited by JHPJHP on Sat Dec 24, 2022 3:52 pm, edited 2 times in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

I recently read a post where a forum member was asking how to access their home router programmatically to toggle its WIFI setting.

Wireshark was mentioned, great program, used it for years, but if I was to go down that road my preference would have been Fiddler, well, Fiddle Classic, closer to the original Eric Lawrence release.

Instead, with browser technology where it is, my suggestion is the Chromium WebGadget, or more accurately Remote Command.

Remote Command is a free standalone tool that allows the user to automate most browser actions, with the added option of running in Headless Mode (no visible browser). When in Headless Mode, to confirm the change was successful, webpage snapshots can be taken and viewed at various stages.

My suggestion is not only because I wrote the tool, but also because I was able to accomplish the task (on my home router) in under 10 minutes.
The same actions could be automated, without an interface, but would require access to the source code; see Standalone_Template.pb.

NOTE: A more detailed description of the process can be posted upon request.
plouf
Enthusiast
Enthusiast
Posts: 250
Joined: Fri Apr 25, 2003 6:35 pm
Location: Athens,Greece

Re: Chromium WebGadget

Post by plouf »

What this "remote command" has website?
Christos
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Hi plouf,
plouf wrote:What this "remote command" has website?
Remote Command is included with the Chromium WebGadget download; see previous posts for additional information.
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 627
Joined: Fri Dec 04, 2015 9:26 pm

Re: Chromium WebGadget

Post by skinkairewalker »

Is it possible to identify if any button inside the page was pressed and execute a native function?
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Hi skinkairewalker,
skinkairewalker wrote:Is it possible to identify if any button inside the page was pressed and execute a native function?
Yes, it's a simple process, but not just with the Chromium WebGadget, the framework also provides examples to embed JavaScript in your regular browser which includes an additional option for Headless Mode.

A similar question has been asked and answered in this post; works the same for any webpage.
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 627
Joined: Fri Dec 04, 2015 9:26 pm

Re: Chromium WebGadget

Post by skinkairewalker »

I wasn't able to understand easily... is there any practical example that I can study?
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Updated:
- added DevTools_Advanced.pb

1. Press the ButtonGadget to navigate to the PureBasic website.
-- script is embedded into the webpage
2. Press the Login button (power symbol) located near the top-right of the webpage.
-- embedded script is executed

NOTE: Every time the website is refreshed or changed the script is re-embedded.

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

I'll take some responsibility for the confusion people are having using the Chromium WebGadget; a lot can be said about a name. Originally, it was only going to be a simple WebGadget with basic features, but since incorporating the Chrome DevTools Protocol it stopped being a WebGadget and started being a framework to create simple to complex web tools: WebGadget, Progressive Web Apps, etc.

When answering questions I was still comparing the Chromium WebGadget with WebView2 and a possible improved PureBasic WebGadget, but it's so much more, which has little to do with my programming skills. The Chrome DevTools Protocol stands by itself, all I did was make it accessible from PureBasic by providing a framework and various examples to get started.

If you have a Chromium browser installed then you also have access to the protocol, regardless of your operating systems.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Updated:
- minor improvements to Remote Command
- fixed a couple memory issues

Memory Issues
Added a check to determine if a memory variable was initialized, and another when clearing a memory variable; issues affected all examples.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Updated:
- restructured directories
- added \CrWG Framework\Bootstrap Modern UI\DevTools_Heroes.pb
- improved \CrWG Framework\Framework Standard\DevTools_Advanced.pb

Bootstrap Modern UI
Lately I've read some posts concerning PureBasic and programming a Modern UI. This simple example demonstrates how easily it can be done using the Chromium WebGadget framework.

When time permits I’m available to help with questions about the framework, and even provide additional examples and shortcuts to assist with development. That said, if you post a question and I take the time to respond, please have the curtesy to reply with an acknowledgment.
Last edited by JHPJHP on Sun Feb 12, 2023 8:55 am, edited 1 time in total.
User avatar
Caronte3D
Addict
Addict
Posts: 1025
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Chromium WebGadget

Post by Caronte3D »

The Bootstrap thing is awesome, if it could be more easy to use would be perfect 8)
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Chromium WebGadget

Post by ChrisR »

I'm not at home so I can test your bootstrap example. But I can't wait to watch. A big thank you for all your excellent work and code shared 8) They are precious :)
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Hi Caronte3D,

Thank you for posting your observations and positive comments.

I've made a few changes to the original Bootstrap example and added a new example to help demonstrate how easy the framework can be to use.
The new example is identical to the first example except that it loads a completely different webpage but is still able to return all elements.

NOTE: The original HTML scripts were only slightly modified to work with PureBasic and the Chromium WebGadget framework.

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

Hi ChrisR,

Your kind words as always are appreciated.

The new example should help demonstrate the ease with which third-party frameworks such as Bootstrap, ChartJS, etc. can be incorporated.

Because I only had to make small changes to the original (Bootstrap) HTML code, the new example literally took 30 minutes to complete.

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

Updated:
- added \CrWG Framework\Bootstrap Modern UI\DevTools_Checkout.pb
- additional restructuring of directories
Last edited by JHPJHP on Fri Mar 10, 2023 5:40 am, edited 1 time in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

I'm currently in the process of writing another tool to make the framework easier to use; it will be released in two parts. The first part will allow the user to select various features while also providing information on their use. The second part has to do with auto-generated scripts; see videos below.

https://youtu.be/rMUayh1QPYs
https://developer.chrome.com/docs/devtools/recorder/

https://youtu.be/LBgzmqzp7ew
https://developer.chrome.com/docs/devto ... reference/

Because my download location also doubles as a backup, the Chromium WebGadget package now includes the above-mentioned work-in-progress.
Locked