URL to run application

BlitzMax Forums/BlitzMax Programming/URL to run application

Retimer(Posted 2009) [#1]
As winamp does with .pls files, or .torrent does with torrent programs, when you open an url to a certain filetype, it opens the program associated with those files.

I would have asked this in general help, but it may get restored, so i'm posting this here.

Could someone guide me on how I could go about setting this up 'using' blitzmax code for my own application if possible?


Volker(Posted 2009) [#2]
Openurl ("name.pls")
should work.


Otus(Posted 2009) [#3]
If you mean how to get your app to open when an URL to http://something/file.yourext is opened, that depends on the browser in use. Eg. Firefox stores the associations per profile. They can be changed from Options-Applications, but I'm not sure where they are stored on disk.


plash(Posted 2009) [#4]
Do you mean links like this?
mailto:...


Retimer(Posted 2009) [#5]
Openurl ("name.pls")
should work.


That will work when what i'm looking for is set up properly =p

Do you mean links like this?
mailto:...


No, however that might do it as well. What i'm looking to do is setup creative links in richtext format in a chatroom, so that when clicked, it will perform an action within the application for the client-user.

Otus - I take it that's for mac (or linux?), correct? Good to know anyhow.

I went through the registry for the extensions and there appears to be a pattern - i'm guessing only the registry is involved in this windows-wise, so i'll experiment with that unless anyone knows better..i'm more than prepared for a bit of help for generating this effect by code though =p


Gabriel(Posted 2009) [#6]
You're right about Windows, it's the registry. You'll have to find other ways on Linux and Mac though obviously. If I remember correctly, you need two keys in the registry.

HKEY_CLASSES_ROOT\.pls
@default = WinAmp.Playlist
HKCR\WinAmp.Playlist\shell\open\command
@default = "WinAmp.exe "%1""


Something like that?