English
Forum

Print Page Content read

 
- Page 1 -



Rolf
Koch
The following is again not my strength
Have one Tool program, where I on a printer with the usual Apis access.
me missing To dato yet irgendeine Possibility if the Druckbefehl ankommt before whom Content auszulesen, before it druckt.
means so in the manner: Druckerseite in String.
of/ one a idea? me falls in the momentum nothing one
 
11/17/10  
 



 
- Page 2 -


« this Posting watts as Solution marked. »

- Page 4 -



Andreas
Miethe


Rolf Koch (11/20/10)
so having before the Konzert again gekuckt and fixes, that
print test&,wi&,he&
always 0,0,0 printen.
Well time cosy rangehen and study ^^


If asks on the incorrect place the Devmode-structure.
high or Landscape standing on position 44 as word 1 or 2
 {$cleq}
 $H windows.ph
 $H winspool.ph
DEF Get_STDPrinter(1) Substr$(ReadIni$("WIN.INI","Windows","Device"),@&(1),",")
DEF &PRINTER_CHANGE_JOB  $FF00
DEF &INFINITE $FFFFFFFF
DEF &PRINTER_CHANGE_ADD_JOB $100
DEF OpenPrinterA(3) !"winspool.drv","OpenPrinterA"
DEF FindFirstPrinterChangeNotification(4) !"winspool.drv","FindFirstPrinterChangeNotification"
DEF FindNextPrinterChangeNotification(4) !"winspool.drv","FindNextPrinterChangeNotification"
DEF EnumJobsA(8) !"winspool.drv","EnumJobsA"
DEF FindClosePrinterChangeNotification(1) !"winspool.drv","FindClosePrinterChangeNotification"
DEF ClosePrinter(1) !"winspool.drv","ClosePrinter"
Declare JOB_INFO_1#
Declare druckername$,document$,dstring$
Declare end%,lb&,old_count&,entry$,sounddir$,license$
Declare hicon&,cancel&,Title$,Version$,config$
Declare wav$,dateipfad$,belege$,watts$,new$,abelege%
Var InfoBuffer& = 0
Var BytesNeeded& = 0
Var BytesReturned& = 0;
Var A& = 0
Var L& = 0
Var chgObject& = 0
Var pdwChange& = 0
Var fcnreturn& = 0
Var hPrinter& = 0
Var foundprint& = 0
Var Printer$ = Get_STDPrinter(1)
Var devmoaddr&=0
Var drv$=""
Var wi&=0
Var he&=0
Var Orientation&=0
Var test&=0
//Window Style 64
CLS
print usedll("winspool.drv")
print printer$
print OpenPrinterA(Addr(Printer$),Addr(hPrinter&),0)
print hPrinter&
chgObject& = FindFirstPrinterChangeNotification(hPrinter&,&PRINTER_CHANGE_JOB, 0, 0)
print chgObject&
dateipfad$=$progdir
dstring$="Drucktest.rtf"'Wordpad File under Drucktest.rtf stored for Test!
' best a Filedruck select, so one no paper uses.
settimer 50

