C in the internet? (and more...)

This is a discussion on C in the internet? (and more...) within the C Programming forums, part of the General Programming Boards category; I studied C this year in college and I learned a fair amount of things, that go from basics (I/O, ...

  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    6

    Question C in the internet? (and more...)

    I studied C this year in college and I learned a fair amount of things, that go from basics (I/O, conditional structures...) to some more advanced topics (like graphs, neural networks...). Now I've decided that I should use my knowledge to program something useful for me... that's where the questions began.
    I don't have any clue on how to accomplish this kind of things:

    - Make my program connect to a website, fill up a text field and press a button or some other thing (more generically, I would like my program to "navegate" on the internet without any human-help whatsoever)
    - Open up files in my computer using the appropriate software (for example: when I click in my program's button it opens a .jpg in paint, or a .psd in photoshop, etc...)
    - Interact with other programs running at the same time (I don't want to actually change other program's memory addresses or stuff like that, I'm thinking about something more high-level, like pressing up a button or filling up a form...)



    If you know how to do these things, or know a book about them, or you have any knowledge that would help me in learning this topics please post. =]
    (At the moment I don't have a clue on how to learn these things)

  2. #2
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    Quote Originally Posted by h3now View Post
    - Make my program connect to a website, fill up a text field and press a button or some other thing (more generically, I would like my program to "navegate" on the internet without any human-help whatsoever)
    - Open up files in my computer using the appropriate software (for example: when I click in my program's button it opens a .jpg in paint, or a .psd in photoshop, etc...)
    - Interact with other programs running at the same time (I don't want to actually change other program's memory addresses or stuff like that, I'm thinking about something more high-level, like pressing up a button or filling up a form...)
    (Though it should be possible in C ...but) those totally sound like something to be accomplished by some Macro(not C macros ) or some sort of script.
    Otherwise..look for some sort of accessibility api for your OS to get the functions to manipulate I/O like that.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    Sure, why not -> libcurl - API
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User
    Join Date
    Nov 2011
    Posts
    6
    Quote Originally Posted by Salem View Post
    Sure, why not -> libcurl - API
    Okay, I downloaded it, but I'm completely clueless from here on... how do I configure Code::Blocks so it can be able to compile my test program right? (I'm not sure if this question belongs to this forum, but the people In C::B forum said it wasn't their business either... any help would be appreciated)

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    2,516
    Do you know your OS Name?
    Do you know your Compiler Name?

    Read the directions that are shipped with the library.

    Google for help using the Library with your OS and Compiler.

    Tim S.

  6. #6
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    How about spending a few months getting clued up on the basics, rather than jumping from a great height into the deep end of a shark infested pool.

    Or do it all yourself using the basic socket API calls.
    Beej's Guide to Network Programming

    Either way, you're looking at a pretty long haul.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  7. #7
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Also see THIS ... it's mostly for windows, but most of the concepts will apply anywhere you're using sockets.


    - Make my program connect to a website, fill up a text field and press a button or some other thing (more generically, I would like my program to "navegate" on the internet without any human-help whatsoever)
    That would be a "bot" and a great many websites will hate you for that! Most do their level best to prevent raw data harvesting like that. Also depending what it's harvesting, you could get yourself into a peck of problems for copyright invasion. The HTTP protocol will reveal your IP address to whatever website you visit.

    - Open up files in my computer using the appropriate software (for example: when I click in my program's button it opens a .jpg in paint, or a .psd in photoshop, etc...)
    In Windows this is pretty easily done... ShellExecute()

    - Interact with other programs running at the same time (I don't want to actually change other program's memory addresses or stuff like that, I'm thinking about something more high-level, like pressing up a button or filling up a form...)
    Be VERY careful with this as it will violate most system security protocols and may have effects on your system you are not going to like.

  8. #8
    Registered User
    Join Date
    Nov 2011
    Posts
    6
    NVM, just did it, I was able to correctly compile my test code...

    How about spending a few months getting clued up on the basics, rather than jumping from a great height into the deep end of a shark infested pool.
    You're completely right, and that's my approach to most problems. But since I need such a small task to be done (relatively small, download a file from a server) I was eager to try "black-boxing" it (something like adding a functionality to your code, not knowing how it works). Sorry if that led to too many dumb questions guys, and thank's for the help so far =]...

    Well, one of my problems is solved... I'll update as I move to the other tasks.
    (If any1 reading this post with the same question that I had would like some help, please PM me)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. The Internet is out to get me?
    By CornedBee in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 01-31-2009, 01:10 PM
  2. internet
    By munna_dude in forum Networking/Device Communication
    Replies: 1
    Last Post: 05-23-2007, 03:16 AM
  3. Internet
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 07-12-2002, 08:46 AM
  4. C++ and internet...
    By NANO in forum C++ Programming
    Replies: 11
    Last Post: 05-16-2002, 02:47 PM
  5. The internet
    By Cosmic Diva in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 03-26-2002, 11:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21