Forum | | | | Schrotti Herbert | hello everyone together, Have time a Question Druckerauswahl and of course is it possible directly from XProfan a Windowsdrucker without dialog auszuwählen ( except whom Standartdrucker) ?
my trouble is that I once a Etikettendrucker and once whom Pdf Creator use and the from the equal application.
yet I had a Posdrucker, whom I with the Print# command feed. The "neue" printer (zebra Stripe 300) reacted not any more on The command, think the understand The Esc Sequenzen never. Have me virtual resolve the trouble simply with Sartprint .....Endprint etc.
only even first the label on the zebra then a list on one Netzwerkdrucker.
has Perhaps someone a idea?
Please not too much Fachchinesisch I still not too much Idea have. |
| | | | |
| | Thomas Freier | with the here present Examples, would I simply whom Standarddrucker detect, if it not the zebra is, this as Standarddrucker settle, print, and the middle-aged Standarddrucker again as such take on. gives certainly better Solutions. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 01/10/11 ▲ |
| |
| | Schrotti Herbert | Hello Thomas Erstmal thanks for response. Yes The idea is me already come though be I not yet draufgekommen How I the mach.whom Standartdrucker check for Have I some Examples found. to that adjust but nothing, or be I blind to Eifer......
Beauty Regards from the alpine country / Herbert
Achja in addition have Winxp and XProfan9 |
| | | | |
| | | look time investigation ( [...] ) : - means could equivalentes WriteIni functions. |
| | | | |
| | E.T. | Have time a little bit "gebastelt":
'############### ##########
'printer List
'Andreas Miethe * june 2003
'##########################
DEF EnumPrinters(7) ! "WINSPOOL.DRV","EnumPrintersA"
DEF GetStandardPrinter(0) Substr$(ReadIni$("WIN.INI","Windows","Device"),1,",")
DEF &PRINTER_ENUM_LOCAL 2
DEF &PRINTER_ENUM_DEFAULT 1
Declare PrinterValues#, printer$[], Y&, Old_Standard$, Old_Standard_rest$
DEF GetStandardPrinter2(0) ReadIni$("WIN.INI","Windows","Device")
Proc EnumPrinters
Declare Printername&,Portname&,PrinterName$,PortName$,Attribs&
Declare X&,dwNeeded&,dwReturned&
EnumPrinters(&PRINTER_ENUM_LOCAL,0,5,0,0,ADDR(dwNeeded&),ADDR(dwReturned&))
Dim PrinterValues#,dwNeeded&
Clear PrinterValues#
EnumPrinters(&PRINTER_ENUM_LOCAL ,0, 5, PrinterValues#, dwNeeded&, ADDR(dwNeeded&), ADDR(dwReturned&))
While X& < dwReturned&*20
Printername& = Long(PrinterValues#,x&)
PrinterName$ = String $(Printername&,0)
Attribs& = Long(PrinterValues#,x&+8)
'the following working by me XP not:
' If Attribs& & $4
' Printername$ = Printername$ + " => Standarddrucker"
' endif
printer$[Y&] = Printername$
X& = X& + 20
inc Y&
EndWhile
Dispose PrinterValues#
Endproc
Proc Set_Std_Printer
Parameters PrinterString$
WriteIni "WIN.INI","Windows","Device"=PrinterString$
ENDPROC
cls
EnumPrinters
Print "Gefundene Drucker"
WhileLoop 0,Y&-1
Print "Drucker " + @st$(&loop) + " : " + printer$[&loop]
EndWhile
Old_Standard$ = Substr$(GetStandardPrinter2(),1,",")
Old_Standard_rest$ = Substr$(GetStandardPrinter2(),-2,",") + "," + Substr$(GetStandardPrinter2(),-1,",")
Print "***"
Print "Standard-printer :"
Print Old_Standard$
Print "***"
Print "Drucke on printer " + printer$[4]
Set_Std_Printer printer$[4] + "," +Old_Standard_rest$
StartPrint
DrawText 10,10,"Test " + printer$[4]
EndPrint
Print "Drucke on printer " + printer$[2]
Set_Std_Printer printer$[2]+","+Old_Standard_rest$
StartPrint
DrawText 10,10,"Test " + printer$[2]
EndPrint
Print "***"
Print " >>>alten Standart-printer again take on.."
Set_Std_Printer Old_Standard$+","+Old_Standard_rest$
Print "Standard : " + Old_Standard$
Print "***"
Print ""
Print "...warte"
waitinput
end
created by me the following Window (sees nat. each differently from, according to install. Printers...)
and functions wonderful. with pdf comes The request "wo speichern", and with Fax becomes to 'ner Fax-number demand. means go The printer correctly. staid.
May eachone from it make, what it wants ... |
| | | 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... | 01/11/11 ▲ |
| |
| | Thomas Freier | Perhaps too so as Why stay. at that Program Start "sammel" I The printer one on EnumPrinters is Yes here eingegangen been.
and make then a exhaust to selection
Umstellen over
with
Proc STAND_DRUCKER
Parameters p.Item%
WhileLoop GetCount(Lv.p&)
CheckMenu (200+&Loop),0
EndWhile
stdevice$=@GetString$(LV.p&,(p.Item%-201))
stdriv$= @ADD$(@substr$(@readini$("win.ini","devices",stdevice$),1,","),".drv")
stport$=@substr$(@readini$("win.ini","devices",stdevice$),2,",")
together$=stdevice$;",";substr$(stdriv$,1,".");",";stport$
writeini "win.ini","windows","device"=together$
SendMessage($FFFF,$001A,0,"windows")
Std_Druck$=stdevice$
SetText Stat&, 2, "Drucker: "+Std_Druck$
CheckMenu p.Item%,1
ENDPROC
and/ or The printer-Grundeinstellung offer, if no dialog is used
is also yet under WIN7 validly? |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 01/11/11 ▲ |
| |
| | Dieter Zornow | @ET:
your Old_Standard_rest$ can heavy go wrong, If Windows not self korrigiert. not eachone printer has whom equal Port etc. |
| | | Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2 | 01/11/11 ▲ |
| |
| | E.T. | Dieter Zornow (11.01.11)
your Old_Standard_rest$ can heavy go wrong, If Windows not self korrigiert. not eachone printer has whom equal Port etc.
this Old_Standard_rest$ is Yes really only one Verweis for 16-bit-programs, so these your Druckaufträge on whom Spooler send can (Kompatiblität - standing not in the Win.ini separate under HKEY_CURRENT_USER\Printers).
Habs time rewritten, so the (by me) the suitable entry written becomes:
'############### ##########
'printer List
'Andreas Miethe * june 2003
'##########################
DEF EnumPrinters(7) ! "WINSPOOL.DRV","EnumPrintersA"
DEF GetStandardPrinter(0) Substr$(ReadIni$("WIN.INI","Windows","Device"),1,",")
DEF &PRINTER_ENUM_LOCAL 2
DEF &PRINTER_ENUM_DEFAULT 1
Declare PrinterValues#, printer$[], Y&, Old_Standard$, Old_Standard_rest$
DEF GetStandardPrinter2(0) ReadIni$("WIN.INI","Windows","Device")
Proc EnumPrinters
Declare Printername&,Portname&,PrinterName$,PortName$,Attribs&
Declare X&,dwNeeded&,dwReturned&
EnumPrinters(&PRINTER_ENUM_LOCAL,0,5,0,0,ADDR(dwNeeded&),ADDR(dwReturned&))
Dim PrinterValues#,dwNeeded&
Clear PrinterValues#
EnumPrinters(&PRINTER_ENUM_LOCAL ,0, 5, PrinterValues#, dwNeeded&, ADDR(dwNeeded&), ADDR(dwReturned&))
While X& < dwReturned&*20
Printername& = Long(PrinterValues#,x&)
PrinterName$ = String $(Printername&,0)
Attribs& = Long(PrinterValues#,x&+8)
'the following working by me XP not:
' If Attribs& & $4
' Printername$ = Printername$ + " => Standarddrucker"
' endif
printer$[Y&] = Printername$ + ",winspool,Ne0" + @st$(Y&) + ":"
X& = X& + 20
inc Y&
EndWhile
Dispose PrinterValues#
Endproc
Proc Set_Std_Printer
Parameters PrinterString$
WriteIni "WIN.INI","Windows","Device"=PrinterString$
ENDPROC
cls
EnumPrinters
Print "Gefundene Drucker"
WhileLoop 0,Y&-1
Print "Drucker " + @st$(&loop) + " : " + Substr$(printer$[&loop],1,",")
EndWhile
Print "***"
Print "Standard-printer :"
Old_Standard$ = ReadIni$("WIN.INI","Windows","Device")
Print Substr$(Old_Standard$,1,",")
Print "***"
Print "Setze Std.-printer : " + Substr$(printer$[4],1,",")
Set_Std_Printer printer$[4]
Print " Drucke on printer : " + Substr$(printer$[4],1,",")
StartPrint
DrawText 10,10,"Test " + printer$[4]
EndPrint
Print "***"
Print "Setze Std.-printer on : " + Substr$(printer$[2],1,",")
Set_Std_Printer printer$[2]
Print " Drucke on printer : " + Substr$(printer$[2],1,",")
StartPrint
DrawText 10,10,"Test " + printer$[2]
EndPrint
Print "***"
Print ">>>alten Standart-printer again take on.."
Set_Std_Printer Old_Standard$
Print " standard : " + Substr$(Old_Standard$,1,",")
Print "***"
Print ""
Print "...warte"
waitinput
end
|
| | | 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... | 01/11/11 ▲ |
| |
| | | Erstmal THANK YOU for many Answer, now can I me really select How I the make. super be of course not yet moreover come it umzusetzen,werd but report to repay once happen.
Regards from the alpine country / Herbert |
| | | | |
| | Erasmus.Herold | TOP !!!
the have I sought.
Greeting - Erasmus |
| | | | |
|
AnswerTopic-Options | 18.731 Views |
Themeninformationenthis Topic has 7 subscriber: |