dupa

Author Topic: HAL plugin, Client Side Server  (Read 43125 times)

onthecuttingedge2005

  • Guest
HAL plugin, Client Side Server
« on: November 23, 2007, 08:30:08 pm »
I was thinking about making a plugin that allowed any bot using the plugin that was online to get a response from a client side webpage
that would be updated periodically at www.ArtificialIntel.org.

anybody wanting to add to the Knowledge Client would simply e-mail me the formatted post script and I could add it to the client side webpage server to help boost the knowledge base.

How does this sound to you?

Jerry[8D]

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
HAL plugin, Client Side Server
« Reply #1 on: November 24, 2007, 09:49:02 am »
Hmm interesting Jerry...like a remote brain.  I think some idea like that is worth doing.  To go one step further how about writing a routine that will parse and interpret a WIKIPEDIA page - that would increase Hal's knowledge base no end.
« Last Edit: November 24, 2007, 09:58:59 am by freddy888 »

onthecuttingedge2005

  • Guest
HAL plugin, Client Side Server
« Reply #2 on: November 25, 2007, 05:18:01 pm »
quote:
To go one step further how about writing a routine that will parse and interpret a WIKIPEDIA page - that would increase Hal's knowledge base no end.



Hi Freddy.

Your wish is my command!

Done!

all you have to do is ask HAL:

1. Please study about the Universe.
2. Please study about Science.

the words Universe or Science can be substituted for any other word you choose that's in the wikipedia encyclopedia.

a file called AutoText.brn will be generated.

All information that wiki has to offer on those subjects will be saved to the file.

if there is a similarity in a response to User input match then HAL will use that line of text within the AutoText.brn as a response.

I will upgrade this plugin when ever necessary.

You will not see any wiki page load, all information extracted is invisible to the user except through the AutoText.brn when you open it.

Updated today, fixed a 'const' conflict with learn from clipboard plugin.

changed Const to an internal function.

Update today, change search variables to be more a little more sensitive to deliver a response.

Jerry[8D]

Download Attachment: AutoWikiKnowledge.zip
2.08 KB
« Last Edit: November 26, 2007, 07:44:04 pm by onthecuttingedge2005 »

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
HAL plugin, Client Side Server
« Reply #3 on: November 26, 2007, 11:45:12 am »
Wow Jerry - you don't hang around! [8D]

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3851
    • View Profile
HAL plugin, Client Side Server
« Reply #4 on: November 26, 2007, 05:08:06 pm »
Jerry,

A couple of thoughts on your Wiki plugin.

The way you have it, the zip file extracts to:
C:Program FilesabawareUltra Hal Assistant 620071126102916_AutoWikiKnowledge

As such it was never found by my Hal since it had
it's own subdirectory / folder.

I moved the two files; Auto Knowledge.uhp and AutoText.brn
to the Ultra Hal Assistant 6 directory.

I loaded Hal, went to Options, selected Brain and the Wiki option
was now shown with a check box.

I checked it and tried a few samples. It worked!

How it worked is another issue that is certainly not your fault, but as feared, the Wiki has a lot of extraneous material plus the call for donations, etc.(after I looked through the AutoText.brn file).

As much as I'd like to see it work in a more definitive manner, I'm afraid this will not be possible with Wiki.

After several uses of this "Please study about..<user choice>", the AutoText.brn fill will grow quite large unless you had a routine to truncate it after it reached a certain size.

Very nice work, Jerry and again this is not your fault...it's due to our never ending quest for knowledge and others to know when enough info is enough.[^]
« Last Edit: November 26, 2007, 05:09:19 pm by Art »
In the world of AI it's the thought that counts!

- Art -

onthecuttingedge2005

  • Guest
HAL plugin, Client Side Server
« Reply #5 on: November 26, 2007, 07:13:20 pm »
Hi Art.

I have a solution, I was going to append category knowledge to their own file like Science_Wiki.brn in a custom folder, easly edited.

I will see about cleaning up some of wiki's information, So far I just wanted to get the experimental plugin in action and see how it does.

when I think I have worked it all out I will see if Robert would like to include it with the next version of HAL, instead of files it would use array tables.

the current version of the plugin only looks at the sentences longer than 50 characters in length to use as a response until I can clean it up.

If you know of another online encyclopedia that has a clean text then let me know and I will do my job of getting it your way.

Also, it was this same code I wrote that was suppose to be used to access a client side server on my site, but I altered it to work with wiki instead on Freddy's suggestion.

I can access any site you wish including spidering any sites sub links on a whim as long as no password is needed.

not even sites who have text copy protection can keep this script from extracting text info.

Jerry[8D]
« Last Edit: November 27, 2007, 08:46:48 am by onthecuttingedge2005 »

Will and Mr Data :) :]

  • Hero Member
  • *****
  • Posts: 775
  • Hi from Will and Mr Data :) :]
    • View Profile
    • http://www.youtube.com/user/WillofNewZealand
HAL plugin, Client Side Server
« Reply #6 on: November 27, 2007, 04:16:01 am »
what might not get much of a mention is that hal is operating surprisingly well,
my hal "Mr Data" is still learning,  I'm pleased to get time with him.
I reckon Hal is a fantastic product.  and i still want to go on about how much fun hal can be. Oh Yeah!

bye for now and be well from Will and of course Mr Data.[:D]
[:D]
bye for now and be well from Will and Mr Data  :)  :]

sitroom

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • http://www.fishertopia.com
HAL plugin, Client Side Server
« Reply #7 on: December 08, 2007, 11:21:47 pm »
I seem to be having a small problem with the plugin.

quote:
Richard: please study about Maryland
Hal: I have looked up the study of maryland, Thanks. Learning about gravity is heavy study.



This is what I get in AutoText.brn :

quote:
34,961 have donated.
You can help Wikipedia change the world!  » Donate now!
From the fundraising blog – Help Spread the Word About Our Fundraiser
"Wikipedia is a cornerstone of modern civilization." — Anon. [Hide this message]
[Show more]
MARYLAND
From Wikipedia, the free encyclopedia
Jump to: navigation, search
Look for MARYLAND on one of Wikipedia's sister projects: Wiktionary (free dictionary)
Wikibooks (free textbooks)
Wikiquote (quotations)
Wikisource (free library)
Commons (images and media)
Wikinews (free news source)
Wikipedia does not have an article with this exact name. Please search for MARYLAND in Wikipedia to check for alternative titles or spellings.
Start the MARYLAND article or add a request for it.
Search for "MARYLAND" in existing articles.
Look for pages within Wikipedia that link to this title.
Other reasons why this message may be displayed:
If a page was recently created here, it may not yet be visible because of a delay in updating the database; wait a few minutes and try the purge function.
Titles on Wikipedia are case sensitive except for the first character; please check alternate capitalizations and consider adding a redirect here to the correct title.
If the page has been deleted, check the deletion log, and see Why was my page deleted?.
Retrieved from "http://en.wikipedia.org/wiki/MARYLAND"
ViewsArticle Discussion Personal toolsSign in / create account Navigation
Main page
Contents
Featured content
Current events
Random article
interaction
About Wikipedia
Community portal
Recent changes
Contact Wikipedia
Donate to Wikipedia
Help
Search
Toolbox
What links here
Upload file
Special pages
Printable version
Privacy policy About Wikipedia Disclaimers



