i'm trying to do a download manager just for learning cos i'm new in windows programming,
could someone tell me how to monitor most common web browsers,
i'd like to implement something like:
http://www.iwisoft.com/videodownloader/video-downloader-features.php
everytime you visit a web page in common browsers detects all video files in the web page and allow you to download or not the file, any idea how to do that without building an app for every browser, which is the best language to do it c#/vc++/managed/unmanaged,
i'm learning and using a mix of all to do other parts like download files, add rules to firewall or modify the registry
thanks a lot
I don't really know a neat way of doing this, but you could try the following :
Enumerate the name of the current window using GetForegroundWindow.
Check if the name you get using GetWindowText matches the usual name of the browser.
If it is a browser, moniter the clipboard and check for hyperlinks
then do your download stuff.
I program in C++ and assembly, but I wouldn't be able to advice you on the programming language since I don't have any experience with C#. But since you are new, I would suggest starting out with basic stuff. As pointed out in your comment, this is not something that can be achieved easily.
Related
Hi I am trying to pull this string from courseweb.hopkinsschools.org and display it on my own asp.net application. I have been looking for a long time for a tutorial but nothing works. Any help would be greatly appreciated.
Picture of String needed:
String
When I started doing work with websites and interfacing with other websites, I originally wanted to do what you're talking about, reading the text from pages, because thats how we as people interface with computers and websites.
But that is not how computers should ever interface with other websites unless absolutely necessary.
Moodle has an API for such things like course management. Its kind of difficult to find information on, but its called Moodle Web Services if I remember quickly. I'll add a link back if I can find it.
What these will do is let you access moodle in a computer friendly way, ie. a way your computer can easily understand, instead of trying to read webpages.
Edit
Here are some resources to get you started:
https://docs.moodle.org/dev/Web_services
https://code.google.com/p/mnet-csharp/
https://delog.wordpress.com/2010/08/31/integrating-a-c-app-with-moodle-using-xml-rpc/
https://delog.wordpress.com/2010/09/08/integrating-c-app-with-moodle-2/
I'm trying to create a wpf application such as a movies library because i would like to manage and sort out my movies with a pretty interface.
I'd like to create a library with all my movies getting information from the web, but i don't know how very well.
I thought to get the information from a web site, for example imdb, but i don't know if it's legally to capture html from page to get the nested information.
It's my first desktop application and I would also like to know if it is necessary to create a database within the project and then create a setup project with specified script for deploy it.
Sorry for the confusion but i would like to know too much things :)
Thanks a lot in advance.
The legality of web scraping is a grey area. See my question, "Legality of Web Scraping vs Normal Use" and the corresponding answers for some insight.
Even if the legality is not a problem, web scraping is a flimsy approach because the webpage structure may change without notice, making your application suddenly useless until you update it to the new format. You are much better off using some sort of web API (if the site providing the information offers it).
Whether you need a database or not depends entirely on what your application will be doing and how you design it - it's not something any of us can tell you.
Same goes for the setup project - in fact I wouldn't worry about that until you actually have a working application. Take it step by step and keep the scope within control.
Yes I did not think about api.
It's a great idea, maybe use "themoviedb".
But if i create an application based on it, that has to show all the movies that you have stored on your hdd and get , for example, the posters, the description and the ranking, i have to create a database according to you?
Thanks a lot.
There several websites that use AJAX to update the contents periodically and I would like to monitor them. That's why it is necessary to keep multiple webpage windows always open and to grab page sources periodically.
I am searching for an approach for getting HTML sources from these webpages! Could you recommend something? I need it for statistical analysis.
Here are my thoughts so far:
approach. Opening separate Chrome windows manually. Using Handles to find the window. The problem is that it is nearly impossible to grab the HTML of the webpage.. (except the rich text)
Approach. writing an extension for Chrome/Firefox and a C# program. Program will send requests to extension and the extension will return HTML contents of the webpage. That's the theory. Google didn't put my hopes high so I am not sure if that is possible...
Approach. The most realistic one. Using the embed browser such as CefSharp, Awesomium, etc.. But as I mentioned - they have to support multiple opened windows! Any problems here?
So, these are my thought after hours of study..
Personally I would love to implement approach 2 because it is the most awesome.. but others will do too. What would be the easiest and most bulletproof?
Additionaly I would love a feature to do some input operations in these windows. ex: Login/navigate.
If IE browser is an option, look at implementing a managed add-on that will allow you to hook into notifications when document is loaded, access to live DOM of the document, possibly notifications when DOM changes, and so on. The same can be done in FF/Chrome. With IE, look into IObjectWithSite COM interface. This article seems to be a decent tutorial, though I'm not vouching for its accuracy.
I want to create a help file opens when pressed F1 anytime. How to create it and include to code?
You are asking two things which are separate issues:
Create a help file.
This can be tricky depending on how you do it. There are many different options, some launch a web browser to a online help while others launch a help viewer of some kind. I have also seen people having simple help viewer implemented in simple controls like some kind of browser control or rich text viewer. To create a external file (like a *.chm file) I would use a commercial package like robohelp, there are SDKs from Microsoft, but packages like RoboHelp makes lift so much easier.
Launch the help
To get the help to be displayed you normally (in the case of an *.chm file or an web browser) need to launch the viewer program. The help SDK from Microsoft contains help for this, but you may also just lauch the program as any other program. Take a look at the System.Diagnostics.Process class.
If you want to create a CHM help file you may check out HelpNDoc which is a perfect tool to create PDF,HTML and CHMs instantly. If it comes to launching, mrz is also perfectly right.
There is a help SDK that microsoft provides
check it out:
http://msdn.microsoft.com/en-us/library/ms670169
Im assuming this is what your looking for?
you could set F1 to one of these HTML pages?
If your program is rather simple, a single HTML file opened in the user's default browser should be ok. But if Your application is a bit more complex, there's no real alternative to a chm file.
You might also include a PDF which describes common use-cases. (Like a book about using your software)
You can create your help in HTML format and for viewing, you can create a Form which has an embedded browser in it, and load the index (or whatever you call the first page) in the browser.
Using C# (or VB if needed), I am setting up a simple automated browser program. Right now I am doing this via watin. I am doing this on my Windows 7 Desktop and the browser I am automating via Watin is IE. Ideally I would like to keep it as is, in C# using watin, but I am flexible.
Each time I run the program I would like to delete the cookies, which with watin is simple to execute. The problem I have is deleting the flash cookies.
I know to manually delete the cookies you can do it here, but I'd like to figure out a way to do it via programming FLASH COOKIES SETTINGS
Also, here is a Great paper on Flash Cookies and Privacy
Please let me know if I left anything out, or what I can do to make this question as clear as possible.
Take a look at this blog post for a simple batch file that does this: http://www.ardamis.com/2010/07/07/how-to-delete-flash-cookies/ . This can easily be converted to C# or (you can shell out to the batch file) and executed from your test suite init.
Use SOLReader to delete the relevant LSO data.