Win32Util - a collection of Win32 related functions< |
start_any_viewer($file)
start_html_viewer($file)
start_ps_viewer($file)
start_ps_print($file)
start_mail_composer($mailaddr)
get_class_by_ext($ext)
install_extension(%args)
write_uninstall_information(%args)
get_home_dir()
create_shortcut(%args)
create_internet_shortcut(%args)
add_recent_doc($doc)
create_program_group(%args)
client_window_region($tk_window)
screen_region($tk_window)
maximize($tk_window)
get_sys_color($what)
disable_dosbox_close_button()
Win32Util - a collection of Win32 related functions
use Win32Util;
This is a collection of Win32 related functions. There are no strict prerequirements for this module, however, full functionality can only be achieved if some CPAN modules (Win32::Registry, Win32::API, Win32::DDE, Win32::Shortcut ...) are available. By default, most of these modules are already bundled with the popular ActivePerl package.
start_any_viewer($file)
Based on extension of the given $file, start the appropriate viewer.
start_html_viewer($file)
Start a html viewer with the given file. This is mostly a WWW browser.
start_ps_viewer($file)
Start a postscript viewer with the given file.
start_ps_print($file)
Print a postscript file via a postscript viewer.
start_mail_composer($mailaddr)
Start a mail composer with $mailaddr as the recipient.
Start an external program named $cmd. $cmd should be the full path to the executable. @args are passed to the program. The program is spawned, that is, executed in the background.
Return a hash reference with all environment variable names changed to uppercase.
Start a program via DDE. (What is $app and $topic?)
Get a command from registry for $filetype. The ``open'' type is returned, except stated otherwise.
get_class_by_ext($ext)
Return the class name for the given extension.
install_extension(%args)
Install a new extension (class) to the registry. The function may take the following key-value parameters:
write_uninstall_information(%args)
$appname
and $version
.
Get current windows user.
Guess if current user has admin rights.
Get the folder path for the current user, or, if $public is set to a true value, for the whole system. If $foldertype is not given, the ``Personal'' subfolder is returned.
Get the folder path for the program files (usually C:\Program Files).
get_home_dir()
Get home directory (from domain server) or the $HOME variable.
lwp_auto_proxy($lwp_user_agent)
Set the proxy for a LWP::UserAgent object (similar to the unix-centric env_proxy method). Uses the Internet Explorer proxy setting.
send_mail(%args)
Send an email through MAPI or other means. Some of the following arguments are recognized:
This is from Win32 FAQ. Not tested, because MAPI is not installed on my system.
create_shortcut(%args)
Create a shortcut (a desktop link). The following arguments are recognized:
create_internet_shortcut(%args)
Create an internet shortcut. The following arguments are recognized:
Specify where to save the .lnk file. If -file is not given, the file will be stored on the current user desktop. The filename will consist of the -url parameter and the .lnk extension.
add_recent_doc($doc)
Add the specified document to the list of recent documents.
create_program_group(%args)
Create a program group. Following arguments are recognized:
Return a list of CDROM drives on the system.
get_drives([$drive_filter])
Return a list of drives on the system. The optional parameter
$drive_filter
should be a comma-separated string with the possible
values cdrom
, fixed
(for fixed drives like harddisks),
ramdisk
, remote
(for net drives), and removable
(for
removable drives like ZIP or floppy disk drives).
path2unc($path)
Expand a normal absolute path to a UNC path.
client_window_region($tk_window)
Return maximum region for a window (without borders, title bar, taskbar area). Format is ($x, $y, $width, $height).
screen_region($tk_window)
Return maximum screen size without taskbar area.
maximize($tk_window)
Maximize the window. If Win32::API is installed, then the taskbar will not be obscured.
get_sys_color($what)
Return ($r,$g,$b) values from 0 to 255 for the requested system color.
$what
is any of: scrollbar, background, activecaption,
inactivecaption, menu, window, windowframe, menutext, windowtext,
captiontext, activeborder, inactiveborder, appworkspace, highlight,
highlighttext, btnface, btnshadow, graytext, btntext,
inactivecaptiontext, btnhighlight, 3ddkshadow, 3dlight, infotext,
infobk.
disable_dosbox_close_button()
As the function name says :-). Derived from a posting from Jack D.
NOT YET TESTED!
Keep the window $tk_window
on top. If Win32::API
is not
available, a crude hack with a <Visibility> binding is used instead.
If the optional variable $flag
is false, ``keep on top'' is disabled.
sort_cmp_hack($a,$b)
``use locale'' does not work on Windows. This is a hack to be used in sort for german umlauts.
perlwin32, Win32::API, Win32::OLE, Win32::Registry, Win32::Process, Win32::DDE, Win32::Shortcut, Tk, the LWP::UserAgent manpage.
Slaven Rezic <slaven@rezic.de>
Copyright (c) 1999, 2000, 2001, 2002 Slaven Rezic. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Win32Util - a collection of Win32 related functions |