^^What they said.
For future reference if you want to patent something you will need a working prototype. You will need to hire a patent attorney. There is no way to make it happen fast. At a minimum it will cost approximately $5,000.
There is a book called "How to Patent it Yourself", but I think it is better used to educate yourself before hiring a patent attorney.
Getting a patent these days is a rather arduous process, and there are so many patents out there now that review takes a very long time and chances are that someone may have a similar idea already patented.
As far as patent infringement on what you have done already, you might want to get one built and tested until it's worthy, then post or offer the program file to anyone for free. Then you are not selling a product. Anyone can make a one-off from your program and if they want to hire you to make one for them, then you are providing services instead of a product.