Chutriel235 / Class_Printers

AutoHotkey wrapper for Print Spooler API Functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class_Printers

AutoHotkey wrapper for Print Spooler API Functions (msdn-docs)

Examples

Retrieves the printer name of the default printer for the current user on the local computer.

MsgBox % Printers.GetDefault()

Sets the printer name of the default printer for the current user on the local computer.

Printers.SetDefault("\\192.168.10.1\PRINTER_A")

Adds a connection to the specified printer for the current user.

Printers.AddConnection("\\192.168.10.1\PRINTER_A")

Deletes a connection to a printer that was established by a call to AddPrinterConnection or ConnectToPrinterDlg.

Printers.DeleteConnection("\\192.168.10.1\PRINTER_A")

Deletes the specified printer object.

Printers.Delete("HP DeskJet")

Enumerates available printers, print servers, domains, or print providers.

; 0x2 -> LOCAL | 0x4 -> CONNECTIONS
for k, v in Printers.Enum(0x2|0x4)
    MsgBox % v.PrinterName

Retrieves information about a specified printer.

MsgBox % Printers.GetInfo("\\192.168.10.1\PRINTER_A").Location

Questions / Bugs / Issues

Report any bugs or issues on the AHK Thread. Same for any questions.

Copyright and License

The Unlicense

Donations (PayPal)

Donations are appreciated if I could help you

About

AutoHotkey wrapper for Print Spooler API Functions

License:The Unlicense


Languages

Language:AutoHotkey 100.0%