WhileNot end%

    Waitinput

    If %wmtimer

        ~WaitForSingleObject(chgObject&,150)'200 Millisekunden Waiting
        fcnreturn& = FindNextPrinterChangeNotification(chgObject&, Addr(pdwChange&),0,0)
        foundprint&=0

        If fcnreturn&

            If pdwChange& = &PRINTER_CHANGE_ADD_JOB

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

                Repeat

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

                    If BytesReturned&

                        'Locate 0,0
                        druckername$=String $(Long(JOB_INFO_1#,4),0)
                        document$=String $(Long(JOB_INFO_1#,16),0)
                        foundprint&=1
                        devmoaddr&=Long(JOB_INFO_1#,40)
                        test&=long(devmoaddr&,104)
                        wi&=long(devmoaddr&,108)
                        he&=long(devmoaddr&,112)
                        Orientation&=word(devmoaddr&,44)
                        drv$=string $(devmoaddr&,0)

                    EndIf

                Until BytesReturned& = 0

                If foundprint&=1

                    print document$
                    print dstring$
                    print drv$
                    print test&,wi&,he&
                    Print If (Orientation& = 1,"Hochformat","Querformat")

                    If document$=dstring$

                        'playsound sounddir$+"doorbell.wav",1 'HIER SOUNDAUSGABE
                        PRINT "Jetzt would the loudspeaker Dingdong spielen"

                    EndIf

                EndIf

            EndIf

        EndIf

    EndIf

EndWhile

FindClosePrinterChangeNotification(chgObject&)
ClosePrinter(hPrinter&)
killtimer
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 :  [...] 
11/20/10  
 




E.T.
Ah Yes. and into File must You Nich bad...

[OFFTOPIC]because it would Yes no trouble, from your Prog. on each To druckende File To react, ggf. somewhere in the Dok a Headline auszulesen and then, if Headline = "gefällt mir", in your Prog on it To react...[/OFFTOPIC]


freedom for printer (and its Datei'n and users)
or differently ausgedrück: Sch... rights the Admin's
 
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...
11/17/10  
 




Rolf
Koch
can I not look, I wisely not yet time where The lying, where The since comes very and much More (will be so did i never Info get, is already one wonder, that I The permit for my Tool get have). therefore I will The Yes (what me slow unmöglich appear) whom Content directly to place reading.

and my spelling ought to so did i time read and then automatically regulate let
 
11/17/10  
 




E.T.
Well, the where ought to Yes not the trouble his (standard: %SYSTEMROOT%\system32\spool\printers). If one at least on The printer-Settings (too only to that reading) rankommt, can the Verz. indeed rausfinden:


Druckerverwaltung open, with right in that vain clicking and whom Druckservereigentschaften find You whom way for Spooler.

. then had one already time a directory, which on To druckende Dok's screen go could...
 
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...
11/17/10  
 




E.T.
I see, %SYSTEMROOT% is certainly again not spare readable...
 
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...
11/17/10  
 




Rolf
Koch
Tjo, alas were simply time. The Idea with the Printdir is supi. however i will absolutely a short Tricklosen lane - otherwise lass I it. an Api The something like could. I such time moreover.
 
11/17/10  
 



<-- still not herausgelesen has which Information at all exist ^^

where comes "JavaPrinting" or. where stehts and/ or How ermittelst Dus?
 
11/17/10  
 




Rolf
Koch
@iF The Dokumententitel lying to and on whom komm I ran and this has yet always gereicht. now How said is the cover generalizing been and isn't More particularly identifizierend.
 
11/17/10  
 



Rolf Koch (17.11.10)

@iF The Dokumententitel lying to and on whom komm I ran and this has yet always gereicht. now How said is the cover generalizing been and isn't More particularly identifizierend.


what my question "Woher comes "JavaPrinting" or. where stehts and/ or How ermittelst Dus?" thoroughly not answers!

"liegt vor" <-- still mail?! ^^
 
11/17/10  
 




Rolf
Koch

CompileMarkSeparation
if %wmtimer

    ~WaitForSingleObject(chgObject&,150)'200 Millisekunden warten
    fcnreturn& = FindNextPrinterChangeNotification(chgObject&, Addr(pdwChange&),0,0)
    foundprint&=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
                    druckername$=String$(Long(JOB_INFO_1#,4),0)
                    dokument$=String$(Long(JOB_INFO_1#,16),0)
                    foundprint&=1

                Endif

            Until BytesReturned& = 0

            if foundprint&=1

                'print dokument$

                if dokument$=dstring$

                    ' if dokument$="kdsound - Editor" ' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                    abelege%=abelege%+1

                    if readini$(config$,"SOUND","ON") = ""

                        playsound sounddir$+"doorbell.wav",1'HIER SOUNDAUSGABE

                    endif

                endif

            endif

        endif

    Endif


Look if $dokument=dstring$
there I compare whom Dokumententitel. The of printer comes and Dstring, which of outer (inidatei) adjustable is.
 
11/17/10  
 



[OFFTOPIC]
E.T. (17.11.10)

freedom for printer (and its Datei'n and users)
or differently ausgedrück: Sch... rights the Admin's


very, I find too the You quiet your Webserverzugangsdaten here time finally abandon should! Viva la Web! [/OFFTOPIC]
 
11/17/10  
 




Rolf
Koch
before I wetting and bed go:
means there konnt I always beautiful Sound spend, if Dokument=Warenausgabe.grp
now
Dokument=JavaPrinting works well, but too with diversen others Druckjobs.
now verständlicher?
Firmensoftware watts hold changed and accordingly too the Dokutitel ^^
 
11/17/10  
 




E.T.
...now should one hold know, what in the "JavaPrinting" drinn standing...

[OFFTOPIC]@IF: würd I Yes make, if I selbige not forget had...[/OFFTOPIC]
 
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...
11/17/10  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

47.115 Views

Untitledvor 0 min.
Christof Neuß05/20/18
Manfred Barei07/26/15
Uwe Lang09/06/13
Pauli05/14/13
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