Printer Help File

Printer Help File

Plugin Name:

Printer

Current Version:

1.0.0.0

Description:

Wide range of printer related functions utilizing various built in Windows DLLs to achieve maximum productivity in AMS.

Author:

Jason Thompson dba FoxxPC

Web:

http://www.foxxpc.com (under construction)

E-mail:

j.thompson@foxxpc.com

Requirements:

Windows 2K/XP/Vista/7 and AutoPlay Media Studio 8

Copyright:

© 2010 Jason Thompson dba FoxxPC

Install Notes:

If installing on Windows Vista/7 make sure your projects have invoke administrative selected in your project options.


Table of Contents

Printer.Default
Printer.Comment
Printer.Share
Printer.UnShare
Printer.Preferences
Printer.Properties
Printer.ServerProperties
Printer.Test
Printer.InstallWiz
Printer.RemoveLocal
Printer.RemoveNetwork
Printer.Rename
Printer.Set2Direct
Printer.Set2Spool
Printer.Print
Printer.Pause
Printer.SpoolerService

Printer.Default


(string) Printer.Default ( 

(string) Printer = "Printer" )

Description

Sets the given printer as default

Parameters

Printer

(string) Name of the Printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

Returns

(string) Returns "1" if operation fails. Returns "0" if operation is successful


Example

result = Printer.Default("MyPrinter")



Printer.Comment


(string) Printer.Comment ( 

(string) Printer = "Printer",

(string) Comment = "My Printer" )

Description

Sets the comment for the given printer

Parameters

Printer

(string) Name of the printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

Comment

(string) Comment to add to the printer

Returns

(string) Returns "1" if operation fails. Returns "0" if operation is successful.


Example

result = Printer.Comment("MyPrinter","My Printer Comment")



Printer.Share


(string) Printer.Share ( 

(string) Printer = "Printer",

(string) Sharename = "MyPrinter" )

Description

Sets the given printer as shared

Parameters

Printer

(string) Name of the printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

Sharename

(string) Name that you want the printer to be shared as

Returns

(string) Returns "1" if operation fails. Returns "0" if operation is successful


Example

result = Printer.Share("MyPrinter","MySharedPrinter")



Printer.UnShare


(string) Printer.UnShare ( 

(string) Printer = "Printer",

(string) Sharename = "MyPrinter" )

Description

Sets the given printer as unshared

Parameters

Printer

(string) Name of the printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

Sharename

(string) Name in which you want the printer shared as

Returns

(string) Returns "1" if operation fails. Returns "0" if its successful


Example

result = Printer.UnShare("MyPrinter","MySharedPrinter")



Printer.Preferences


(string) Printer.Preferences ( 

(string) Printer = "MyPrinter" )

Description

Opens the printer preferences dialog for the given printer

Parameters

Printer

(string) Name of the Printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

Returns

(string) Returns "1" if the operation fails. Returns "0" if its successful


Example

result = Printer.Preferences("MyPrinter")



Printer.Properties


(string) Printer.Properties ( 

(string) Printer = "MyPrinter" )

Description

Opens the printer properties dialog for the given printer

Parameters

Printer

(string) Name of the printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

Returns

(string) Returns "1" if operation fails. Returns "0" if operation is successful


Example

result = Printer.Properties("MyPrinter")



Printer.ServerProperties


(string) Printer.ServerProperties ()

Description

Opens the print server properties dialog

Returns

(string) Returns "1" if operation fails. Returns "0" if operations is successful.


Example

result = Printer.ServerProperties()



Printer.Test


(string) Printer.Test ( 

(string) Printer = "MyPrinter" )

Description

Prints a printer test page to the given printer

Parameters

Printer

(string) Name of the printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

Returns

(string) Returns "1" if operation fails. Returns "0" if operations is successful.


Example

result = Printer.Test("MyPrinter")



Printer.InstallWiz


(string) Printer.InstallWiz ()

Description

Opens the printer installation wizard dialog

Returns

(string) Returns "1" if operation fails. Returns "0" if successful.


Example

result = Printer.InstallWiz()



Printer.RemoveLocal


(string) Printer.RemoveLocal ( 

(string) Printer = "MyPrinter" )

Description

Removes the specified local printer from the system

Parameters

Printer

(string) The name of the printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

Returns

(string) Returns "1" if operation fails. Returns "0" if successful.


Example

result = Printer.RemoveLocal("MyPrinter")



Printer.RemoveNetwork


(string) Printer.RemoveNetwork ( 

(string) Printer = "\\\\ComputerName\\MyPrinterShare" )

Description

Removes the specified network printer from the system

Parameters

Printer

(string) Name of the printer

Note: This should be a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

Returns

(string) Returns "1" if operation fails. Returns "0" if successful.


Example

result = Printer.RemoveNetwork("\\\\ComputerName\\MySharedPrinter")



Printer.Rename


(string) Printer.Rename ( 

(string) Printer = "MyPrinter",

(string) PrinterName = "MyNewPrinter" )

Description

Renames the specified printer to the given name

Parameters

Printer

(string) Name of the printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

PrinterName

(string) The name to be used as the new printer name

Note: You can also use a network printer location. Ex. "\\MyNetworkPC\MyNewSharedPrinter"

Returns

(string) Returns "1" if operation fails. Returns "0" if successful.


Example

result = Printer.Rename("MyPrinter","MyNewPrinter")



Printer.Set2Direct


(string) Printer.Set2Direct ( 

(string) Printer = "MyPrinter" )

Description

Set the printer driver to send documents directly to printer (no spooling)

Parameters

Printer

(string) Name of the printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

Returns

(string) Returns "1" if operation fails. Returns "0" if successful.


Example

result = Printer.Set2Direct("MyPrinter")



Printer.Set2Spool


(string) Printer.Set2Spool ( 

(string) Printer = "MyPrinter" )

Description

Sets the printer driver to spool all documents instead of sending directly to printer (spooling)

Parameters

Printer

(string) Name of the printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

Returns

(string) Returns "1" if operation fails. Returns "0" if successful.


Example

result = Printer.Set2Spool("MyPrinter")



Printer.Print


(string) Printer.Print ( 

(string) Printer = "MyPrinter",

(string) FilePath = "C:\\MyFile.txt" )

Description

Prints a document to the specified printer

Parameters

Printer

(string) Name of the printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

FilePath

(string) The path to the file to be printed

Returns

(string) Returns "1" if operation fails. Returns "0" if successful.


Example

result = Printer.Print("MyPrinter","C:\\MyFile.txt")



Printer.Pause


(string) Printer.Pause ( 

(string) Printer = "MyPrinter" )

Description

Pauses the specified printer

Parameters

Printer

(string) Name of the printer

Note: You can also use a network printer location. Ex. "\\\\MyNetworkPC\\MySharedPrinter"

Returns

(string) Returns "1" if operation fails. Returns "0" if successful.


Example

result = Printer.Pause("MyPrinter")



Printer.SpoolerService


(string) Printer.SpoolerService ( 

(string) Command = "Start" )

Description

Starts or Stops the printer spooler service

Parameters

Command

(string) The command to be passed to the spooler service

Note: This can be either Start or Stop

Returns

(string) Returns "1" if operation fails. Returns "0" if successful.


Example

result = Printer.SpoolerService("Start")

result = Printer.SpoolerService("Stop")




© 2010 Jason Thompson dba FoxxPC
This File Was Generated With AMS ActionFile Editor