Xul2ppt_mec.pm - convert .xul to .ppt on Win32 Platform mechanically
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.)
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.
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.
Before invoking this method, please make sure that your .xul file has already been opened by mozilla firefox and the window not minimized.
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".
Automacally inserts pictures into your .ppt files. Before running, powerpoint should be started and not minimized!
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.
set the directory, under which all the intermediate files will be saved. and 'D:\tmp' is default;
set the name of your .ppt file, 'sample.ppt' is default
xul2ppt [ -r "[num1, num2]" | -i num | -d string | -n string ] xul2ppt.pl
set the format of the intermediate images. '.png' is default.
Sal Zhong (Zhong Wei Xiang)
Copyright (c) 2006 Sal Zhong. All rights reserved.