Win32-ShellExt

 view release on metacpan or  search on metacpan

ShellExt/CtxtMenu.pm  view on Meta::CPAN

=head1 SYNOPSIS

  # Sample usage of that module:
  package Win32::ShellExt::CopyPath;

  use strict;
  use Win32::ShellExt;
  use Win32::Clipboard;

  $Win32::ShellExt::CopyPath::VERSION='0.1';
  $Win32::ShellExt::CopyPath::TEXT="Copy path to clipboard";
  @Win32::ShellExt::CopyPath::ISA=qw(Win32::ShellExt);

  sub query_context_menu() {
    "Win32::ShellExt::CopyPath";
  }

  sub action() {
	my $self = shift;
	my $CLIP = Win32::Clipboard();
	$CLIP->Set(join '\n',@_);

ShellExt/CtxtMenu/CopyPath.pm  view on Meta::CPAN

# and http://www.mainsoft.fr/files/clipname.zip
# apparently everyone's rewriting that same extension over and over
# again...
#

use strict;
use Win32::ShellExt::CtxtMenu;
use Win32::Clipboard;

$Win32::ShellExt::CtxtMenu::CopyPath::VERSION='0.1';
$Win32::ShellExt::CtxtMenu::CopyPath::COMMAND="Copy path to clipboard";
@Win32::ShellExt::CtxtMenu::CopyPath::ISA=qw(Win32::ShellExt::CtxtMenu);

sub query_context_menu() {
	my $self = shift;
	# @_ now holds a list of file paths to test to decide whether or not to pop our extension's menu.

	# return false if the menu item is not to be included, or a string to 
	# be used as display value if it is.
	my $s = "Win32::ShellExt::CtxtMenu::CopyPath";
	$s;

ShellExt/CtxtMenu/LinkExtor.pm  view on Meta::CPAN

# -*- cperl -*-
# (C) 2002 Jean-Baptiste Nivoit
package Win32::ShellExt::CtxtMenu::LinkExtor;

# extract a list of links from an HTML file an put it in the clipboard.

use strict;
use Win32::ShellExt::CtxtMenu;
use Win32::Clipboard;
use HTML::LinkExtor;
use URI::URL;

$Win32::ShellExt::CtxtMenu::LinkExtor::VERSION='0.1';
$Win32::ShellExt::CtxtMenu::LinkExtor::COMMAND="Extract links from HTML into clipboard";
@Win32::ShellExt::CtxtMenu::LinkExtor::ISA=qw(Win32::ShellExt::CtxtMenu);

sub query_context_menu() {
	my $self = shift;

	my $s = "Win32::ShellExt::CtxtMenu::LinkExtor";
	my $item;

	foreach $item (@_) { undef $s if($item!~m!\.html$!i); }

ShellExt/CtxtMenu/MD5.pm  view on Meta::CPAN

# -*- cperl -*-
# (C) 2002 Jean-Baptiste Nivoit
package Win32::ShellExt::CtxtMenu::MD5;

# generate MD5 signature for a file into a new file.
# TODO: add command to generate signature into clipboard.

use strict;
use Win32::ShellExt::CtxtMenu;
use MD5;

# strip whitespace from a file.

$Win32::ShellExt::CtxtMenu::MD5::VERSION='0.1';
$Win32::ShellExt::CtxtMenu::MD5::COMMAND="generate MD5 digest";
@Win32::ShellExt::CtxtMenu::MD5::ISA=qw(Win32::ShellExt::CtxtMenu);

ShellExt/Search.pm  view on Meta::CPAN

# a search handler is just a context menu extension with additionnal registry keys, according to
# http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_extending/extensionhandlers/searchhandlers.asp
#

package Win32::ShellExt::Search;

use strict;
use Win32::ShellExt;

$Win32::ShellExt::Search::VERSION='0.1';
$Win32::ShellExt::Search::COMMAND="Copy path to clipboard";
@Win32::ShellExt::Search::ISA=qw(Win32::ShellExt);

sub query_context_menu() {
	my $self = shift;
	"Win32::ShellExt::Search";
}

sub action() {
	my $self = shift;
	# @_ now holds the list of file paths we want to act on.



( run in 1.160 second using v1.01-cache-2.11-cpan-81fc1098f69 )