| |
|
|
- 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? |
|
|
| |
|
|
| |
|
- Page 8 - |
|
|
| Yes,
the allows XProfan not -
one Return within While/ Repeat Loop.
One Programmierfehler.
creep with Break durchbrechen. |
|
|
| |
|
|
|
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 ???? |
|
|
| |
|
|
|
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. |
|
|
| |
|
|
|
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. |
|
|
| |
|
|
|
| @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. |
|
|
| |
|
|
|
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 |
|
|
| |
|
|
|
Rolf Koch | Ähhh Andreas the following lying me in Your code to: CompileMarkSeparationWINDOW 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! |
|
|
| |
|
|
|
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 |
|
|
| |
|
|
|
Rolf Koch | unfortunately again what, see Appendix. |
|
|
| |
|
|