LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Thu May 17, 2012 7:02 pm Post subject: Convert AHK to VDS (Default Printer) |
|
|
I AHK (Auto Hotkey) code that checks and set the default printer, but I would like it in VDS code. Is there anyone that can convert this for me? I looks like it should be easy, but I cannot figure out how to do it.
Code: |
GetDefaultPrinter()
{
nSize := VarSetCapacity(gPrinter, 256)
DllCall(A_WinDir . "\system32\winspool.drv\GetDefaultPrinterA", "str", gPrinter, "UintP", nSize)
Return gPrinter
}
SetDefaultPrinter(sPrinter)
{
DllCall(A_WinDir . "\system32\winspool.drv\SetDefaultPrinterA", "str", sPrinter)
TrayTip, InsureSign, %sPrinter% set as default printer., 10, 17
Sleep, 3000
} |
Thanks! _________________ Chris
Http://theblindhouse.com |
|