Use the Chrome browser now! - Forum

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

Use the Chrome browser now!

I have almost completed "ChromeNEO"

Action commands to use with the Google Chrome browser in VisualNEO Win applications


 

ChromeNEObeta.pub

ChromeNEObeta.exe

are here:

http://www.verticalbrowser.com/ads/ChromeNEObeta.zip

 

Click on the [*.*] button for a list of Chrome switches that can be used

by VisualNEO Win program authors and plugin developers

 


 

I am now trying to create a plugin (my first) with Delphi 10.3. I got it to load into Neobook but the name, publisher and description info is not showing.

.

 

 

zornjaso has reacted to this post.
zornjaso

I wish you success with this @fkapnist.
A Chrome plugin would be really great!

fkapnist has reacted to this post.
fkapnist

 I got it to load into Neobook but the name, publisher and description info is not showing.

Just a guess: Have you change the parameter to AnsiString types?

Regards

Hans-Peter

fkapnist has reacted to this post.
fkapnist

I can load the CalendarPlugin.dpr example into Delphi 10.3.  It opens without errors. I can compile the project without errors. It automatically creates a CalendarPlugin.nbp plugin. Neobook recognizes that file but when it installs it as a plugin, the name and description do not display and the calendar action does not work. What needs to be modified? Is there a plugin example file that works out of the box?

All examples work. But they are not written for Delphi 10.3. Try Delphi D7 or change the parameters of AnsiString

fkapnist has reacted to this post.
fkapnist

I added this

type
string = AnsiString;
Char = WideChar;
PChar = PWideChar;

but I got this error

[ dcc32 Error ] CalendarPlugIn.dpr(22): E2029 Identifier expected but 'STRING ' found
[ dcc32 Error ] CalendarPlugIn.dpr(22): E2029 ' = ' expected but ' ; ' found

and the plugin sample instructions said not to use String but PCHAR instead.....

Since Plug-Ins are DLLs, we need to store text as a PCHAR rather than a STRING. This makes it possible to easily transfer data to and from VisualNEO Win. Since PCHARs are pointers, they can sometimes be a little difficult to work with. However, if you use the SetStr procedure whenever you modify a PCHAR you shouldn’t have any trouble.

 

To typecast a WideString to PChar


var
W: WideString;
S: AnsiString;
P: PChar;
begin
W := 'Hello world!';
S := W; // converts to AnsiString
P := PChar(S); // points P to S' buffer


Is this the correct solution?

YES! The wide to ansi string conversion finally makes text readable in the plugin ....


 

W := 'Use this plug-in to add a simple calendar control to NeoBook.';
S := W; // converts to AnsiString
P := PChar(S); // points P to S' buffer
{ Description of this Plug-In }
SetStr( PlugInHint, P );

 

 

 

 

 

It should be easy to create a plugin that runs Chrome in a rectangle with pre-selected size and position (a rectangle can even be animated along a path).  Next is to allow it to communicate directly with the VisualNEO application.

Set ChromeVar

Get ChromeVar

Exe ChromeFunction

I'll see if the Chrome command line allows flags in the registry to be passed between Chrome and VisualNEO. There are other ways to do it, but this is probably the most desirable...

Any suggestions?

 

 

chrome.runtime

Description: Use the chrome.runtime API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle. You can also use this API to convert the relative path of URLs to fully-qualified URLs.

getURL −  string chrome . runtime . getURL (string path)

sendMessage − chrome . runtime . sendMessage (string extensionId, any message, object options, function responseCallback)
sendNativeMessage − chrome. runtime. sendNativeMessage (string application, object message, function responseCallback)

 

 

https://developer.chrome.com/extensions/runtime

 

chrome.windows

Description: Use the chrome.windows API to interact with browser windows. You can use this API to create, modify, and rearrange windows in the browser.

Availability: Since Chrome 27.

Permissions: The chrome.windows API can be used without declaring any permission. However, the "tabs" permission is required in order to populate the url, title, and favIconUrl properties of Tab objects.

Methods

get
chrome . windows . get (integer windowId, object getInfo, function callback)

Gets details about a window.

https://developer.chrome.com/extensions/windows

.

A Mozilla plugin would also be useful.

Firefox uses the Chrome URL

Packages that are installed into Mozilla's chrome system can be referenced with special chrome URLs.

Installed packages have the advantage that they don't have security restrictions placed on them, which is necessary for many applications. Another advantage over other URL types is that they automatically handle multiple themes and locales. For example, a chrome URL lets you refer to a file in the theme such as an image without needing to know which theme the user is using. As long as the filenames are the same in each theme, you can refer to the file using a chrome URL. Mozilla will take care of determining where the file is located and return the right data. This also means that it doesn't matter where the package is installed to be able to access it. The chrome URLs are independent of where the files might physically be located. This makes it much easier to write applications that have lots of files since you don't have to worry about the details of locating files.

https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Tutorial/The_Chrome_URL

.

In addition to a Chrome plugin for VisualNEO Win, you can also create an extension or plugin for the Chrome and Firefox browser that interacts with your VisualNEO applications.