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 8 -


Yes,

the allows XProfan not -

one Return within While/ Repeat Loop.

One Programmierfehler.

creep with Break durchbrechen.
 
11/11/12  
 




Rolf
Koch
Jepp, Have something like in recollection. Well, the can I Yes solve.
How the life so game, is me too yet the printer verreckt LOOOOL. means Have I Fileprinter tuned and see there (after I it testweise without XPSE walk let), there comes nothing on. HEEEEUUUULLLL.
so How the program looks, would it very the, I wants, even the important DOKUMENTTITEL is thereby!

Nachtrag: alike whether the printer on the A..h is, Druckaufträge weg Yes out and to that testing reicht it. come means on. but remainder, time look.

Nachtrag 2: in the Profaninterpreter runs it correct, if I it purely How written with Profan compiliere and a Exe create, comes a EAccess Violation ????
 
11/11/12  
 




Andreas
Miethe


Rolf Koch (11.11.12)

Jepp, Have something like in recollection. Well, the can I Yes solve.


This will but not so simply his, because very on this place must You out from the procedure, otherwise become You a Error Message get. whether XProfan the allows ?, MUSS permit . by me functions the only so

functions because The EXE ?
 
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/11/12  
 




Rolf
Koch
No unfortunately not Andreas, How written EAccess Violation ..... something with Reading address.
one can still out? because is a globale Variable setting and to the Return these filling, or be I too long out been? ^^
means wrong framed.
instead of Return a variable fill so meant I.
 
11/11/12  
 




Rolf
Koch
in a whether it Erfolgsversprechend is, but Have straight over the computer of my woman a pressure rausgeschickt. As I said in the Interpreter runs it Yes and this pressure watts nice displayed.
The question is now: behave itself one directly angeschlossener printer by Netzwerkkabel just as? means The question, becomes really everything quizzed?
then should I only yet whom code laufbar get as EXE.
can it hardly expect, because these thing nagt already Monatelang on me rum what about me turn yet ex.
 
11/11/12  
 



@Andreas: what speaks against Break and against it, to the Schleifenkörper

The function To leave? Return within creep bring Stacks confusion -

at interpretierten XProfan imho gleichermassen How at nativen (n)Profan.

therefore reports XPSE the too as error, XProfan reports the imho first to Laufzeit

as error but I white not whom versions.
 
11/12/12  
 




Andreas
Miethe


Hello Rolf,
,
the ought to with windows7 too with the Dll functions, only rather, there no Zweitprocess needed becomes.
The Calling the function ought to so looks:

Result$ = String$(WMIResult1("SELECT Document,Caption,TimeSubmitted FROM Win32_PrintJob","root\\CIMV2","","",""),0)

means any Leerstrings too empty let, not 0.0.0.0
 
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/12/12  
 




Rolf
Koch
Okay I try it then again so
 
11/12/12  
 




Rolf
Koch
Ähhh Andreas the following lying me in Your code to:
CompileMarkSeparation
WINDOW 800,700
CLS
Var OldR& = 0
Var s& = Create("listbox",%hwnd,"",10,20,200,600)
Var s2& = Create("listbox",%hwnd,"",210,20,500,600)
Var ende& = 0

WhileNot ende&

    WaitInput 200'alle 200 Millisekunden aktualisieren
    'Daten von Printjobs auflisten
    '                               Parameter: 'Query,'Adresse,'IP,Computername,Passwort,Listbox1,Listbox2
    OldR& = external("AMP_WMI.DLL","WMIResult","Win32_PrintJob","root\CIMV2","192.168.0.3","","",S&,S2&)
    'Prozessordaten auflisten
    'OldR& = external("AMP_WMI.DLL","WMIResult","Win32_Processor","root\CIMV2","","","",S&,S2&)
    'Cdrom drives auflisten
    'OldR& = external("AMP_WMI.DLL","WMIResult","Win32_CDROMDrive","root\CIMV2","","","",S&,S2&)
    'Sound-Device auflisten
    'OldR& = external("AMP_WMI.DLL","WMIResult","Win32_SoundDevice","root\CIMV2","","","",S&,S2&)
    'Base-Board auflisten
    'OldR& = external("AMP_WMI.DLL","WMIResult","Win32_Bios","root\CIMV2","","","",S&,S2&)
    Locate 0,0
    Print " Anzahl : " ;oldR&

    If OldR& = 0

        SendMessage(s&,$184,0,0)'listen löschen
        SendMessage(s2&,$184,0,0)

    EndIf

