#!/usr/bin/perl -w use strict; my @windows; use Win32::GuiTest qw(FindWindowLike SetForegroundWindow SendMouse MouseMoveAbsPix); $Win32::GuiTest::debug = 1; # Set to "1" to enable verbose mode my ($hwindDisplay) = FindWindowLike(0, "^Foo", ""); $hwindDisplay or die("Could not open Foo\n"); SetForegroundWindow($hwindDisplay); MouseMoveAbsPix(140, 380); SendMouse ("{LEFTCLICK}");