English
Forum

Druckerauftrag detect

 
- Page 1 -



Rolf
Koch
Hallöchen today frag I time so into round, I with Print never so much made have.
following approach to the problem:
we've with us one computer with printer on the camp.
If one customer one unit bought has and on the cash-desk payd has, so comes with us one entsprechender voucher from the printer, so we The washing-machine, TV or such one Zeugs raussuchen can.
now would I gladly one nebenbeilaufendes Tool write, which a Sound abspielt, if one such voucher from the printer comes.
means your, I could this somehow achieve?
 
12/20/08  
 



 
- Page 3 -



Rolf
Koch
Juhu with Timer GEHTS perfect. Sound comes with pressure *freu* thanks E.T.
now only bisschen play circa then later NEN Testlauf in the Fa. To effect ^^
time look what in the Tempdatei drin standing, so I only on Special Printouts react can. because otherwise druckt of/ one one normales document and it'll behauptet: deference customer in the Anmarsch *lol*
 
12/21/08  
 




Rolf
Koch
Bohhha thanks Andreas becomes Yes always cooler ^^ - yet ne Variante
Andreas, what meinste, can somehow discern, what it itself at pressure deals?
 
12/21/08  
 




E.T.
look time into .SPL-File in the Spooler.
there standing so some drinn (where, Dateiname etc.)
(Mach simply with Notepad or so on...)

EDIT: 
The File-name standing not drin, but one understand, where it herkommt:
%!PS-Adobe-3.0
%%Title: PRFellow 2001
%%Creator: PScript5.dll Version 5.2
%%CreationDate: 12/21/2008 12:55:44
%%For: Mario
%%BoundingBox: (atend)
%%Pages: (atend)
%%Orientation: Portrait
%%PageOrder: Special
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
12/21/08  
 




Rolf
Koch
is correct E.T. (Why come I me really comic to if I you anspreche *lol*)
come me in the momentum to like a Beginner. @Andreas: I use XPSE and
FindNextPrinterChangeNotification becomes z.b. as undeclariert angemosert.
 
12/21/08  
 




E.T.

...(Why come I me really comic to if I you anspreche *lol*) ...


Why, Have I me still self rausgesucht. and under standing too another richtiger name, if you the rather gefällt


come me in the momentum to like a Beginner.


Why ?? i'm too only one hobby-Programmer. I Have me with Profan only angewöhnt, rather first time to nem einfachen lane to search, as any APIs To verwursteln, The it then with another BS again not gives.
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
12/21/08  
 




E.T.
FindNextPrinterChangeNotification >> see Appendix, Perhaps hilfts what..

4 kB
Hochgeladen:12/21/08
Downloadcounter160
Download
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
12/21/08  
 




Rolf
Koch
human Mario, clear kenn I your names
but I finds even jolly with a creature from of my boyhood To talk
Well, with the Beginner relating itself hereon, because I do not dahinterkomme Why XPSE as undeklariert bleats.
 
12/21/08  
 




Andreas
Miethe


Rolf Koch
@Andreas: I use XPSE and
FindNextPrinterChangeNotification becomes z.b. as undeclariert angemosert.


I use no XPSE, Perhaps can If the sometime time strain.

here one code of a couple Info determined.
CompileMarkSeparation
 $H windows.ph
DEF Get_STDPrinter(1) Substr$(ReadIni$("WIN.INI","Windows","Device"),@&(1),",")
Var InfoBuffer& = 0
Var Spool& = ImportDll("Winspool.drv","")
cls
DEF &PRINTER_CHANGE_JOB  $FF00
DEF &INFINITE $FFFFFFFF
DEF &PRINTER_CHANGE_ADD_JOB $100
Declare JOB_INFO_1#
Var BytesNeeded& = 0
Var BytesReturned& = 0Var A& = 0
Var L& = 0
Var chgObject& = 0
Var pdwChange& = 0
Var fcnreturn& = 0
Var hPrinter& = 0
Var Printer$ = Get_STDPrinter(1)
OpenPrinterA(Addr(Printer$),Addr(hPrinter&),0)
chgObject& = FindFirstPrinterChangeNotification(hPrinter&,&PRINTER_CHANGE_JOB, 0, 0)

Repeat

    ~WaitForSingleObject(chgObject&,200)200 Millisekunden warten
    fcnreturn& = FindNextPrinterChangeNotification(chgObject&, Addr(pdwChange&),0,0)

    If fcnreturn&

        If pdwChange& = &PRINTER_CHANGE_ADD_JOB

            Print "neuer Druck-Job"
            EnumJobsA(hPrinter&,0,1,1,0,0,Addr(BytesNeeded&),Addr(BytesReturned&))
            Dim JOB_INFO_1#,BytesNeeded&

            Repeat

                EnumJobsA(hPrinter&,0,1,1,JOB_INFO_1#,BytesNeeded&,Addr(BytesNeeded&),Addr(BytesReturned&))

                If BytesReturned&

                    Locate 0,0
                    Print "Druckername :"+String$(Long(JOB_INFO_1#,4),0)
                    Print "Dokument : "+String$(Long(JOB_INFO_1#,16),0)
                    Print "Seiten : "+str$(Long(JOB_INFO_1#,36))
                    Print "Status : "+str$(Long(JOB_INFO_1#,24))

                Endif

            Until BytesReturned& = 0

            Print "Druck beendet"

        endif

    Endif

Until A& = 1Abbruchbedingungen vielleicht besser mit einem Button bestimmen ?

FindClosePrinterChangeNotification(chgObject&)
ClosePrinter(hPrinter&)
ref='./../../references-fonction/XProfan/end/'>end
 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
12/21/08  
 




Rolf
Koch
@Andreas
your Sourcecode can I somehow not my application install, I a Timer use and this too furthermore benefit would like. If I the Timer use and your Sourcecode in %WMTIMER set, so must I the Timer extreme squat settle and everything else works naturally not any more: Menu in Taskbar and Co because of the short Timerdauer. it come neither any Dokumentennamen on - z.b. from Paint, Winhelp u.s.w.

@E.T.
Klappt at least here super and perfect. but unfortunately is the Systemordner Spooler in the Fa. zugriffgeschützt what about me can there naturally nothing read.
and if it works with the Reading what about me The File reading wants (It's all right only The SHD File, because The SPL is always empty) then go The Files Windows not any more automatically deleted.
of/ one a idea?
 
12/22/08  
 



usually having such releases NEN own Thread, means remaining you only the Zweitprozess - allows?
 
12/22/08  
 




Frank
Abbing
You could The API StartDoc hooken. rather Perhaps StartPage, because the others API of older Programs through Escape simulate go could.
the would a very secure method, think I.
 
12/22/08  
 



can it Yes even with XProfan not... therefore Yes my question whether Rolf itself on the necessary Zweitprozess disturbing would.

or You bastelst in NEN own Thread by DLL Frank! (though I almost of it convincing be, that eachone new strange-Thread inside the XProfanprozesses To Problemen lead - unfortunately only so seldom)
 
12/23/08  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

121.743 Views

Untitledvor 0 min.
rquindt05/17/20
Rainer Hoefs03/10/18
Rolf Koch01/20/18
p.specht02/08/17
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie