Jump to content

keyboard key count


sirWimelef
 Share

Recommended Posts

hi,

im trying to make an a simple interface to get data from a ps2 barcode reader and put them to a sql db

to make it more automaticly im trining to count how many keys are pushed each reading to send a {tab} key after it to go to de the next field

after serch for a while i only fount the _iffpressed function but i don't need(/want) to make a especific rule for each key

theres any generic function to count how many pushes are pressed?

the gui of the program

#NoTrayIcon
#include <GuiConstants.au3>

Opt("MustDeclareVars",1)
HotKeySet("{PAUSE}", "request_end")

global $Maingui=GuiCreate("Codis Postals", 300, 220,@DesktopWidth/2-150,@DesktopHeight/2-200, 349110272)
dim $msg
GUICtrlCreateLabel("Nº Lot",5,10)
dim $nlot=GUICtrlCreateInput("",60,5,80,20,0x0008)
GUICtrlCreateLabel("Codi equip",5,35,50)
dim $Cequip=GUICtrlCreateInput("",60,30,80,20,0x0008)
GUICtrlCreateLabel("Simptomes",5,60,55)
dim $error1=GUICtrlCreateInput("",60,55,80,20,0x0008)
dim $error2=GUICtrlCreateInput("",60,75,80,20,0x0008)
dim $error3=GUICtrlCreateInput("",60,95,80,20,0x0008)
GUICtrlCreateLabel("Material",5,125,55)
dim $Mat1 = GUICtrlCreateInput("",60,120,80,20,0x0008)
dim $Mat2 = GUICtrlCreateInput("",60,140,80,20,0x0008)
dim $mat3 = GUICtrlCreateInput("",60,160,80,20,0x0008)
GUICtrlCreateLabel("Observacions",160,10,55)
dim $mat3 = GUICtrlCreateInput("",160,30,120,150,0x0004)
Dim $Next = GUICtrlCreateButton("Seguent",120,190,60,25)

While 1
    $msg = GuiGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
;~      case $buscar
;~          Buscar()
    EndSwitch
WEnd



Func connmvx()
    Local $sqlCon = ObjCreate("ADODB.Connection")
    $sqlCon.Open("Driver={SQL Server};Server=****;Database=MoVeX;Uid=;Pwd=;")
    Return $sqlCon
EndFunc
func request_end()  ;paro de emergencia
    if MsgBox(4,"movex", "End script?") =6 then
        Exit
    endif
endfunc
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...