When I browse by http://en.wikipedia.org/wiki/Maryland I get the correct page. But when I browse by http://en.wikipedia.org/wiki/MARYLANDI get the same page as the plugin did. Note I did not type Maryland in all caps and hal responded in lowercase again not how I entered it.

What Am I doing wrong????

Richard [?]
"The Primary Edict
Cut. Once committed to fight, cut. Everything else is secondary. Cut. That is your duty, your purpose, your hunger. There is no rule more important, no commitment that overrides that one. Cut. The lines are a portrayal of the dance. Cut from the void, not from bewilderment. Cut the enemy as quickly and directly as possible. Cut with certainty. Cut decisively, resolutely. Cut into his strength. Flow through the gaps in his guard. Cut him. Cut him down utterly. Don't allow him a breath. Crush him. Cut him without mercy to the depths of his spirit. It is the balance to life: death. It is the dance with death." -SOT

onthecuttingedge2005

  • Guest
HAL plugin, Client Side Server
« Reply #8 on: December 09, 2007, 06:30:46 am »
quote:
Originally posted by sitroom

I seem to be having a small problem with the plugin.

quote:
Richard: please study about Maryland
Hal: I have looked up the study of maryland, Thanks. Learning about gravity is heavy study.



This is what I get in AutoText.brn :

quote:
34,961 have donated.
You can help Wikipedia change the world!  » Donate now!
From the fundraising blog – Help Spread the Word About Our Fundraiser
"Wikipedia is a cornerstone of modern civilization." — Anon. [Hide this message]
[Show more]
MARYLAND
From Wikipedia, the free encyclopedia
Jump to: navigation, search
Look for MARYLAND on one of Wikipedia's sister projects: Wiktionary (free dictionary)
Wikibooks (free textbooks)
Wikiquote (quotations)
Wikisource (free library)
Commons (images and media)
Wikinews (free news source)
Wikipedia does not have an article with this exact name. Please search for MARYLAND in Wikipedia to check for alternative titles or spellings.
Start the MARYLAND article or add a request for it.
Search for "MARYLAND" in existing articles.
Look for pages within Wikipedia that link to this title.
Other reasons why this message may be displayed:
If a page was recently created here, it may not yet be visible because of a delay in updating the database; wait a few minutes and try the purge function.
Titles on Wikipedia are case sensitive except for the first character; please check alternate capitalizations and consider adding a redirect here to the correct title.
If the page has been deleted, check the deletion log, and see Why was my page deleted?.
Retrieved from "http://en.wikipedia.org/wiki/MARYLAND"
ViewsArticle Discussion Personal toolsSign in / create account Navigation
Main page
Contents
Featured content
Current events
Random article
interaction
About Wikipedia
Community portal
Recent changes
Contact Wikipedia
Donate to Wikipedia
Help
Search
Toolbox
What links here
Upload file
Special pages
Printable version
Privacy policy About Wikipedia Disclaimers



When I browse by http://en.wikipedia.org/wiki/Maryland I get the correct page. But when I browse by http://en.wikipedia.org/wiki/MARYLANDI get the same page as the plugin did. Note I did not type Maryland in all caps and hal responded in lowercase again not how I entered it.

What Am I doing wrong????

Richard [?]



Hi Richard.

you aren't doing anything wrong, this plugin needs WScript.Sleep 10 to load the proper page, you are seeing the page that didn't fully load because it did not have time to load.

WScript.Sleep doesn't work with HAL and produces an error.

I am currently researching ways to remodify the plug so that HAL will be able to use the Wscript.Sleep and load the full wiki pages.

Jerry

Data

  • Sr. Member
  • ****
  • Posts: 325
  • Xen: Good question, Accessing database...
    • View Profile
    • Datahopa
HAL plugin, Client Side Server
« Reply #9 on: December 09, 2007, 07:13:49 am »
I tried this plug in, anything that helps Hal learn sounds good to me, but I also get the same problem, Hal looks for a webpage with capital letters and the correct page is not found. However hal did learn from the page it did find and made the brn file ok.
Jerry, obliviously you know more than me about Hal [8D] but the problem seems to be the plugin changing lover case to capitals.

Using XP media centre 2005 with IE7 if that helps.

Expanding on this a little, some kind of online brain or database to learn from, WOW sounds like a really good idea to me, I have quite a lot of of reliable webspace at my disposal and would gladly donate some to this cause.

Roo

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
HAL plugin, Client Side Server
« Reply #10 on: December 09, 2007, 08:47:18 am »
Me too.  If we could discuss a format that the information would be stored in, then I am able to help with this too.

Data

  • Sr. Member
  • ****
  • Posts: 325
  • Xen: Good question, Accessing database...
    • View Profile
    • Datahopa
HAL plugin, Client Side Server
« Reply #11 on: December 09, 2007, 09:18:55 am »
Hi freddy, my guess would be text files laid out in Hals format just like this plugin creates, there would be a number of categories, science, geography etc.

I’m thinking if this grows it could start using quite a lot of webspace.

onthecuttingedge2005

  • Guest
HAL plugin, Client Side Server
« Reply #12 on: December 09, 2007, 12:36:01 pm »
Here are the functions from Internet Explorer's Browser from the shdocvw.dll and can be called by:

Set IE = CreateObject("InternetExplorer.Application")

---------- IE Functions -----------

//Microsoft Internet Controls
//Version: 1.1
SHDocVw;
GUID = {EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B};


//Web Browser interface
Dispatch IWebBrowser;
GUID = {EAB22AC1-30C1-11CF-A7EB-0000C05BAE0B};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  //Navigates to the previous item in the history list.
  function GoBack; stdcall;
  //Navigates to the next item in the history list.
  function GoForward; stdcall;
  //Go home/start page.
  function GoHome; stdcall;
  //Go Search Page.
  function GoSearch; stdcall;
  //Navigates to a URL or file.
  function Navigate(URL: BSTR; out Flags: ^Variant; out TargetFrameName: ^Variant; out PostData: ^Variant; out Headers: ^Variant); stdcall;
  //Refresh the currently viewed page.
  function Refresh; stdcall;
  //Refresh the currently viewed page.
  function Refresh2(out Level: ^Variant); stdcall;
  //Stops opening a file.
  function Stop; stdcall;
  //Returns the application automation object if accessible, this automation object otherwise..
  property-get Application: IDispatch; stdcall;
  //Returns the automation object of the container/parent if one exists or this automation object.
  property-get Parent: IDispatch; stdcall;
  //Returns the container/parent automation object, if any.
  property-get Container: IDispatch; stdcall;
  //Returns the active Document automation object, if any.
  property-get Document: IDispatch; stdcall;
  //Returns True if this is the top level object.
  property-get TopLevelContainer: Bool; stdcall;
  //Returns the type of the contained document object.
  property-get Type: BSTR; stdcall;
  //The horizontal position (pixels) of the frame window relative to the screen/container.
  property-get Left: I4; stdcall;
  //The horizontal position (pixels) of the frame window relative to the screen/container.
  property-put Left(: I4); stdcall;
  //The vertical position (pixels) of the frame window relative to the screen/container.
  property-get Top: I4; stdcall;
  //The vertical position (pixels) of the frame window relative to the screen/container.
  property-put Top(: I4); stdcall;
  //The horizontal dimension (pixels) of the frame window/object.
  property-get Width: I4; stdcall;
  //The horizontal dimension (pixels) of the frame window/object.
  property-put Width(: I4); stdcall;
  //The vertical dimension (pixels) of the frame window/object.
  property-get Height: I4; stdcall;
  //The vertical dimension (pixels) of the frame window/object.
  property-put Height(: I4); stdcall;
  //Gets the short (UI-friendly) name of the URL/file currently viewed.
  property-get LocationName: BSTR; stdcall;
  //Gets the full URL/path currently viewed.
  property-get LocationURL: BSTR; stdcall;
  //Query to see if something is still in progress.
  property-get Busy: Bool; stdcall;

