Quantcast

Export zbarwcam response in to the textfile

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Export zbarwcam response in to the textfile

Hypermangan
Hallo,
I am trying to write zbarwcam response text in to the file without success. In ideal case will be the program beside closed after writing response in to the file. From informations on sourceforge I don't achieve it. Can you advice me please?

HP elite pad 900
Windows 8 Pro

Thank you in advance.

Radek Freisleben
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Zbarw-devel] [SPAM] Export zbarwcam response in to the textfile

jarekczek
Administrator
At command prompt type:

zbarcam >out.txt

W dniu 2013-08-21 13:26, Hypermangan pisze:

> Hallo,
> I am trying to write zbarwcam response text in to the file without success.
> In ideal case will be the program beside closed after writing response in to
> the file. From informations on sourceforge I don't achieve it. Can you
> advice me please?
>
> HP elite pad 900
> Windows 8 Pro
>
> Thank you in advance.
>
> Radek Freisleben
>
>
>
>
> --
> View this message in context: http://zbar-for-windows.29999.x6.nabble.com/Export-zbarwcam-response-in-to-the-textfile-tp73.html
> Sent from the ZBar for Windows mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Introducing Performance Central, a new site from SourceForge and
> AppDynamics. Performance Central is your source for news, insights,
> analysis and resources for efficient Application Performance Management.
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> _______________________________________________
> Zbarw-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/zbarw-devel
>


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Zbarw-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/zbarw-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Zbarw-devel] [SPAM] Export zbarwcam response in to the textfile

Hypermangan
Thank you very much for quick response,

I have found it ever myself but now I can't find how to close automaticaly zbarcam after reading the code. Is there some simple way like write output in file? Only one thing suggest me namely find process id of zbarcam, wait in batch file for the response, write output file and then kill the process. But I am only beginner in batch file syntax. Can I pray you for this another thing? If is it too complicated then you don't undertake with it. It is not so much important.

By the way this qr scaner is really super and foolproof.

Radek Freisleben
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Export zbarwcam response in to the textfile

Hypermangan
In reply to this post by Hypermangan
I have used VBScript instead of batch file and find the way to close zbarcam after scan of QR code. Maybe can it inspire someone. It is then possible to execute this script from ms access or excel.


##############################
dim oShell
dim oExec
dim FSO
dim oFile
dim Text

Set oShell  = CreateObject("WScript.Shell")

Set FSO = CreateObject("Scripting.FileSystemObject")

If FSO.FileExists("[textfile]") Then FSO.DeleteFile("[textfile]")

set oExec = oShell.Exec("C:\Program Files\ZBar\bin\zbarcam.exe")

While Text = ""
        Text = oExec.StdOut.ReadLine
        WScript.Sleep(100)
WEnd

Set oFile = FSO.CreateTextFile("[textfile]",True)
oFile.Write text
oFile.Close

Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colProcessList = objWMIService.ExecQuery ("Select * from Win32_Process Where ProcessID = " & oExec.ProcessID)
For Each objProcess in colProcessList
    objProcess.Terminate()
Next

Set colProcessList = nothing
Set objWMIService = nothing
Set FSO = nothing
Set oShell = nothing
Set oFile = Nothing
###############################

Radek Freisleben
Loading...