Jump to content
Sign in to follow this  

How to proceed? AutoIt or VB .net?

Recommended Posts


It's a long story involving interoffice politics and banking services agreements but the bottom line is that I need to write an app that sits in the background and grabs the dollar amount from a point of sale app (Cam Commerce Retail Star) when the cashier hits the credit card button and authorize credit card sales through another server based app (VeriFone PAYware).

I'm not a total n00b with VB but I really don't have much experience. I have a decent amount of experience automating things with Auto It but nothing too fancy.

As a "proof of concept" I whipped up a little AutoIt app that waits for the credit card window from the POS app and when it appears it grabs the total from the window. This works well.

I purchased a dev kit from VeriFone that includes documentation, sample code and a DLL file that should allow me to programatically interface with customer facing credit card terminals and pass information on to the PAYware server for processing. All of the sample code is in VB .net and I've been playing with it there with some success. I can interact with the VeriFone MX870 customer facing terminal and pass the info on to the server.

The problem I have is how to merge the two components together. I figure I have a few options:

-Keep them separate and launch the VB app at the appropriate time with the AutoIt script and then relaunch the AutoIt script from the VB code. This may present a problem with the initialization of the customer facing terminal.

-Redo the AutoIt window waiting script in VB .net. This seems like an easy option because it's only a few lines but I'm not sure how to duplicate WinWait and the ControlGetText functionality in VB. Can anyone point me in the right direction here?

-Redo the VB code in AutoIt. I'm not sure if this is even possible. I know you can call DLL functions in AutoIt but I've never done it before and the VB code looks pretty complex compared to what I've done in the past. I really don't even know how to speak intelligently about how the DLL works enough to be able to tell you what I'd need to do in AutoIt. This is the most intimidating option for me since I'd have to "reinvent the wheel" instead of just reusing the sample code.

Edited by JefFZ6

Share this post

Link to post
Share on other sites

The DLL functions are quite straight foward - the are examples in the help file and many more in the forums. You just have to know about the function you are calling within the DLL.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this