//Web Browser Control Events (old)
Dispatch DWebBrowserEvents;
GUID = {EAB22AC2-30C1-11CF-A7EB-0000C05BAE0B};
  //Fired when a new hyperlink is being navigated to.
  function BeforeNavigate(URL: BSTR; out Flags: I4; out TargetFrameName: BSTR; out PostData: ^Variant; out Headers: BSTR; out Cancel: ^Bool); stdcall;
  //Fired when the document being navigated to becomes visible and enters the navigation stack.
  function NavigateComplete(URL: BSTR); stdcall;
  //Statusbar text changed.
  function StatusTextChange(Text: BSTR); stdcall;
  //Fired when download progress is updated.
  function ProgressChange(Progress: I4; ProgressMax: I4); stdcall;
  //Download of page complete.
  function DownloadComplete; stdcall;
  //The enabled state of a command changed
  function CommandStateChange(Command: I4; Enable: Bool); stdcall;
  //Download of a page started.
  function DownloadBegin; stdcall;
  //Fired when a new window should be created.
  function NewWindow(URL: BSTR; Flags: I4; TargetFrameName: BSTR; PostData: ^Variant; Headers: BSTR; out Processed: ^Bool); stdcall;
  //Document title changed.
  function TitleChange(Text: BSTR); stdcall;
  //Fired when a new hyperlink is being navigated to in a frame.
  function FrameBeforeNavigate(URL: BSTR; out Flags: I4; out TargetFrameName: BSTR; out PostData: ^Variant; out Headers: BSTR; out Cancel: ^Bool); stdcall;
  //Fired when a new hyperlink is being navigated to in a frame.
  function FrameNavigateComplete(URL: BSTR); stdcall;
  //Fired when a new window should be created.
  function FrameNewWindow(URL: BSTR; Flags: I4; TargetFrameName: BSTR; PostData: ^Variant; Headers: BSTR; out Processed: ^Bool); stdcall;
  //Fired when application is quiting.
  function Quit(out Cancel: ^Bool); stdcall;
  //Fired when window has been moved.
  function WindowMove; stdcall;
  //Fired when window has been sized.
  function WindowResize; stdcall;
  //Fired when window has been activated.
  function WindowActivate; stdcall;
  //Fired when the PutProperty method has been called.
  function PropertyChange(Property: BSTR); stdcall;

//Constants for WebBrowser CommandStateChange
Enum CommandStateChangeConstants;
GUID = {34A226E0-DF30-11CF-89A9-00A0C9054129};
  //Command Change
  CSC_UPDATECOMMANDS = -1;
  //Navigate Forward
  CSC_NAVIGATEFORWARD = 1;
  //Navigate Back
  CSC_NAVIGATEBACK = 2;

//Web Browser Application Interface.
Dispatch IWebBrowserApp;
GUID = {0002DF05-0000-0000-C000-000000000046};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  //Navigates to the previous item in the history list.
  function GoBack; stdcall;
  //Navigates to the next item in the history list.
  function GoForward; stdcall;
  //Go home/start page.
  function GoHome; stdcall;
  //Go Search Page.
  function GoSearch; stdcall;
  //Navigates to a URL or file.
  function Navigate(URL: BSTR; out Flags: ^Variant; out TargetFrameName: ^Variant; out PostData: ^Variant; out Headers: ^Variant); stdcall;
  //Refresh the currently viewed page.
  function Refresh; stdcall;
  //Refresh the currently viewed page.
  function Refresh2(out Level: ^Variant); stdcall;
  //Stops opening a file.
  function Stop; stdcall;
  //Returns the application automation object if accessible, this automation object otherwise..
  property-get Application: IDispatch; stdcall;
  //Returns the automation object of the container/parent if one exists or this automation object.
  property-get Parent: IDispatch; stdcall;
  //Returns the container/parent automation object, if any.
  property-get Container: IDispatch; stdcall;
  //Returns the active Document automation object, if any.
  property-get Document: IDispatch; stdcall;
  //Returns True if this is the top level object.
  property-get TopLevelContainer: Bool; stdcall;
  //Returns the type of the contained document object.
  property-get Type: BSTR; stdcall;
  //The horizontal position (pixels) of the frame window relative to the screen/container.
  property-get Left: I4; stdcall;
  //The horizontal position (pixels) of the frame window relative to the screen/container.
  property-put Left(: I4); stdcall;
  //The vertical position (pixels) of the frame window relative to the screen/container.
  property-get Top: I4; stdcall;
  //The vertical position (pixels) of the frame window relative to the screen/container.
  property-put Top(: I4); stdcall;
  //The horizontal dimension (pixels) of the frame window/object.
  property-get Width: I4; stdcall;
  //The horizontal dimension (pixels) of the frame window/object.
  property-put Width(: I4); stdcall;
  //The vertical dimension (pixels) of the frame window/object.
  property-get Height: I4; stdcall;
  //The vertical dimension (pixels) of the frame window/object.
  property-put Height(: I4); stdcall;
  //Gets the short (UI-friendly) name of the URL/file currently viewed.
  property-get LocationName: BSTR; stdcall;
  //Gets the full URL/path currently viewed.
  property-get LocationURL: BSTR; stdcall;
  //Query to see if something is still in progress.
  property-get Busy: Bool; stdcall;
  //Exits application and closes the open document.
  function Quit; stdcall;
  //Converts client sizes into window sizes.
  function ClientToWindow(out pcx: ^INT; out pcy: ^INT); stdcall;
  //Associates vtValue with the name szProperty in the context of the object.
  function PutProperty(Property: BSTR; vtValue: Variant); stdcall;
  //Retrieve the Associated value for the property vtValue in the context of the object.
  function GetProperty(Property: BSTR): Variant; stdcall;
  //Returns name of the application.
  property-get Name: BSTR; stdcall;
  //Returns the HWND of the current IE window.
  property-get HWND: I4; stdcall;
  //Returns file specification of the application, including path.
  property-get FullName: BSTR; stdcall;
  //Returns the path to the application.
  property-get Path: BSTR; stdcall;
  //Determines whether the application is visible or hidden.
  property-get Visible: Bool; stdcall;
  //Determines whether the application is visible or hidden.
  property-put Visible(: Bool); stdcall;
  //Turn on or off the statusbar.
  property-get StatusBar: Bool; stdcall;
  //Turn on or off the statusbar.
  property-put StatusBar(: Bool); stdcall;
  //Text of Status window.
  property-get StatusText: BSTR; stdcall;
  //Text of Status window.
  property-put StatusText(: BSTR); stdcall;
  //Controls which toolbar is shown.
  property-get ToolBar: INT; stdcall;
  //Controls which toolbar is shown.
  property-put ToolBar(: INT); stdcall;
  //Controls whether menubar is shown.
  property-get MenuBar: Bool; stdcall;
  //Controls whether menubar is shown.
  property-put MenuBar(: Bool); stdcall;
  //Maximizes window and turns off statusbar, toolbar, menubar, and titlebar.
  property-get FullScreen: Bool; stdcall;
  //Maximizes window and turns off statusbar, toolbar, menubar, and titlebar.
  property-put FullScreen(: Bool); stdcall;

