Skip to content

POS Testing Script

This is something I had, no… wanted to write for my job. We’ve had some issues with our point of sale software interfacing properly with our receipt printers and cash drawers over long periods of time, and high sales volumes. I was unsatisfied with the other ways of testing up until this point, most ways of testing weren’t interfacing all of the hardware we had with the actual point of sale software we used, Tomax.

I wrote something that would literally RIFLE through sales at an extremely high rate of speed, completely automated. The only human interaction required was to change the roll of receipt tape when it ran out.

Here’s my README I threw together.

 /===========================================\
|  Halloween City Register Tester with Tomax  |
|        Written by Corey DeGrandchamp        |
|  Written on 03/04/2011  for Halloween City  |
 \===========================================/

To use this, make sure you are logged into the Halloween City register's test image (from 2010) as the REGADMIN user. Start the included executable file, and then launch Tomax via the runpos.bat in the Startup folder.

Once the login window is active, use the following commands to get started

T - Enters training mode. (Only available from initial login window.)

R - Enters regular ringing mode. (Only available from initial login window.)

U - Unlocks a register after it idles and wants employee ID and password.

. - Starts the loop to ring and cash out sales. This has to be run at the screen asking for emails and phone numbers, the one that asks you to press ESC to cancel.

Q - Breaks the loop after it finishes its current/in-progress run.

And the source looks something like this, edited slightly for security reasons.

.::
BreakLoop = 0
Loop {
if (BreakLoop = 1)
     break;
Sleep 300
Send {Esc}
Sleep 100
Send 303
Sleep 300
Send {Enter}
Sleep 300
Send {Tab 11}
Sleep 300
Send {Enter}
Sleep 300
Send {Tab}
Sleep 300
Send {Enter}
Sleep 300
Send 200
Sleep 1000
Send {Enter}
Sleep 4000
}
return

q::
BreakLoop = 1
return

t::
Send 999
Sleep 100
Send {Tab}
Sleep 100
Send username
Send {Tab}
Sleep 100
Send password
Sleep 100
Send {Enter}
Sleep 3000
Send username
Sleep 100
Send {Tab}
Sleep 100
Send password
Sleep 100
Send {Enter}
return

r::
Send {F11}
Sleep 1000
Send {Tab 20}
Sleep 100
Send {Enter}
Sleep 2000
Send username
Sleep 100
Send {Tab}
Send password
Send {Tab}
Sleep 100
Send {Enter}
Sleep 2000
Send username
Sleep 100
Send {Tab}
Send password
Send {Enter}
return

u::
Send username
Sleep 100
Send {Tab}
Send password
Send {Enter}
return

That’s about it, its really quite simple, but does exactly what we need it to in the fastest amount of time possible, so it’s extremely efficient at what it does.
Forgive the slightly improper syntax highlighting too, it’s hilighting for AutoIT, but the code is actually AHK, but it wasn’t a highlighting option, I just picked AIT because it’s so close to AHK, in fact AHK was based on an open source AIT, so for this demonstration it’s close enough.

I also can’t post the compiled executable file on this one, because it contains usernames and passwords it types in plain text. It also wouldn’t be of much use to people either.

Published inCode

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *