added LSL2 stored procedures
This commit is contained in:
25
LSL2/STPROC/RTI_ENUMPRINTERCONNECTIONS.txt
Normal file
25
LSL2/STPROC/RTI_ENUMPRINTERCONNECTIONS.txt
Normal file
@ -0,0 +1,25 @@
|
||||
FUNCTION rti_enumPrinterConnections(void)
|
||||
|
||||
/*
|
||||
** return a list of printers defined for this user
|
||||
** translated from http://ss64.com/vb/enumprinter.html
|
||||
**
|
||||
** 08-08-2012 rjc Created
|
||||
*/
|
||||
|
||||
Ans = ''
|
||||
|
||||
DEBUG
|
||||
|
||||
WshNetwork = OleCreateInstance("WScript.Network")
|
||||
Printers = OleCallMethod(WshNetwork, 'EnumPrinterConnections')
|
||||
|
||||
cnt = OleGetProperty(Printers, 'Length')
|
||||
|
||||
For I = 1 To cnt STEP 2
|
||||
this_port = OleCallMethod(Printers, 'item', I-1)
|
||||
this_printer = OleCallMethod(Printers, 'item', I)
|
||||
Ans<-1> = this_printer:@VM:this_port
|
||||
Next
|
||||
|
||||
Return Ans
|
Reference in New Issue
Block a user