how to read from a magnetic card reader

new topic     » topic index » view thread      » older message » newer message

Hi everybody I have the next issue: I have a magnetic card reader connected to a windows xp computer via usb
I have to read 2 tracks each time I swipe a card the problem I face is that
some cards comes with 2 tracks while other comes with 3 tracks
I have tried to read it char by char with the next code

-- wait until there is something to read  
while get_key()=-1 do 
end while 
-- start reading 
while 1=1 do 
   vca=get_key() 
   if vca=-1 then 
      exit 
   else 
      linea=linea&vca 
   end if 
end while 

but as soon as it read the first character it stops
maybe it is a simple question but i have not solved it yet
any idea
thanks in advance

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu