• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

How to use browser link to call a delphi App?

Here is what I would like to do...

If you are viewing a web page with a browser and you click on a link like this one.

<A HREF="http://www.somewhere.com/myfile.abc">CLICK HERE</A>

I would like for my delphi program to be called and the url passed to it so that it can go get the file 'myfile.abc' and process it.

I want it to work just like Real Audio Player does when you click on a link for a file that ends in .ram ..... so how does one link a file suffix like .abc to the program that needs to process the file??

Does anyone know if some other delphi programmer has done this and made a program with source code available? or maybe some kind of a component?

..Gwen..
0
Gwena
Asked:
Gwena
1 Solution
 
simonetCommented:
RealAudio is not one program... it's two programs, and it works as a mean of a stream.

The server streams the data to the <OBJECT> R-A application in the client browser.

Alex
0
 
GwenaAuthor Commented:
Hi simonet :)

I was just using Real Audio as an example of how clicking on a link can cause a program to be launched....  I would like to have my program run if a user clicks on a link for a file that ends with a unique suffix like .abc  the way RA is launched when a file ends in .ram
:)
0
 
intheCommented:
id assume you just need to register your .abc file type in the registry..
then when its clicked it should launch your app..here a function someone wrote:

procedure RegisterFile;

var Reg: TRegistry;

begin
  Reg := TRegistry.Create;
  try
    Reg.RootKey := HKEY_CLASSES_ROOT;
    Reg.OpenKey('\.abc', True);
    Reg.WriteString('', 'MyProgram');
    Reg.OpenKey('\MyProgram', True);
    Reg.WriteString('', 'a very special file');
    Reg.OpenKey('\MyProgram\DefaultIcon', True);
    Reg.WriteString('', Application.ExeName + ', 1');
    Reg.OpenKey('\MyProgram\Shell\open\command', True);
    Reg.WriteString('', Application.ExeName + ' "%1"');
    ShowMessage('successfully registered');
  finally
    Reg.Free;
  end;
end;


Regards Barry
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
JaymolCommented:
Nicely done Barry.  Same as my "AssociateFileType" function!

John.
0
 
GwenaAuthor Commented:
Hi Inthe :)


That looks good!
I will try and get that to work.....
I think I will play with this on another computer..
I'm nervous about experimenting with the registry....I
messed with it once and had to reload windows :-)
0
 
GwenaAuthor Commented:
:-)
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now