Results 1 to 13 of 13
  1. #1
    h4x0rswln is back's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    415
    Reputation
    13
    Thanks
    84
    My Mood
    Cynical

    how to open a webpage in fire fox with c++?

    i'm trying...but even google is failing...

    so...what code would i use to open a url after firefox is open? i'm sure it's possible.

  2. #2
    Matrix_NEO006's Avatar
    Join Date
    Feb 2008
    Gender
    male
    Posts
    240
    Reputation
    12
    Thanks
    33
    My Mood
    Lonely
    if u have on your desktop:
    Code:
    #include <windows.h>
    int main ()
    {
    system("start firefox.exe  www.PUT THE WEBSITE HERE.com");
    return 0;
    }
    Last edited by Matrix_NEO006; 12-17-2009 at 10:50 PM.

  3. The Following User Says Thank You to Matrix_NEO006 For This Useful Post:

    h4x0rswln is back (12-16-2009)

  4. #3
    h4x0rswln is back's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    415
    Reputation
    13
    Thanks
    84
    My Mood
    Cynical
    Quote Originally Posted by Matrix_NEO006 View Post
    if u have on your desktop:
    Code:
    #include <windows.h>
    int main ()
    {
    system("start firefox.exe  www.PUT THE WEBSITE HERE.com")
    return 0;
    }
    much shorter then the code i was using, which was accurate according to a c++ tutorial but wouldn't compile due to errors.


    i'll go test this one out.

  5. #4
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    If you want to avoid using system() you can use ShellExecute instead.


    Code:
    ShellExecute(NULL,"open","www.google.com",NULL,NULL,SW_SHOWNORMAL);
    Last edited by Void; 12-16-2009 at 11:52 PM.

  6. #5
    h4x0rswln is back's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    415
    Reputation
    13
    Thanks
    84
    My Mood
    Cynical
    i'm getting an error with return 0;. any idea why?

  7. #6
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    You need to put a semi colon after system() function.

  8. #7
    h4x0rswln is back's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    415
    Reputation
    13
    Thanks
    84
    My Mood
    Cynical
    D: i forgot the semicolon! DOH!

    EDIT: works now, thanks guys.

  9. #8
    rwkeith's Avatar
    Join Date
    Jul 2008
    Gender
    male
    Posts
    457
    Reputation
    11
    Thanks
    79
    My Mood
    Angelic
    Maybe you should work on your C++ more?
    Goals In Life:
    [X] Become an Advanced Member
    [X]Release a tut on mpgh
    [0]Post 300 posts
    [X]Make a working hack
    [X] Learn c++

  10. The Following User Says Thank You to rwkeith For This Useful Post:

    Hell_Demon (12-17-2009)

  11. #9
    h4x0rswln is back's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    415
    Reputation
    13
    Thanks
    84
    My Mood
    Cynical
    Quote Originally Posted by rwkeith View Post
    Maybe you should work on your C++ more?
    i started two days ago <,<

  12. #10
    ilovecookies's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    In the C++ Section
    Posts
    321
    Reputation
    10
    Thanks
    67
    My Mood
    Shocked
    Quote Originally Posted by h4x0rswln is back View Post
    i started two days ago <,<
    It would serve you well to actually learn all of the syntax before trying to program. Otherwise Cstrings, Arrays, and Pointers are going to fuck your world up. Because technically Cstrings are Arrays, and Pointers are just terribly fucking confusing.
    Quote Originally Posted by Jules Winnfield View Post
    I am the tyranny of evil men, and you are all the weak. But i'm trying Ringo,i'm trying real hard, to become the shepherd.
    excuse me miss, would you kindly reflect some photons off the epidermis covering your sternum directly into the camera iris or vacate the proximity immediately
    [IMG]https://i882.photobucke*****m/albums/ac23/miki_d420/RealizingYoureALeecher2copy.jpg[/IMG]









  13. #11
    h4x0rswln is back's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    415
    Reputation
    13
    Thanks
    84
    My Mood
    Cynical
    Quote Originally Posted by ilovecookies View Post
    It would serve you well to actually learn all of the syntax before trying to program. Otherwise Cstrings, Arrays, and Pointers are going to fuck your world up. Because technically Cstrings are Arrays, and Pointers are just terribly fucking confusing.
    nah. i prefer to jump right in with basic knowledge and learn things as i go.

  14. #12
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Quote Originally Posted by h4x0rswln is back View Post
    nah. i prefer to jump right in with basic knowledge and learn things as i go.
    What basic knowledge...?



  15. #13
    ilovecookies's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    In the C++ Section
    Posts
    321
    Reputation
    10
    Thanks
    67
    My Mood
    Shocked
    Quote Originally Posted by h4x0rswln is back View Post
    nah. i prefer to jump right in with basic knowledge and learn things as i go.
    shellExecute isn't basic knowledge. At this point you don't really have use for the windows API.

    EDIT! I say this because i'm on Lesson 14 of Cprogrammings C++ Tut and it hasn't once yet called for the windows API header.
    Last edited by ilovecookies; 12-17-2009 at 07:17 PM.
    Quote Originally Posted by Jules Winnfield View Post
    I am the tyranny of evil men, and you are all the weak. But i'm trying Ringo,i'm trying real hard, to become the shepherd.
    excuse me miss, would you kindly reflect some photons off the epidermis covering your sternum directly into the camera iris or vacate the proximity immediately
    [IMG]https://i882.photobucke*****m/albums/ac23/miki_d420/RealizingYoureALeecher2copy.jpg[/IMG]









Similar Threads

  1. [TUT] How to Make a button or label open e webpage [TUT]
    By XGelite in forum Visual Basic Programming
    Replies: 3
    Last Post: 11-14-2009, 02:35 PM
  2. .net framework v3.5 how to open hacks if they dotn open?
    By dieterke0147 in forum WarRock - International Hacks
    Replies: 0
    Last Post: 07-28-2008, 03:05 AM
  3. help|How to open 2 accounts in 1 computer?
    By snir3434 in forum WolfTeam General
    Replies: 2
    Last Post: 06-12-2008, 05:01 AM
  4. how to open that rar...cannot open one
    By 1234 in forum WolfTeam General
    Replies: 9
    Last Post: 03-19-2008, 06:59 PM
  5. Pls help! dont check how to open CT an other
    By adg in forum WolfTeam General
    Replies: 4
    Last Post: 02-27-2008, 08:54 AM