I need screen scraper application which will recognize text from the screen (and not use winapi to do this so source could be in image file). I found a lot of commercial solutions, but I need something open source or free.
I plan to include it in my C# project, so there should be some SDK available.
Thanks.
You could use Tessnet to do character recognition of your images. If you want to screen scrape the desktop, you could potentially just take a screen shot, turn it into an image, and use the OCR library above.
Depending on what you want to do, I have found screen scraper useful for applying patterns against a web site and saving the data that I care about. The tutorial page should give you an idea of what it does.
Screen Scraper's free edition allows scripting in Interpreted Java, JScript, JavaScript, Python, and VBScript... is that close enough?
Related
I was wondering if there is a possibility to combine an AIR application with a WinForms Application?
Example
I've made some nice animated loading screens / splash screens with Adobe AIR and i want to use them with an .NET program, is that possible?
I don't want to simply call the program executable file (program.exe) within Adobe AIR (Air.exe). I want to use the textfields inside air, and as I click on Submit, I want AIR to pass the information to the .NET C# form and do stuff with that.
What is the proper way to do so, or what are alternative ways? (using WPF to embed a flash (SWF) inside .NET)
Based on the content posted in this tutorial, I think that it's possible to use .NET with Adobe AIR yet I'm not really sure.
You might also like to take a look at this which shows how to use CommandProxy to integrate AIR and .NET
Thanks,
I hope you find this helpful :)
Update 2018 TL;DR; LaTEX for WPF
https://github.com/ForNeVeR/wpf-math
Original question
I need to have a way to draw a mathematical formula in Windows Forms or WPF. Some "FormulaTextBox" control would be exactly what I need.
I'm not asking about full implementation of LaTEX, but at least something beyond RichTextBox possibilities, with division lines, square roots, etc.
Here's a list of options, pulled from several webpages online, as well as a few similar questions on SO
WPF-Math, a WPF library for rendering math-related TeX markup.
gNumerator is a WinForms control that renders MathML. It is native C#, but appears to be quite old.
Math Expressions, a commercial WinForms control for displaying and editing math equations. Note: Not free
There's an unofficial port of JMathTex to a C# WPF control
The Windows version of the LaTex editor Lyx uses a native library called MikTex you could take a look at. I saw mention somewhere that the tex4ht package renders math equations to images
MimeTex/MathTex, as you already mentioned
You could also use a WebBrowser control, and just locally include one of many javascript libraries for rendering LaTex.
You could pawn off the work onto Microsoft Word (Example - requires users to have MS Word installed!)
Perhaps you can use the Wolfram Alpha API to retrieve the images.
If you want something beyond a RichTextBox abilities to render pie, divisions and sqr roots and etc, you could just use WebBrowserControl(s) as textbox's. Then to render formula's you could leverage techniques shown in this webpage, save it to your desktop and open the html file:
http://www.wjagray.co.uk/maths/ASCIIMathTutorial.html
Obviously you'll need a special syntax (or special calculator buttons) to enter the formula's and I'm guessing from looking at the customisations.js file driving that webpage that you could make your own list of operators and functions too.
Here's what I'd do if none of the .NET specific solutions work for you:
It's a bit hacky, but it'll work and your users won't know the difference. Download the Mathjax library. When your user enters in the equation, you could convert the equation to LaTex or MathML. You would then take the LaTex or MathML and generate an HTML file that references Mathjax and display the file in your tiny WebBrowser window (valid for both WinForms and WPF). This shouldn't require an internet connection.
Like I said, your users won't be any the wiser.
is any light weight browser control available for c# application other than builtin web browser control, when i am using IE or Webkit control for embedding it will consumes 80 MB Memory to render a flash website of(800*600 resolution). how can i reduce the memory
EDIT1:
webkit for .net available webkitdotnet.sourceforge.net which is similar to web browser control i am tested it
If you're just trying to embed Flash, This tutorial describes how to do it:
Embedding a flash player control in a.NET winforms application
The key here is to add the "Shockwave Flash Object" COM object to your project. You'll then have a Shockwave Flash Object control in the toolbox which you can drag onto the form. Set the Movie property to the .swf object.
Then you can skip the whole browser.
There is Mozilla embedding available.
Flash as in Adobe Flash? In that case, it's most likely the Flash content that is taking up most of the memory, which means switching rendering engines will do very little to improve memory usage. You're stuck with what you have.
Honestly though, 80MB isn't much at all. Why are you worried about memory usage? Is it a confirmed bottleneck in your application?
Does the website when you open it in IE consume less memory? I doubt that you can improve the memory consumption. It probably is just how much the website needs.
If you simply look for an alternative to the WebBrowser control, you can try the already mentioned techniques but I doubt that you will get better results.
You could try embedding WebKit into a .net app.
You could try Awesomium (yes, the name is slightly /facepalm worthy ;)). It's based on Chrome (which uses Webkit) and is free for non-commercial use (commercial licensing is also available) and there is a CodePlex project called AwesomiumDotNet that provides a .NET wrapper for it.
I haven't used it yet myself, but came across it doing some research into embedding a Webkit-based browser into an .NET/WPF app.
My webcam has a button, with which you take a photo of current frame
when using it's original software what came with it when I bought it.
Is there any way to use that button to take photos in my program.
I would be using C#.
I was thinking of using Windows Image Acquisition (WIA) or avicap32
for using webcam in my software.
Any help would be appreciated. Where do I start?
EDIT:
I see that you didn't understand me. I need to know if my phisycal camera button is pressed.
I am using DigiMicro 1.3 camera (Manufacturer is DNT), which isn't really a webcam but a USB microscope, but
it behaves like a webcam.
Does the camera actually require that the software be running when you press the button? I know some webcams implement this feature at the driver level. If that's the case, I don't think there's much you can do without interacting directly with the USB port, which would be incredibly difficult and likely not worth the trouble. I can't find any technical documentation on the vendor's website with that kind of information.
The "MicroCapture" software doesn't come with any DLLs that have exported functions, so P/Invoking doesn't appear to be an option. Unfortunately, I can't get the driver installed, so I can't check if it comes with any P/Invoke-able DLLs.
Sorry, but since there's no standard interface for that kind of functionality and the vendor doesn't provide any specific information on it, I don't think this is possible. I would suggest contacting DNT directly about it. They may have some component that will do what you need.
This Coding4Fun post guides you through pretty much everything you need to do to get started using WIA, including adding the reference to a project, displaying the select a device dialog, and of course actually taking the picture :P.
Coding4Fun - Look at me! Windows Image Acquisition
I suggest that you take a look at the DirectShow.NET library. It has great functionality for capturing images/videos off connected devices. It also comes with several samples to get you started quickly.
I would like to embed Flash Player directly inside a C++ or Java application.
I found an article that describes how to do this for C#:
http://www.adobe.com/devnet/flash/articles/stock_history03.html
Unfortunately, I have no experience with C#, COM or ActiveX. I need someone to translate this code to C++, allowing me to embed the Flash Player into a Win32 Window. Ultimately I'd like to use this information to embed Flash into a Java application.
I am looking for three main functionalities:
Ability to play a Flash movie
Ability to receive events (such as mouse clicks)
Ability to send events
Edit: I prefer an open-source solution if possible.
I don't know how to embed flash in C++, but Christopher Deckers (of SWTSwing fame) has developed an interesting hack which allows it to be embedded in Java. You can find more information in the Javalobby announcement thread.
Here is an updated link: https://github.com/Chrriis/DJ-Native-Swing
I gave the same answer not long ago. Check out SWHX:
http://haxe.org/com/libs/swhx
http://code.google.com/p/screenweaver-hx/
http://code.google.com/p/screenweaver-hx/source/browse/trunk/src/np_host.c
Cheers!
Juan
If it has to be open source I'd consider Gnash, an open source flash implementation.
It works on all major platforms, supports most multimedia codecs and is supposed to be embeddable in applications through nsapi.
If you want to go with a commercial solution, I'd recommend Scaleform GFx. It's not cheap, though, but it's damn good.
One simple way to create a Flash player in your window: AtlAxCreateControlEx.
To receive and send events, you will need a sink: AtlAdvise. You will need to define the functions receiving events on the ActionScript (i.e. Flash) side too.
What you should use is Netscape Plugin API. It's native and it's what all the good browsers use to load flash player plugin. While the actual flash player is not open source, this API is.
If you're not gonna ship a copy of flashplayer with your app:
Your app should check at runtime for flash player and should alert the user if it doesn't find it (usually by giving a link to Adobe to download it).
Flashplayer plugin is usually installed at %AppData%\Mozilla\plugins on Windows.
Take a look at FlashDX. It is open-source and free.
I personally haven't tried this but say in case of SWT/Java you could embed SWT browser window in you SWT/Java application and in the browser view you could put content with flash content, then communicate say with Merapi bridge with flash movie and java.