EndWhile

End

where building I because your Result$ String one? Sorry!
 
11/12/12  
 




Andreas
Miethe


Ups, there have You yet whom middle-aged code.
attempt whom here.
CompileMarkSeparation
 $H Windows.ph
ImportDll("AMP_WMI.DLL","")
WINDOW 800,600
WindowTitle "WMI-Test"
UseIcon "A"
CLS  ~GetSysColor(~COLOR_3DFACE)
Var OldR& = 0
Var Result$ = ""
Var ende& = 0
Declare A$[]
Declare B$[]
Declare s$[]
Declare Jobs&
Var PrintTjobs& = Create("Text",%hwnd,"Printjobs",10,60,300,20)
SetFont PrintTjobs&,~GetStockObject(~DEFAULT_GUI_FONT)
Var T$ = "Job;0;160;Drucker;0;200;Dokument;0;200;Zeit;0;200"
Var Grid& = Create("GridBox", %hwnd,T$,0,10,80,764,360)

Proc Printjobs

    ~Lockwindowupdate(Grid&)

    Repeat

        DeleteString(Grid&,0)

    Until GetCount(Grid&) = 0

    Result$ = String$(WMIResult1("SELECT Document,Caption,TimeSubmitted FROM Win32_PrintJob","root\\CIMV2","","",""),0)
    A$[] = Explode(Result$,chr$(10)+chr$(13))
    Jobs& = (A$[0])

    WhileLoop 0, SizeOf(A$[]) - 1

        If Left$(A$[&loop],8) = "Document"

            B$[] = Explode(A$[&loop],";")

            Whileloop 1,Jobs&

                s$[&loop] = s$[&loop]+"|"+Translate$(B$[&loop],";",":")

            EndWhile

        ElseIf Left$(A$[&loop],7) = "Caption"

            B$[] = Explode(A$[&loop],";")

            Whileloop 1,Jobs&

                s$[&loop] = Str$(&loop)+"|"+Translate$(B$[&loop],";",":")

            EndWhile

        ElseIf Left$(A$[&loop],13) = "TimeSubmitted"

            B$[] = Explode(A$[&loop],";")

            Whileloop 1,Jobs&

                s$[&loop] = s$[&loop]+"|"+String$(DateTime(B$[&loop]),0)

            EndWhile

        EndIf

    EndWhile

    Whileloop 1, Jobs&

        Addstring(Grid&,s$[&loop])

    EndWhile

    ~Lockwindowupdate(0)

EndProc

KeinFlackern()
PrintJobs()

WhileNot ende&

    WaitInput 1000'alle 1 Sekunden aktualisieren
    PrintJobs()

EndWhile

End

Proc KeinFlackern

    ~SetClassLong(%hwnd,~GCL_STYLE,(~GetClassLong(%hwnd,~GCL_STYLE)- ~CS_HREDRAW - ~CS_VREDRAW))
    SetStyle %hwnd, GetStyle(%hwnd) | ~WS_CLIPCHILDREN
    SetStyle 1,%hwnd, GetStyle(1,%hwnd) | $2000000'WS_EX_COMPOSITED (Do
uffer) ENDPROC
 
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/12/12  
 




Rolf
Koch
OK
 
11/12/12  
 




Rolf
Koch
unfortunately again what, see Appendix.

11 kB
Hochgeladen:11/12/12
Downloadcounter85
Download
 
11/12/12  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

111.069 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