forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Convert AHK to VDS (Default Printer)

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1711
Location: Space and Time

PostPosted: Thu May 17, 2012 7:02 pm    Post subject: Convert AHK to VDS (Default Printer) Reply with quote

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://vdsfreak.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group