You can probably write one in P*werbasic that passes the URL to ShellExecute. Should just be a few lines.
Here's what it looks like in one of my C programs:
ShellExecute(0,"open","http://",0,0,0);
Best regards, Spehro Pefhany
--
"it\'s the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
Well.... on my pc (xp sp2) it does work,however you have to check the default application attatched to said extension, and maybe change it to the one you want, rightclick/properties on htm file and check/change the "opens with" part.
but I'd rather use Irfanview to view simple, local pics, which is what "start" does on my machine. It is kinda slick that an old DOS program can invoke real Windows things.
I don't know how to open the default browser pointing to, say, a jpg though (assuming that some other application is the default for .jpg). Probably somewhat more complex.
Best regards, Spehro Pefhany
--
"it\'s the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
I meant open the *default* browser (whatever program or path that might be on today) to look at a jpg (even though it's not the default application that launches when you click on a .jpg). I suppose a not- very-roundabout method would be to write out a little mimimally compliant html file with the jpg appropriately mentioned in it, and use 'start' on that temporary file.
Yes, it's pretty fast to look at multiple pics too, although slower to load than ACDSEE. The price is right.
All those backward compatibility barnacles have their plusses.
Best regards, Spehro Pefhany
--
"it\'s the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
--
Paul Hovnanian mailto:Paul@Hovnanian.com
------------------------------------------------------------------
What color is a chameleon looking in a mirror?
No, he's looking for a command that will open "the default browser", whatever you have that assigned to in the OS preferences; it could be any of dozens, although there are only about 4 or 5 most-popular ones.
I'm not on doze now, but I think someone mentioned: :>open /path/thepictureIwant.jpg , but that would open it with the default jpg viewer, not the default browser. Someone mentioned wrapping that in an HTML stub, like: thepictureIwant.jpg
title="thepictureIwant.jpg" alt="Sorry, apparently your browser doesn't support .jpg files =:-O" border="0"
Save that as thepictureIwant.html, and change the command line to: :>open /path/thepictureIwant.html. Once you have the page, it's trivially easy to make a shortcut to it on your desktop - just right-drag it and select "create shortcut here" from the pop-up menu.
I assumed that the OP knew which browser the default was, but in the event the intention is to create a process or program to be run by others, one would have to look that up. I'm guessing that the correct way would be to get the info out of the registry. I don't know of a 'command line' function that will take a file type (.html or .jpeg for example) and return the appropriate command name and path from the registry. That would seem to be the best way.
--
Paul Hovnanian mailto:Paul@Hovnanian.com
------------------------------------------------------------------
"Grant me the strength to change what I can, the ability to accept
what I can\'t, and the incapacity to tell the difference."
-- Calvin (of Calvin and Hobbes)
I found this once while looking for a way to make a CD that autoruns:
formatting link
Apparently it's a little program that does just that - finds the default browser and opens whatever page you tell it to. You'd have to include it with your app, if you're distributing something. I haven't bothered to look up the licensing stuff, but I think he's giving it away.
I think this program just calls ShellExecute. It will open whichever program is associated, not just the browser.
Eg. browsercall test.txt opens UltraEdit on my machine (if test.txt exists).
Best regards, Spehro Pefhany
--
"it\'s the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.