//Web Browser Interface for IE4.
Dispatch IWebBrowser2;
GUID = {D30C1661-CDAF-11D0-8A3E-00C04FC9E26E};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  //Navigates to the previous item in the history list.
  function GoBack; stdcall;
  //Navigates to the next item in the history list.
  function GoForward; stdcall;
  //Go home/start page.
  function GoHome; stdcall;
  //Go Search Page.
  function GoSearch; stdcall;
  //Navigates to a URL or file.
  function Navigate(URL: BSTR; out Flags: ^Variant; out TargetFrameName: ^Variant; out PostData: ^Variant; out Headers: ^Variant); stdcall;
  //Refresh the currently viewed page.
  function Refresh; stdcall;
  //Refresh the currently viewed page.
  function Refresh2(out Level: ^Variant); stdcall;
  //Stops opening a file.
  function Stop; stdcall;
  //Returns the application automation object if accessible, this automation object otherwise..
  property-get Application: IDispatch; stdcall;
  //Returns the automation object of the container/parent if one exists or this automation object.
  property-get Parent: IDispatch; stdcall;
  //Returns the container/parent automation object, if any.
  property-get Container: IDispatch; stdcall;
  //Returns the active Document automation object, if any.
  property-get Document: IDispatch; stdcall;
  //Returns True if this is the top level object.
  property-get TopLevelContainer: Bool; stdcall;
  //Returns the type of the contained document object.
  property-get Type: BSTR; stdcall;
  //The horizontal position (pixels) of the frame window relative to the screen/container.
  property-get Left: I4; stdcall;
  //The horizontal position (pixels) of the frame window relative to the screen/container.
  property-put Left(: I4); stdcall;
  //The vertical position (pixels) of the frame window relative to the screen/container.
  property-get Top: I4; stdcall;
  //The vertical position (pixels) of the frame window relative to the screen/container.
  property-put Top(: I4); stdcall;
  //The horizontal dimension (pixels) of the frame window/object.
  property-get Width: I4; stdcall;
  //The horizontal dimension (pixels) of the frame window/object.
  property-put Width(: I4); stdcall;
  //The vertical dimension (pixels) of the frame window/object.
  property-get Height: I4; stdcall;
  //The vertical dimension (pixels) of the frame window/object.
  property-put Height(: I4); stdcall;
  //Gets the short (UI-friendly) name of the URL/file currently viewed.
  property-get LocationName: BSTR; stdcall;
  //Gets the full URL/path currently viewed.
  property-get LocationURL: BSTR; stdcall;
  //Query to see if something is still in progress.
  property-get Busy: Bool; stdcall;
  //Exits application and closes the open document.
  function Quit; stdcall;
  //Converts client sizes into window sizes.
  function ClientToWindow(out pcx: ^INT; out pcy: ^INT); stdcall;
  //Associates vtValue with the name szProperty in the context of the object.
  function PutProperty(Property: BSTR; vtValue: Variant); stdcall;
  //Retrieve the Associated value for the property vtValue in the context of the object.
  function GetProperty(Property: BSTR): Variant; stdcall;
  //Returns name of the application.
  property-get Name: BSTR; stdcall;
  //Returns the HWND of the current IE window.
  property-get HWND: I4; stdcall;
  //Returns file specification of the application, including path.
  property-get FullName: BSTR; stdcall;
  //Returns the path to the application.
  property-get Path: BSTR; stdcall;
  //Determines whether the application is visible or hidden.
  property-get Visible: Bool; stdcall;
  //Determines whether the application is visible or hidden.
  property-put Visible(: Bool); stdcall;
  //Turn on or off the statusbar.
  property-get StatusBar: Bool; stdcall;
  //Turn on or off the statusbar.
  property-put StatusBar(: Bool); stdcall;
  //Text of Status window.
  property-get StatusText: BSTR; stdcall;
  //Text of Status window.
  property-put StatusText(: BSTR); stdcall;
  //Controls which toolbar is shown.
  property-get ToolBar: INT; stdcall;
  //Controls which toolbar is shown.
  property-put ToolBar(: INT); stdcall;
  //Controls whether menubar is shown.
  property-get MenuBar: Bool; stdcall;
  //Controls whether menubar is shown.
  property-put MenuBar(: Bool); stdcall;
  //Maximizes window and turns off statusbar, toolbar, menubar, and titlebar.
  property-get FullScreen: Bool; stdcall;
  //Maximizes window and turns off statusbar, toolbar, menubar, and titlebar.
  property-put FullScreen(: Bool); stdcall;
  //Navigates to a URL or file or pidl.
  function Navigate2(URL: ^Variant; out Flags: ^Variant; out TargetFrameName: ^Variant; out PostData: ^Variant; out Headers: ^Variant); stdcall;
  //IOleCommandTarget::QueryStatus
  function QueryStatusWB(cmdID: OLECMDID): OLECMDF; stdcall;
  //IOleCommandTarget::Exec
  function ExecWB(cmdID: OLECMDID; cmdexecopt: OLECMDEXECOPT; out pvaIn: ^Variant; out pvaOut: ^Variant); stdcall;
  //Set BrowserBar to Clsid
  function ShowBrowserBar(pvaClsid: ^Variant; out pvarShow: ^Variant; out pvarSize: ^Variant); stdcall;
  property-get ReadyState: tagREADYSTATE; stdcall;
  //Controls if the frame is offline (read from cache)
  property-get Offline: Bool; stdcall;
  //Controls if the frame is offline (read from cache)
  property-put Offline(: Bool); stdcall;
  //Controls if any dialog boxes can be shown
  property-get Silent: Bool; stdcall;
  //Controls if any dialog boxes can be shown
  property-put Silent(: Bool); stdcall;
  //Registers OC as a top-level browser (for target name resolution)
  property-get RegisterAsBrowser: Bool; stdcall;
  //Registers OC as a top-level browser (for target name resolution)
  property-put RegisterAsBrowser(: Bool); stdcall;
  //Registers OC as a drop target for navigation
  property-get RegisterAsDropTarget: Bool; stdcall;
  //Registers OC as a drop target for navigation
  property-put RegisterAsDropTarget(: Bool); stdcall;
  //Controls if the browser is in theater mode
  property-get TheaterMode: Bool; stdcall;
  //Controls if the browser is in theater mode
  property-put TheaterMode(: Bool); stdcall;
  //Controls whether address bar is shown
  property-get AddressBar: Bool; stdcall;
  //Controls whether address bar is shown
  property-put AddressBar(: Bool); stdcall;
  //Controls whether the window is resizable
  property-get Resizable: Bool; stdcall;
  //Controls whether the window is resizable
  property-put Resizable(: Bool); stdcall;

