• Advertisement
Sign in to follow this  

Internet question...

This topic is 4053 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i wanna know if they're is a way to do this: Right-click on something on internet Choose "Save target as..." Press Enter By pressing a button, for example... I don't kwow what's the code in need to achieve that(in C++) Anybody can help?

Share this post


Link to post
Share on other sites
Advertisement
"Scripting" existing programs is possible, to a certain extent, depending on your operating system; but it's generally nothing to do with language features, but instead stuff that the OS provides to you (an "API" - application programming interface - which is to say, a library you can include in your program to let it do the necessary stuff. In C or C++, on Windows, this is the header <windows.h>.), and of course it depends what the other program will *let* you do :)

It isn't necessarily easy, or even possible for any *specific* task, though.

On the other hand, you might have better luck making a program that just accepts a URL as input, looks up the file and saves it to disk (for simplicity, make it grab the last part of the slash-path as the filename to use, and save in the same directory as the program). This won't be particularly easy in C++, although it's certainly possible (and probably easier than scripting your web browser). It's an ideal task for Python, however.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement