All Forums >> [Scripting] >> WSH & Client Side VBScript >> Not even sure if this is possible with VB Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
I need to take data that is input from a meg card reader, change the data by taking out some information and adding other information to it and then have it be put into another program. I dont mind coding this but I am VERY new to VB and am not even sure where to begin or if this is even possible. The script (if it is possible) will need be active either in the background or have a very friendly user interface as this will be running on a kiosk for our customers to access.
It's possible only if the datas are in text format (readable in notepad for example) and not located in memory (must be accessible from a drive). Once you have text-based datas, you can do whatever you want with them.
For a cool, flashy interface, look at HTA scripting. HTA is HTML based interface for VBs and Js. It's relatively easy.
This is the data that I am getting from the swipe %1391000100005?;390100005? It needs to be 3900100005. So basically it needs to read track 2 of the swipe and add a 0 after the first 2 numbers. The swipe acts just like a keyboard would so it would not be locked in memory. The basic flow is Customer walkes up and swipes their card into an interface the interface then removes the %1391000100005?; and the trailing ? and adds a 0 after the 39. Once that is done it sends the recompiled 39001000 to another application
i'm not great with vbs but heres something to work with... also i'm not sure how to add the extra 0 to the string, hopefully another person can help...
i'm not great with vbs but heres something to work with... also i'm not sure how to add the extra 0 to the string, hopefully another person can help...
Digital, nice functions... i know this might be a ridiculous question then but there really isn't a Lstrip() or Rstrip() function within vbs? theres no easy way to TRIM the string?
Nope, the closest thing in native VB is LTrim, RTrim, and Trim In Vb as well as all the derivations of it (VBA, VBS, etc.), the functions LTrim, RTrim, and Trim only trim off the whitespace to the left, right, or both ends of a string. For example:
Notice where the spaces have been removed?
But, since these functions only remove the whitespace, they won't remove any characters OTHER than whitespace. Hence the need for the functions I showed you.
_____________________________
"Would you like to touch my monkey?" - Dieter (Mike Meyers)
"It is better to die like a tiger, than to live like a pussy." -Master Wong, from Balls of Fury