zbarimg Topic is solved
zbarimg
how can i take the value of zbarimg.exe and put it on a variable (the value of the code).
Re: zbarimg Topic is solved
I wrapped a function a couple years back that I used with windows zbarimg.exe.
Not sure if it still works:
Not sure if it still works:
Code: Select all
zbarpath = ; *full path to zbarimg.exe*
imgpath = ; *full path to barcode image*
command = "%zbarpath%" --raw "%imgpath%"
value := GetStdOutAll( command )
msgbox % value
GetStdOutAll( cmd )
{
DetectHiddenWindows On
Run % ComSpec,, Hide, pid
WinWait % "ahk_pid " pid
DllCall( "AttachConsole", "UInt", pid )
WshObj := ComObjCreate( "WScript.Shell" )
Exec := WshObj.Exec( cmd )
StdOut := Exec.StdOut.ReadAll()
DllCall( "FreeConsole" )
Process Close, % pid
Return StdOut
}
Re: zbarimg
your code working perfectly , i use it also for zbarcam
Code: Select all
#Warn,UseUnsetLocal
#NoEnv
#SingleInstance Force
SetBatchLines,-1
ZBarFilePath:="C:\Program Files (x86)\ZBar\bin\zbarcam.exe"
command = "%ZBarFilePath%" --raw "%imgpath%"
value := GetStdOutAll( command )
msgbox % value
GetStdOutAll( cmd )
{
DetectHiddenWindows On
Run % ComSpec,, Hide, pid
WinWait % "ahk_pid " pid
DllCall( "AttachConsole", "UInt", pid )
WshObj := ComObjCreate( "WScript.Shell" )
Exec := WshObj.Exec( cmd )
StdOut := Exec.StdOut.ReadAll()
DllCall( "FreeConsole" )
Process Close, % pid
Return StdOut
}
Re: zbarimg
your code is working but is it possible to get the value directly while zbarCAM is running ( your code is working with it also but i don't want to get the value after closing it , constant update to the value)
Who is online
Users browsing this forum: No registered users and 274 guests