The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Xul2ppt_mec.pm - convert .xul to .ppt on Win32 Platform mechanically

SYNOPSIS

        use strict;
        use warnings;   
        use Win32::Xul2ppt_mec;

        my $obj = Win32::Xul2ppt_mec->new(        
                                          'range'       => [1, 10],
                                          'interval'    => 1,
                                          'dir'                 => 'D:/tmp',
                                          'name'                => 'sample.ppt',
                                          );

        $obj->shoot();  #catch screen from mozilla firefox and generate images 
        #$obj->trim();  #trim the intermediate images
        $obj->to_ppt(); #insert the images into your ppt

Note: (If you want to convert directly, please consult the bundled Xul2ppt utilities.)

DESCRIPTION

This module provides an interface to convert .xul files to .ppt files with virtual or mechanical method. By the interfaces of controlling keys and mouse automacally provided by Win32::Guitest, you can convert your .xul to .ppt in free time. To do so, Win32::Guitest module installer is prerequired. And if you need to trim the pictures to get a mini-ppt files Image-Magic installer also prerequired.

METHOD

  • $obj->new()

            my $obj = Win32::Xul2ppt_mec->new(        
                                                      'range'       => [1, 10],
                                                      'interval'    => 1,
                                                      'dir'                 => 'D:/tmp',
                                                      'name'                => 'sample.ppt',
                                                      );

    The attributes of the Xul2ppt_mec are described below, in the ATTRIBUTES section.

  • $obj->shoot()

    Before invoking this method, please make sure that your .xul file has already been opened by mozilla firefox and the window not minimized.

  • $obj->trim()

    After shooting terminates, pictures of your .xul files displayed on mozilla firefox are catched and saved under a certain directory. However, some blemish remains in the raw pictures, further trimming the pictures are strongly recommended. Two command lines provided by Imagic-Magic are invoking:

    "convert -crop +0+25 $file $file"

    "convert -trim $file $file".

  • $obj->to_ppt();

    Automacally inserts pictures into your .ppt files. Before running, powerpoint should be started and not minimized!

ATTRIBUTES

  • $obj->{'range'} Set the start and end index of .xul shooted

  • $obj->{'interval'}

    set the interval of seconds between each mechanical operation, if it runs on a fast machine, you can shorten it. 2 seconds is default value.

  • $obj->{'dir'}

    set the directory, under which all the intermediate files will be saved. and 'D:\tmp' is default;

  • $obj->{'name'}

    set the name of your .ppt file, 'sample.ppt' is default

xul2ppt command tools to convert .xul to .ppt

SYNOPSIS

xul2ppt [ -r "[num1, num2]" | -i num | -d string | -n string ] xul2ppt.pl

OPTIONS

  • -r See $obj->{'range'}

  • -i See $obj->{'interval'}

  • -d See $obj->{'dir'}

  • -n See $obj->{'name'}

set the format of the intermediate images. '.png' is default.

AUTHOR

Sal Zhong (Zhong Wei Xiang)

zhongxiang721@gmail.com

Copyright (c) 2006 Sal Zhong. All rights reserved.