ConsultingJoe Posted October 4, 2012 Posted October 4, 2012 (edited) Hi all,Been a while since I've posted but have a new cool project for work and wanted to see if any one wants to help with a more legit dll call way to build this program to enroll finger prints, import/export them, and authenticate them.FREELANCER PROJECT: https://www.freelancer.com/projects/C-Programming-Software-Architecture/Figure-Print-USB-Communication-Server.htmlI'm building this for a dedicated HR/Clock IN/Out program. My idea is the computer will only have a screen, no mouse and keyboard, and just this Upek TrueMe Finger Print Reader/Scanner that I got on ebay for about $20.The SDK I got offers a few sample programs that are command line. I will be making the App using that unless someone know better DLL Call ways to communicate with the API.I can post links if anyone is interested. Let me know if anyone wants to help or thinks this could be cool and useful.Joe Edited January 18, 2013 by ConsultingJoe Check out ConsultingJoe.com
jaberwacky Posted October 5, 2012 Posted October 5, 2012 Dude, you should totally go for it. YOLO. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum?
ConsultingJoe Posted October 5, 2012 Author Posted October 5, 2012 thanks, I am working on it now but running into a problem. The sample app I'm building from is not a simple command line app. It has menus to navigate. I have tried using the STDIN/OUT method but it seems that in just using the OUT stream the app just says that its a bad command and repeats infinitely. Any ideas? I can send the commands with ControlSend but I can not read the results. Please help if you have another method. Check out ConsultingJoe.com
jaberwacky Posted October 5, 2012 Posted October 5, 2012 There is no dll that came with the device? Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum?
ConsultingJoe Posted October 9, 2012 Author Posted October 9, 2012 Yes, I signed up for the SDK and got all the files and docs but dllcalls are very hard for me to figure out with the pointers and the right types. If anyone would like to help thats where I'm stuck. I've built off of a sample app but its not the right way. But its cool you can change a patter of led blinks and the speed, you can enroll and verify finger prints, you can EVEN use it for navigation, just like the old little nipple track balls on IBM laptops. So. tomorrow, I can post a like to the DOCs/DLL/my code & sample apps if you have any recommendations. Thanks. Check out ConsultingJoe.com
ConsultingJoe Posted October 10, 2012 Author Posted October 10, 2012 Ok, so I got my script to automate the sample app and it is able to load all finger print template files from a directory and then it will constantly attempt to verify finger prints and currently outputs to ConsoleWrites to what slot/user swiped their finger and if there was an error or if it was not found among the prints on file. Cool A, lol? I will try to like or upload the DLL/Sample/Doc files if anyone is a PRO DLL CALLER, lol cuz I sure am aint. Otherwise I can also post the sample code for where I'm at and anyone can work off of that. ZeroCool Check out ConsultingJoe.com
jaberwacky Posted October 10, 2012 Posted October 10, 2012 Definitely post your code because you never know who might show up to help. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum?
ConsultingJoe Posted October 19, 2012 Author Posted October 19, 2012 (edited) It uses a lot of control clicking as I am not a DLLCALLER. lol PM me for any Docs/DLLs/and the sample program that I used this with. expandcollapse popup#NoTrayIcon #include <Array.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> Opt("TrayMenuMode", 1) ; Default tray menu items (Script Paused/Exit)will not be shown. Local $exititem = TrayCreateItem("Exit") $ini_file = @DesktopDir&"bioprints.ini" TraySetState() HotKeySet("{F9}","quit") $ini_exists = 1 If(FileExists($ini_file) = 0) Then $ini_exists = 0 EndIf $store_id = IniReadSection($ini_file,"store") If @error Then MsgBox(0,"","Error, store id unknown.") Exit EndIf $store_id = IniRead($ini_file,"store","store_id","0") ProcessClose("bio.exe") ProgressOn("","Loading finger prints","Please wait.") ConsoleWrite(23) $bio_title = "BSAPI Function Preview" Run(@DesktopDir&"biobio.exe","",@SW_MINIMIZE) Sleep(500) ControlClick($bio_title,"","ThunderRT6CommandButton39") Sleep(1100) ControlClick($bio_title,"","ThunderRT6CommandButton37") Sleep(1000) ControlSend($bio_title,"","ThunderRT6ComboBox12","B") Sleep(200) ProgressSet(20,"Retreiving finger prints") Local $search = FileFindFirstFile(@DesktopDir&"bio*.bir") Dim $prints[1] If $search = -1 Then MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf While 1 Local $file = FileFindNextFile($search) If @error Then ExitLoop $file = StringReplace($file,".bir","") _ArrayAdd($prints,$file) WEnd FileClose($search) ;_ArrayDisplay($prints) Sleep(200) $count = 0 $total_prints = UBound($prints)-1 if($ini_exists = 0) Then IniWrite($ini_file,"store","store_id","1") For $i In $prints If $i = "" Then ContinueLoop if($ini_exists = 0) Then IniWrite($ini_file,"prints",$count,"ID Not Set") ControlClick($bio_title,"","ThunderRT6CommandButton19") While Not WinExists("Open file") Sleep(1) WEnd Sleep(200) ControlSetText("Open file", "", "Edit1", @DesktopDir&"bio"&$i&".bir") ControlClick("Open file", "", "Button2") Sleep(200) ;Send("C:Documents and SettingsOwnerDesktopbio1.bir{ENTER}") ControlSetText($bio_title,'',"ThunderRT6TextBox3",$i) For $ii = 0 To 4 ControlSend($bio_title, "", "ThunderRT6ListBox1","{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}") Next ControlClick($bio_title, "", "ThunderRT6CommandButton16") $count += 1 ProgressSet(100/$total_prints*$count,"Loading print "&$count&" of "&$total_prints) Sleep(100) Next ProgressOff() Local $msg $gui = GuiCreate("Clock", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP); GUISetBkColor(0xffffff) ;$ie = _IECreateEmbedded() ;$ie_obj = GUICtrlCreateObj($ie,0,0,@DesktopWidth,@DesktopHeight) ;_IENavigate($ie,"http://google.com") $img = GUICtrlCreatePic(@DesktopDir&"print.jpg", @DesktopWidth/2-156, @DesktopHeight/2, 316, 450) $msg_label = GUICtrlCreateLabel("Please wait", @DesktopWidth/2-600, @DesktopHeight/2-200, 1200, 200, $SS_CENTER) GUICtrlSetFont(-1,40,600) $clock = GUICtrlCreateLabel("Loading...", @DesktopWidth/2-400, @DesktopHeight/2-400, 800, 200, $SS_CENTER) GUICtrlSetFont(-1,100,800) $clock2 = GUICtrlCreateLabel("", 0, 0, 400, 100, $SS_CENTER) GUICtrlSetFont(-1,60,800) GUICtrlSetColor(-1,0xebebeb) GUICtrlSetBkColor(-1,0x666666) update_clock() $ss_label = GUICtrlCreateLabel("",0,-1,@DesktopWidth,1) GUISetState(@SW_SHOW) ; will display an empty dialog box AdlibRegister("update_clock",500) AdlibRegister("screensaver",10000) GUICtrlSetData($msg_label,"Please Swipe Your Finger To Clock In/Out") ;;WinSetState($bio_title,"",@SW_MAXIMIZE) For $ii = 0 To 4 ControlSend($bio_title, "", "ThunderRT6ListBox1","{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}") Next For $ii = 0 To 4 ControlSend($bio_title, "", "ThunderRT6ListBox1","{SHIFTDOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{SHIFTUP}") Next ControlClick($bio_title, "", "ThunderRT6CommandButton14") AdlibRegister("scan_print",1500) While 1 Local $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $exititem quit() EndSelect $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then quit() WEnd Exit Func scan_print() $status = ControlGetText($bio_title,"","ThunderRT6TextBox9") If $status = "Processing, please wait ..." Then Return False ElseIf StringInStr($status,"Match found in slot ") > 0 Then ControlSetText($bio_title,"","ThunderRT6TextBox9","") $slot = StringReplace($status,"Match found in slot ","") $list = ControlGetText($bio_title, "", "ThunderRT6ListBox1") ConsoleWrite("Match found in slot: "&$slot&" "&$list&@CRLF) $id = IniRead($ini_file, "prints",$slot,"-1") If $id = -1 Then GUICtrlSetData($msg_label,"Match found but user id unknown.") Return Else GUICtrlSetData($msg_label,"Please Wait...") $response = "Test" $response = BinaryToString($response) If StringInStr($response,"clocked in") > 0 Then Run(@DesktopDir&"tasks.exe "&$id&" "&$store_id, "", @SW_SHOW) EndIf GUICtrlSetData($msg_label,$response) AdlibRegister("screensaver",10000) EndIf Sleep(200) ControlClick($bio_title, "", "ThunderRT6CommandButton14") ElseIf $status = "ABSVerify: No Match" Then ConsoleWrite("No match found. Please try again"&@CRLF) GUICtrlSetData($msg_label,"No match found. Please try again") Sleep(200) ControlClick($bio_title, "", "ThunderRT6CommandButton14") ElseIf $status = "Operation has been interrupted due timeout" Then Sleep(200) ControlClick($bio_title, "", "ThunderRT6CommandButton14") EndIf EndFunc Func update_clock() If @HOUR > 12 Then $ampm = "PM" $hour = @HOUR - 12 Else $ampm = "AM" $hour = @HOUR EndIf If GUICtrlRead($clock) <> $hour&":"&@MIN&" "&$ampm Then GUICtrlSetData($clock, $hour&":"&@MIN&" "&$ampm) If GUICtrlRead($clock2) <> $hour&":"&@MIN&" "&$ampm Then GUICtrlSetData($clock2, $hour&":"&@MIN&" "&$ampm) EndFunc Func screensaver() GUICtrlSetData($msg_label, "Please Swipe Your Finger To Clock In/Out") GUICtrlSetPos($clock2,Random(0,@DesktopWidth-100),Random(0,@DesktopHeight-100)) EndFunc Func quit() ProgressOn("Quiting","Please wait") ProcessClose("bio.exe") Sleep(500) ProgressOff() Exit EndFunc Edited October 19, 2012 by ConsultingJoe Check out ConsultingJoe.com
ConsultingJoe Posted January 18, 2013 Author Posted January 18, 2013 I have created a FreeLancer Project for this. Please check it out. It may explain a little better. There is a link to the SDK and to the $20 product if you would like to purchase one for testing. https://www.freelancer.com/projects/C-Programming-Software-Architecture/Figure-Print-USB-Communication-Server.html Please Please Help. Check out ConsultingJoe.com
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now