Re: [perlguitest] Some Newbie questions
- On Mon, 26 Jul 2004 15:38:15 -0000, Yaron wrote:
> Hi AllNo mouse clicks, but here's a routine I'm using with FrameMaker
> I'm trying to automate the running of a windows-based program and
> since I'm an experienced PERL user, I thought I'd give GUITEST a
> try. My problem is that I'm not savvy with windows programming
> (worked a lot with Unix variants).
> Can anyone point me to an example that shows how to: 1) Identify
> window 2) Select through menus/submenue 3) enter data in forms 4)
> Perform mouse-clicks
which adds filenames to a FrameMaker book.
use Win32::GuiTest ':ALL';
# brings in a list of (java) files whose filenames
# are to be used as the base for FrameMaker (.fm) files
# to be included into a book file (opened in MIF format)
my(@bkcomps) = @_;
# I find this routine from Win32::Process handy in opening
# the win apps you want
my ($winObj, $fgWindow, $fmfile);
|| die( "Couldn't start FrameMaker!\n");
$fgWindow = WaitWindowLike(0, "^Adobe FrameMaker", "FrameFamily7.0MdiFrame");
foreach $fmfile (@bkcomps)
# select menu item using keystroke shortcut
# this also sets focus to an open entry field
# waiting for the filename.
# negotiate through other fields to the OK button
# and press it
-Peter G. Martin,
Technical writer, Proxima Technology
Not so much a bug -- more a documentation opportunity.