Chrome "blob" communicates with VisualNEO Win - Forum

Forum Navigation
Climate strike banner
You need to log in to create posts and topics.

Chrome "blob" communicates with VisualNEO Win

The Chrome browser will run in a VisualNEO Win rectangle. But it needs a blob in the user Downloads folder to exchange data...

A binary large object (Blob) is a collection of raw binary data stored as a single entity. (Blobs were originally "chunks of data" named after a 1958 Steve McQueen movie.) Blobs are typically images, audio or other multimedia objects.

Features of HTML5 (specifically the “Blob” object, the FileAPI, and the “download” attribute of the “a” tag) allow the Chrome browser to load, edit, and save a blob file on your local computer. A local text file can be used to communicate with VisualNEO Win. It works in both Chrome and Firefox browsers.

Google said it might drop Chrome support for Windows applications. But Google needs to keep Chrome at the top of RAD rankings.

I decided not to use the Call function after all, to avoid writing many files to disc. This code in a Timer object (with 1000 ms interval) looks for a blob named myCall.txt in the Downloads folder, converts it to a variable, and runs it with hpwPlayAction.

StrReplace "[ProgramFiles]" "Program Files (x86)" "Users\[UserName]" "[UserDrive]" "CaseSensitive"
.AlertBox "" "[UserDrive]"
FileExists "[UserDrive]Downloads\myCall.txt" "[ifoo]"
If "[ifoo]" "=" "True"
GotoLine "winfile"

StrReplace "[ProgramFiles]" "Program Files (x86)" "Users\[UserName]" "[UserDrive]" "CaseSensitive"
.AlertBox "" "[UserDrive]"
FileToVar "[UserDrive]Downloads\myCall.txt" "[ChromeCallVar]"
Delay "50"
FileErase "[UserDrive]Downloads\myCall.txt"
Delay "50"
SetVar "[CurrentDir]" "[PubDir]files\"
hpwPlayAction "[ChromeCallVar]" "1"


The above Timer example assumes the blob is not encrypted. A blob function can be written in VisualNEO script, VBScript or JScript.

If I try to run Chrome.exe in a rectangle, it gives out "Unable to detect main window" error. Any advice on this?

Quote from neodude on March 27, 2019, 11:23 pm

If I try to run Chrome.exe in a rectangle, it gives out "Unable to detect main window" error. Any advice on this?

The first time you run Chrome it takes a while to load and your application may time out and report an error saying that it cannot detect Chrome. The solution is to run an INIT invisible instance of Chrome before your application so that Chrome is already in memory and responds quickly.  Also you can't run a second instance in the same rectangle until you properly close the first one. To get working code, go to the following forum topic and download the entire folder of files and examples I have there:

I hope you enjoy it.