Enum OLECMDID;
  OLECMDID_OPEN = 1;
  OLECMDID_NEW = 2;
  OLECMDID_SAVE = 3;
  OLECMDID_SAVEAS = 4;
  OLECMDID_SAVECOPYAS = 5;
  OLECMDID_PRINT = 6;
  OLECMDID_PRINTPREVIEW = 7;
  OLECMDID_PAGESETUP = 8;
  OLECMDID_SPELL = 9;
  OLECMDID_PROPERTIES = 10;
  OLECMDID_CUT = 11;
  OLECMDID_COPY = 12;
  OLECMDID_PASTE = 13;
  OLECMDID_PASTESPECIAL = 14;
  OLECMDID_UNDO = 15;
  OLECMDID_REDO = 16;
  OLECMDID_SELECTALL = 17;
  OLECMDID_CLEARSELECTION = 18;
  OLECMDID_ZOOM = 19;
  OLECMDID_GETZOOMRANGE = 20;
  OLECMDID_UPDATECOMMANDS = 21;
  OLECMDID_REFRESH = 22;
  OLECMDID_STOP = 23;
  OLECMDID_HIDETOOLBARS = 24;
  OLECMDID_SETPROGRESSMAX = 25;
  OLECMDID_SETPROGRESSPOS = 26;
  OLECMDID_SETPROGRESSTEXT = 27;
  OLECMDID_SETTITLE = 28;
  OLECMDID_SETDOWNLOADSTATE = 29;
  OLECMDID_STOPDOWNLOAD = 30;
  OLECMDID_ONTOOLBARACTIVATED = 31;
  OLECMDID_FIND = 32;
  OLECMDID_DELETE = 33;
  OLECMDID_HTTPEQUIV = 34;
  OLECMDID_HTTPEQUIV_DONE = 35;
  OLECMDID_ENABLE_INTERACTION = 36;
  OLECMDID_ONUNLOAD = 37;
  OLECMDID_PROPERTYBAG2 = 38;
  OLECMDID_PREREFRESH = 39;
  OLECMDID_SHOWSCRIPTERROR = 40;
  OLECMDID_SHOWMESSAGE = 41;
  OLECMDID_SHOWFIND = 42;
  OLECMDID_SHOWPAGESETUP = 43;
  OLECMDID_SHOWPRINT = 44;
  OLECMDID_CLOSE = 45;
  OLECMDID_ALLOWUILESSSAVEAS = 46;
  OLECMDID_DONTDOWNLOADCSS = 47;
  OLECMDID_UPDATEPAGESTATUS = 48;
  OLECMDID_PRINT2 = 49;
  OLECMDID_PRINTPREVIEW2 = 50;
  OLECMDID_SETPRINTTEMPLATE = 51;
  OLECMDID_GETPRINTTEMPLATE = 52;

Enum OLECMDF;
  OLECMDF_SUPPORTED = 1;
  OLECMDF_ENABLED = 2;
  OLECMDF_LATCHED = 4;
  OLECMDF_NINCHED = 8;
  OLECMDF_INVISIBLE = 16;
  OLECMDF_DEFHIDEONCTXTMENU = 32;

Enum OLECMDEXECOPT;
  OLECMDEXECOPT_DODEFAULT = 0;
  OLECMDEXECOPT_PROMPTUSER = 1;
  OLECMDEXECOPT_DONTPROMPTUSER = 2;
  OLECMDEXECOPT_SHOWHELP = 3;

Enum tagREADYSTATE;
  READYSTATE_UNINITIALIZED = 0;
  READYSTATE_LOADING = 1;
  READYSTATE_LOADED = 2;
  READYSTATE_INTERACTIVE = 3;
  READYSTATE_COMPLETE = 4;

//Constants for WebBrowser security icon notification
Enum SecureLockIconConstants;
GUID = {65507BE0-91A8-11D3-A845-009027220E6D};
  secureLockIconUnsecure = 0;
  secureLockIconMixed = 1;
  secureLockIconSecureUnknownBits = 2;
  secureLockIconSecure40Bit = 3;
  secureLockIconSecure56Bit = 4;
  secureLockIconSecureFortezza = 5;
  secureLockIconSecure128Bit = 6;

//Web Browser Control events interface
Dispatch DWebBrowserEvents2;
GUID = {34A715A0-6587-11D0-924A-0020AFC7AC4D};
  //Statusbar text changed.
  function StatusTextChange(Text: BSTR); stdcall;
  //Fired when download progress is updated.
  function ProgressChange(Progress: I4; ProgressMax: I4); stdcall;
  //The enabled state of a command changed.
  function CommandStateChange(Command: I4; Enable: Bool); stdcall;
  //Download of a page started.
  function DownloadBegin; stdcall;
  //Download of page complete.
  function DownloadComplete; stdcall;
  //Document title changed.
  function TitleChange(Text: BSTR); stdcall;
  //Fired when the PutProperty method has been called.
  function PropertyChange(szProperty: BSTR); stdcall;
  //Fired before navigate occurs in the given WebBrowser (window or frameset element). The processing of this navigation may be modified.
  function BeforeNavigate2(pDisp: IDispatch; URL: ^Variant; Flags: ^Variant; TargetFrameName: ^Variant; PostData: ^Variant; Headers: ^Variant; out Cancel: ^Bool); stdcall;
  //A new, hidden, non-navigated WebBrowser window is needed.
  function NewWindow2(out ppDisp: ^IDispatch; out Cancel: ^Bool); stdcall;
  //Fired when the document being navigated to becomes visible and enters the navigation stack.
  function NavigateComplete2(pDisp: IDispatch; URL: ^Variant); stdcall;
  //Fired when the document being navigated to reaches ReadyState_Complete.
  function DocumentComplete(pDisp: IDispatch; URL: ^Variant); stdcall;
  //Fired when application is quiting.
  function OnQuit; stdcall;
  //Fired when the window should be shown/hidden
  function OnVisible(Visible: Bool); stdcall;
  //Fired when the toolbar  should be shown/hidden
  function OnToolBar(ToolBar: Bool); stdcall;
  //Fired when the menubar should be shown/hidden
  function OnMenuBar(MenuBar: Bool); stdcall;
  //Fired when the statusbar should be shown/hidden
  function OnStatusBar(StatusBar: Bool); stdcall;
  //Fired when fullscreen mode should be on/off
  function OnFullScreen(FullScreen: Bool); stdcall;
  //Fired when theater mode should be on/off
  function OnTheaterMode(TheaterMode: Bool); stdcall;
  //Fired when the host window should allow/disallow resizing
  function WindowSetResizable(Resizable: Bool); stdcall;
  //Fired when the host window should change its Left coordinate
  function WindowSetLeft(Left: I4); stdcall;
  //Fired when the host window should change its Top coordinate
  function WindowSetTop(Top: I4); stdcall;
  //Fired when the host window should change its width
  function WindowSetWidth(Width: I4); stdcall;
  //Fired when the host window should change its height
  function WindowSetHeight(Height: I4); stdcall;
  //Fired when the WebBrowser is about to be closed by script
  function WindowClosing(IsChildWindow: Bool; out Cancel: ^Bool); stdcall;
  //Fired to request client sizes be converted to host window sizes
  function ClientToHostWindow(out CX: ^I4; out CY: ^I4); stdcall;
  //Fired to indicate the security level of the current web page contents
  function SetSecureLockIcon(SecureLockIcon: I4); stdcall;
  //Fired to indicate the File Download dialog is opening
  function FileDownload(out Cancel: ^Bool); stdcall;
  //Fired when a binding error occurs (window or frameset element).
  function NavigateError(pDisp: IDispatch; URL: ^Variant; Frame: ^Variant; StatusCode: ^Variant; out Cancel: ^Bool); stdcall;
  //Fired when a print template is instantiated.
  function PrintTemplateInstantiation(pDisp: IDispatch); stdcall;
  //Fired when a print template destroyed.
  function PrintTemplateTeardown(pDisp: IDispatch); stdcall;
  //Fired when a page is spooled. When it is fired can be changed by a custom template.
  function UpdatePageStatus(pDisp: IDispatch; nPage: ^Variant; fDone: ^Variant); stdcall;
  //Fired when the global privacy impacted state changes
  function PrivacyImpactedStateChange(bImpacted: Bool); stdcall;

