Product Documentation

PDK 7.2 Documentation

VBSPerl - Converts VBScript to Perl

NAME

VBSPerl - Converts VBScript to Perl

SYNOPSIS

vbsperl [options] file

vbsperl --help | -?

vbsperl --clipboard

vbsperl --app-progid Excel.Application --app-typelib "Microsoft Office 10.0 Object Library" excel1.vbs

vbsperl --progIDMapFile mapFile

DESCRIPTION

VBSPerl converts VBScript programs or snippets to the functional equivalent in Perl. This makes it possible to translate calls to COM objects in VBScript to Perl, and makes building Perl programs for the Win32 environment easier.

Using VBSPerl

VBSPerl can read input from a specified file or from the Windows clipboard. When reading from an input file, output is written to the command window, and can be redirected to a file. Use standard pipe and redirect syntax to write output to a file. For example:

  vbsperl inputfile.vb > outputfile.pl

When reading input from the clipboard, output is written back to the clipboard and can be pasted into an editor.

VBScript conversion

Information on supported forms of VB, type libraries, VBA and VBScript associations, and conversion limitations can be found in the VBScript Converter Overview.

OPTIONS

The following command-line options are supported. Options cannot be abbreviated.

--app-progid ProgID
Used for converting VBA code. Specifies the ProgID corresponding to the application the VBA code is intended for. Only one --app-progid option may be specified. For example, to work with Excel VBA code, use:

--app-progid Excel.Application

--app-typelib pattern
Used for converting VBA code. Specifies the label (or readable name) for the type library associated with the application the VBA code was originally targeting. For example, to work with Excel VBA code, use:
  --app-typelib "Microsoft Office 10.0 Object Library"

Multiple --app-typelib options may be specified.

--clipboard
Passes the contents of the Windows clipboard to VBSPerl.

--help | -?
Print simple help message and exit.

--progIDMapFile mapFile
Used to specify an explicit mapping between a VBScript ProgID and a type library.

--readable
Favor generating readable Perl over correct Perl.

--shortcut
Creates a Windows icon on the desktop.

--verbose
Display verbose output during the conversion.

--warnings
Print warnings as comments in the generated Perl code.

SEE ALSO

VBScript Converter Overview, VBScript Converter Graphical Interface

VBSPerl is part of the Perl Dev Kit. More information available at http://www.ActiveState.com/PerlDevKit/Purchase

VERSION

This manpage documents VBSPerl version 7.2.0 (build 284799)

COPYRIGHT

Copyright (C) 1998-2008 ActiveState Software Inc. All rights reserved.

Perl includes a Parse::Yapp based standalone parser. Parse::Yapp is copyright (c) 1998-2001 Francois Desarmenien, France.