Hey,
can you make it so that it will open ie or mozilla to a site?
can you open them at all?
Thanks,
Yeah
Hey,
can you make it so that it will open ie or mozilla to a site?
can you open them at all?
Thanks,
Yeah
Code:include <stdlib.h> int main(void){ system("mozilla.exe"); return 0; }
I think something like that would be more OS dependant. Some body else could probably shed more light on this than I could.
I know Firefox accepts an argument as the url to go to so
Could work.Code:system("/path/to/firefox http://yourdomain.com");
ok, thanks!
i have another though!!!
what about choosing the default browser, not just firefox or ie, but it looks for the default
is it possible?
thanks,
Yeah
Yes you could but I think that you should look into registry on Windows for that.
And that get value from registry and then execute that with System().
Maybe there is another way! But I dont now C so good that I could write a code for you how to get registry!
For the Win code you could look this thread !
And for pages on msdn look this thread!
Last edited by xxxrugby; 02-10-2005 at 01:05 PM.
Sorry for spelling errors, not English!
xxxrugby: "All Human Race Will Die From My Hand!"
xxxrugby: "We are all philosophers, when question is about politics!"
ShellExecute?
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens
Are you trying to open a specific website? If you know the website you want to open just create a shortcut to it and then have your program open the shortcut. When you do this the OS will take over and load it in the default browser.
i don't think most standard compilers support programmers with more than 4 red boxes - Misplaced
It is my sacred duity to stand in the path of the flood of ignorance and blatant stupidity... - quzah
Such pointless tricks ceased to be interesting or useful when we came down from the trees and started using higher level languages. - Salem
still,
how do you make it open the default browser.
maybe its an if statement!!
By opening the shortcut it will open it in the default browser, aka just open the shortcut.
i don't think most standard compilers support programmers with more than 4 red boxes - Misplaced
It is my sacred duity to stand in the path of the flood of ignorance and blatant stupidity... - quzah
Such pointless tricks ceased to be interesting or useful when we came down from the trees and started using higher level languages. - Salem
I know that if you use Run (Win+r, or startmenu) and type in an address like http://www.google.com it will open it in the default browser. I tested around some and found that "start" is like Run so...
Of course, replace google with whatever you want.Code:system("start http://www.google.com");
Last edited by OnionKnight; 02-12-2005 at 08:49 AM. Reason: Forgot code tag
While system() is a nice function and all, you would probably be better off with ShellExecute.
This will open Google in the default browser:
Code:ShellExecute(NULL, _T("open"), _T("http://google.com"), NULL, NULL, SW_SHOWNORMAL);
what does all that NULL stuff mean?
i know that null means "nothing" or no info!