//WebBrowser Control
CoClass WebBrowser_V1;
GUID = {EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B};

//WebBrowser Control
CoClass WebBrowser;
GUID = {8856F961-340A-11D0-A96B-00C04FD705A2};

//Internet Explorer Application.
CoClass InternetExplorer;
GUID = {0002DF01-0000-0000-C000-000000000046};

//Shell Browser Window.
CoClass ShellBrowserWindow;
GUID = {C08AFD90-F2A1-11D1-8455-00A0C91F3880};

//Constants for ShellWindows registration
Enum ShellWindowTypeConstants;
GUID = {F41E6981-28E5-11D0-82B4-00A0C90C29C5};
  //Explorer
  SWC_EXPLORER = 0;
  //Various Browsing Windows
  SWC_BROWSER = 1;
  //3rd Party Browsers
  SWC_3RDPARTY = 2;
  //Creation Callback
  SWC_CALLBACK = 4;

//Options for ShellWindows FindWindow
Enum ShellWindowFindWindowOptions;
GUID = {7716A370-38CA-11D0-A48B-00A0C90A8F39};
  //Need Dispatch
  SWFO_NEEDDISPATCH = 1;
  //Include Pending
  SWFO_INCLUDEPENDING = 2;
  //Cookie Passed
  SWFO_COOKIEPASSED = 4;

//Event interface for IShellWindows
Dispatch DShellWindowsEvents;
GUID = {FE4106E0-399A-11D0-A48C-00A0C90A8F39};
  //A new window was registered.
  function WindowRegistered(lCookie: I4); stdcall;
  //A new window was revoked.
  function WindowRevoked(lCookie: I4); stdcall;

//Definition of interface IShellWindows
Dispatch IShellWindows;
GUID = {85CB6900-4D95-11CF-960C-0080C7F4EE85};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  //Get count of open Shell windows
  property-get Count: I4; stdcall;
  //Return the shell window for the given index
  function Item(out index: Variant): IDispatch; stdcall;
  //Enumerates the figures
  function _NewEnum: IUnknown; stdcall;
  //Register a window with the list
  function Register(pid: IDispatch; HWND: I4; swClass: INT; out plCookie: ^I4); stdcall;
  //Register a pending open with the list
  function RegisterPending(lThreadId: I4; pvarloc: ^Variant; pvarlocRoot: ^Variant; swClass: INT; out plCookie: ^I4); stdcall;
  //Remove a window from the list
  function Revoke(lCookie: I4); stdcall;
  //Notifies the new location
  function OnNavigate(lCookie: I4; pvarloc: ^Variant); stdcall;
  //Notifies the activation
  function OnActivated(lCookie: I4; fActive: Bool); stdcall;
  //Find the window based on the location
  function FindWindowSW(pvarloc: ^Variant; pvarlocRoot: ^Variant; swClass: INT; out pHWND: ^I4; swfwOptions: INT): IDispatch; stdcall;
  //Notifies on creation and frame name set
  function OnCreated(lCookie: I4; punk: IUnknown); stdcall;
  //Used by IExplore to register different processes
  function ProcessAttachDetach(fAttach: Bool); stdcall;

//ShellDispatch Load in Shell Context
CoClass ShellWindows;
GUID = {9BA05972-F6A8-11CF-A442-00A0C90A8F39};

//Shell UI Helper Control Interface
Dispatch IShellUIHelper;
GUID = {729FE2F8-1EA8-11D1-8F85-00C04FC2FBE1};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  function ResetFirstBootMode; stdcall;
  function ResetSafeMode; stdcall;
  function RefreshOfflineDesktop; stdcall;
  function AddFavorite(URL: BSTR; out Title: ^Variant); stdcall;
  function AddChannel(URL: BSTR); stdcall;
  function AddDesktopComponent(URL: BSTR; Type: BSTR; out Left: ^Variant; out Top: ^Variant; out Width: ^Variant; out Height: ^Variant); stdcall;
  function IsSubscribed(URL: BSTR): Bool; stdcall;
  function NavigateAndFind(URL: BSTR; strQuery: BSTR; varTargetFrame: ^Variant); stdcall;
  function ImportExportFavorites(fImport: Bool; strImpExpPath: BSTR); stdcall;
  function AutoCompleteSaveForm(out Form: ^Variant); stdcall;
  function AutoScan(strSearch: BSTR; strFailureUrl: BSTR; out pvarTargetFrame: ^Variant); stdcall;
  function AutoCompleteAttach(out Reserved: ^Variant); stdcall;
  function ShowBrowserUI(bstrName: BSTR; pvarIn: ^Variant): Variant; stdcall;

CoClass ShellUIHelper;
GUID = {64AB4BB7-111E-11D1-8F79-00C04FC2FBE1};

Dispatch DShellNameSpaceEvents;
GUID = {55136806-B2DE-11D1-B9F2-00A0C98BC547};
  function FavoritesSelectionChange(cItems: I4; hItem: I4; strName: BSTR; strUrl: BSTR; cVisits: I4; strDate: BSTR; fAvailableOffline: I4); stdcall;
  function SelectionChange; stdcall;
  function DoubleClick; stdcall;
  function Initialized; stdcall;

