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 AutoHotkey to VDS

 
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: 1753
Location: Space and Time

PostPosted: Wed Jan 26, 2011 9:48 pm    Post subject: Convert AutoHotkey to VDS Reply with quote

I have some code from AutoHotkey that I want to convert to VDS code. It looks like it can be, but I'm not sure how to. Could someone help?

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
   TrayTip
}


Thanks a lot!!!

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 768
Location: Eastman, GA

PostPosted: Tue Apr 19, 2011 11:27 pm    Post subject: Reply with quote

Pulled from DanTheMan: http://www.vdsworld.com/forum/viewtopic.php?t=344&highlight=printer

%%DEFPRT = @REGREAD(LOCAL,Config\0001\System\CurrentControlSet\Control\Print\Printers,default)

I'm not sure if a write command to this key will refresh quickly.
Back to top
View user's profile Send private message AIM Address
LiquidCode
Moderator Team


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

PostPosted: Sat Apr 23, 2011 1:29 am    Post subject: Reply with quote

Thanks. I'll give it a try.
_________________
Chris
Http://theblindhouse.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