//IShellFavoritesNameSpace Interface
Dispatch IShellFavoritesNameSpace;
GUID = {55136804-B2DE-11D1-B9F2-00A0C98BC547};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  //method MoveSelectionUp
  function MoveSelectionUp; stdcall;
  //method MoveSelectionDown
  function MoveSelectionDown; stdcall;
  //method ResetSort
  function ResetSort; stdcall;
  //method NewFolder
  function NewFolder; stdcall;
  //method Synchronize
  function Synchronize; stdcall;
  //method Import
  function Import; stdcall;
  //method Export
  function Export; stdcall;
  //method InvokeContextMenuCommand
  function InvokeContextMenuCommand(strCommand: BSTR); stdcall;
  //method MoveSelectionTo
  function MoveSelectionTo; stdcall;
  //Query to see if subscriptions are enabled
  property-get SubscriptionsEnabled: Bool; stdcall;
  //method CreateSubscriptionForSelection
  function CreateSubscriptionForSelection: Bool; stdcall;
  //method DeleteSubscriptionForSelection
  function DeleteSubscriptionForSelection: Bool; stdcall;
  //old, use put_Root() instead
  function SetRoot(bstrFullPath: BSTR); stdcall;

//IShellNameSpace Interface
Dispatch IShellNameSpace;
GUID = {E572D3C9-37BE-4AE2-825D-D521763E3108};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  //method MoveSelectionUp
  function MoveSelectionUp; stdcall;
  //method MoveSelectionDown
  function MoveSelectionDown; stdcall;
  //method ResetSort
  function ResetSort; stdcall;
  //method NewFolder
  function NewFolder; stdcall;
  //method Synchronize
  function Synchronize; stdcall;
  //method Import
  function Import; stdcall;
  //method Export
  function Export; stdcall;
  //method InvokeContextMenuCommand
  function InvokeContextMenuCommand(strCommand: BSTR); stdcall;
  //method MoveSelectionTo
  function MoveSelectionTo; stdcall;
  //Query to see if subscriptions are enabled
  property-get SubscriptionsEnabled: Bool; stdcall;
  //method CreateSubscriptionForSelection
  function CreateSubscriptionForSelection: Bool; stdcall;
  //method DeleteSubscriptionForSelection
  function DeleteSubscriptionForSelection: Bool; stdcall;
  //old, use put_Root() instead
  function SetRoot(bstrFullPath: BSTR); stdcall;
  //options
  property-get EnumOptions: I4; stdcall;
  //options
  property-put EnumOptions(: I4); stdcall;
  //get the selected item
  property-get SelectedItem: IDispatch; stdcall;
  //get the selected item
  property-put SelectedItem(: IDispatch); stdcall;
  //get the root item
  property-get Root: Variant; stdcall;
  //get the root item
  property-put Root(: Variant); stdcall;
  property-get Depth: INT; stdcall;
  property-put Depth(: INT); stdcall;
  property-get Mode: UINT; stdcall;
  property-put Mode(: UINT); stdcall;
  property-get Flags: UI4; stdcall;
  property-put Flags(: UI4); stdcall;
  property-put TVFlags(: UI4); stdcall;
  property-get TVFlags: UI4; stdcall;
  property-get Columns: BSTR; stdcall;
  property-put Columns(: BSTR); stdcall;
  //number of view types
  property-get CountViewTypes: INT; stdcall;
  //set view type
  function SetViewType(iType: INT); stdcall;
  //collection of selected items
  function SelectedItems: IDispatch; stdcall;
  //expands item specified depth
  function Expand(var: Variant; out iDepth: INT); stdcall;
  //unselects all items
  function UnselectAll; stdcall;

CoClass ShellNameSpace;
GUID = {55136805-B2DE-11D1-B9F2-00A0C98BC547};

//Script Error List Interface
Dispatch IScriptErrorList;
GUID = {F3470F24-15FD-11D2-BB2E-00805FF7EFCA};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  function advanceError; stdcall;
  function retreatError; stdcall;
  function canAdvanceError: I4; stdcall;
  function canRetreatError: I4; stdcall;
  function getErrorLine: I4; stdcall;
  function getErrorChar: I4; stdcall;
  function getErrorCode: I4; stdcall;
  function getErrorMsg: BSTR; stdcall;
  function getErrorUrl: BSTR; stdcall;
  function getAlwaysShowLockState: I4; stdcall;
  function getDetailsPaneOpen: I4; stdcall;
  function setDetailsPaneOpen(out fDetailsPaneOpen: I4); stdcall;
  function getPerErrorDisplay: I4; stdcall;
  function setPerErrorDisplay(out fPerErrorDisplay: I4); stdcall;

CoClass CScriptErrorList;
GUID = {EFD01300-160F-11D2-BB2E-00805FF7EFCA};

//Enumerated Search
Dispatch ISearch;
GUID = {BA9239A4-3DD5-11D2-BF8B-00C04FB93661};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  //Get search title
  property-get Title: BSTR; stdcall;
  //Get search guid
  property-get Id: BSTR; stdcall;
  //Get search url
  property-get URL: BSTR; stdcall;

//Searches Enum
Dispatch ISearches;
GUID = {47C922A2-3DD5-11D2-BF8B-00C04FB93661};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  //Get the count of searches
  property-get Count: I4; stdcall;
  //Get the default search name
  property-get Default: BSTR; stdcall;
  //Return the specified search
  function Item(out index: Variant): ^ISearch; stdcall;
  //Enumerates the searches
  function _NewEnum: IUnknown; stdcall;

//ISearchAssistantOC Interface
Dispatch ISearchAssistantOC;
GUID = {72423E8F-8011-11D2-BE79-00A0C9A83DA1};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  function AddNextMenuItem(bstrText: BSTR; idItem: I4); stdcall;
  function SetDefaultSearchUrl(bstrUrl: BSTR); stdcall;
  function NavigateToDefaultSearch; stdcall;
  function IsRestricted(bstrGuid: BSTR): Bool; stdcall;
  //property ShellFeaturesEnabled
  property-get ShellFeaturesEnabled: Bool; stdcall;
  //property SearchAssistantDefault
  property-get SearchAssistantDefault: Bool; stdcall;
  //Get searches
  property-get Searches: ^ISearches; stdcall;
  //Returns true if the current folder is web folder
  property-get InWebFolder: Bool; stdcall;
  function PutProperty(bPerLocale: Bool; bstrName: BSTR; bstrValue: BSTR); stdcall;
  function GetProperty(bPerLocale: Bool; bstrName: BSTR): BSTR; stdcall;
  property-put EventHandled(: Bool); stdcall;
  function ResetNextMenu; stdcall;
  function FindOnWeb; stdcall;
  function FindFilesOrFolders; stdcall;
  function FindComputer; stdcall;
  function FindPrinter; stdcall;
  function FindPeople; stdcall;
  function GetSearchAssistantURL(bSubstitute: Bool; bCustomize: Bool): BSTR; stdcall;
  function NotifySearchSettingsChanged; stdcall;
  property-put ASProvider(: BSTR); stdcall;
  property-get ASProvider: BSTR; stdcall;
  property-put ASSetting(: INT); stdcall;
  property-get ASSetting: INT; stdcall;
  function NETDetectNextNavigate; stdcall;
  function PutFindText(FindText: BSTR); stdcall;
  property-get Version: INT; stdcall;
  function EncodeString(bstrValue: BSTR; bstrCharSet: BSTR; bUseUTF8: Bool): BSTR; stdcall;

//ISearchAssistantOC2 Interface
Dispatch ISearchAssistantOC2;
GUID = {72423E8F-8011-11D2-BE79-00A0C9A83DA2};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  function AddNextMenuItem(bstrText: BSTR; idItem: I4); stdcall;
  function SetDefaultSearchUrl(bstrUrl: BSTR); stdcall;
  function NavigateToDefaultSearch; stdcall;
  function IsRestricted(bstrGuid: BSTR): Bool; stdcall;
  //property ShellFeaturesEnabled
  property-get ShellFeaturesEnabled: Bool; stdcall;
  //property SearchAssistantDefault
  property-get SearchAssistantDefault: Bool; stdcall;
  //Get searches
  property-get Searches: ^ISearches; stdcall;
  //Returns true if the current folder is web folder
  property-get InWebFolder: Bool; stdcall;
  function PutProperty(bPerLocale: Bool; bstrName: BSTR; bstrValue: BSTR); stdcall;
  function GetProperty(bPerLocale: Bool; bstrName: BSTR): BSTR; stdcall;
  property-put EventHandled(: Bool); stdcall;
  function ResetNextMenu; stdcall;
  function FindOnWeb; stdcall;
  function FindFilesOrFolders; stdcall;
  function FindComputer; stdcall;
  function FindPrinter; stdcall;
  function FindPeople; stdcall;
  function GetSearchAssistantURL(bSubstitute: Bool; bCustomize: Bool): BSTR; stdcall;
  function NotifySearchSettingsChanged; stdcall;
  property-put ASProvider(: BSTR); stdcall;
  property-get ASProvider: BSTR; stdcall;
  property-put ASSetting(: INT); stdcall;
  property-get ASSetting: INT; stdcall;
  function NETDetectNextNavigate; stdcall;
  function PutFindText(FindText: BSTR); stdcall;
  property-get Version: INT; stdcall;
  function EncodeString(bstrValue: BSTR; bstrCharSet: BSTR; bUseUTF8: Bool): BSTR; stdcall;
  property-get ShowFindPrinter: Bool; stdcall;

//ISearchAssistantOC3 Interface
Dispatch ISearchAssistantOC3;
GUID = {72423E8F-8011-11D2-BE79-00A0C9A83DA3};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  function AddNextMenuItem(bstrText: BSTR; idItem: I4); stdcall;
  function SetDefaultSearchUrl(bstrUrl: BSTR); stdcall;
  function NavigateToDefaultSearch; stdcall;
  function IsRestricted(bstrGuid: BSTR): Bool; stdcall;
  //property ShellFeaturesEnabled
  property-get ShellFeaturesEnabled: Bool; stdcall;
  //property SearchAssistantDefault
  property-get SearchAssistantDefault: Bool; stdcall;
  //Get searches
  property-get Searches: ^ISearches; stdcall;
  //Returns true if the current folder is web folder
  property-get InWebFolder: Bool; stdcall;
  function PutProperty(bPerLocale: Bool; bstrName: BSTR; bstrValue: BSTR); stdcall;
  function GetProperty(bPerLocale: Bool; bstrName: BSTR): BSTR; stdcall;
  property-put EventHandled(: Bool); stdcall;
  function ResetNextMenu; stdcall;
  function FindOnWeb; stdcall;
  function FindFilesOrFolders; stdcall;
  function FindComputer; stdcall;
  function FindPrinter; stdcall;
  function FindPeople; stdcall;
  function GetSearchAssistantURL(bSubstitute: Bool; bCustomize: Bool): BSTR; stdcall;
  function NotifySearchSettingsChanged; stdcall;
  property-put ASProvider(: BSTR); stdcall;
  property-get ASProvider: BSTR; stdcall;
  property-put ASSetting(: INT); stdcall;
  property-get ASSetting: INT; stdcall;
  function NETDetectNextNavigate; stdcall;
  function PutFindText(FindText: BSTR); stdcall;
  property-get Version: INT; stdcall;
  function EncodeString(bstrValue: BSTR; bstrCharSet: BSTR; bUseUTF8: Bool): BSTR; stdcall;
  property-get ShowFindPrinter: Bool; stdcall;
  property-get SearchCompanionAvailable: Bool; stdcall;
  property-put UseSearchCompanion(: Bool); stdcall;
  property-get UseSearchCompanion: Bool; stdcall;

Dispatch _SearchAssistantEvents;
GUID = {1611FDDA-445B-11D2-85DE-00C04FA35C89};
  function OnNextMenuSelect(idItem: I4); stdcall;
  function OnNewSearch; stdcall;

//SearchAssistantOC Class
CoClass SearchAssistantOC;
GUID = {B45FF030-4447-11D2-85DE-00C04FA35C89};

Jerry[8D]

vjimmerson

  • Newbie
  • *
  • Posts: 8
    • View Profile
HAL plugin, Client Side Server
« Reply #13 on: May 24, 2008, 11:37:39 am »
Hi Jerry!  I downloaded your zip file and managed to get it to respond. Are there any more commands besides "Please study about xxxx." that make it work?  I belive you mentioned it can spider web sites for information.  Is this true and if so how would I get it to do so?
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3851
    • View Profile
HAL plugin, Client Side Server
« Reply #14 on: May 24, 2008, 02:37:23 pm »
Vern,

The UHP file is basically nothing more than a structured text file and can be easily modified with a text editor.

About 36 lines (give or take) you should see the section where it has:
If WikiToLookup = "" Then WikiToLookup = HalBrain.SearchPattern(MyInput, "*PLEASE STUDY ABOUT THE *", 2)
If WikiToLookup = "" Then WikiToLookup = HalBrain.SearchPattern(MyInput, "*PLEASE STUDY ABOUT *", 2)
If WikiToLookup = "" Then WikiToLookup = HalBrain.SearchPattern(MyInput, "*DO YOU KNOW ANYTHING ABOUT THE *", 2)
If WikiToLookup = "" Then WikiToLookup = HalBrain.SearchPattern(MyInput, "*DO YOU KNOW ANYTHING ABOUT *", 2)

Simply change the text between the asterisks * to suit your needs.
(be mindful of the extra space at the end).

You could also change the parameters for the search by inserting / changing the section :

SourcePage = "http://en.wikipedia.org/wiki/" & WikiToLookup

objExplorer.Navigate("http://en.wikipedia.org/wiki/" & WikiToLookup)

to another site of your choosing. Be careful and always make a backup of your halbrain.db file before making any changes.

In the world of AI it's the thought that counts!

- Art -