#!/usr/bin/perl use strict; use warnings; use Win32::GuiTest qw(FindWindowLike GetWindowRect MouseMoveAbsPix SendMouse SendKeys SetForegroundWindow PushButton); system "control mmsys.cpl"; sleep 1; my @sound = FindWindowLike(undef, "Sound"); my @list = FindWindowLike($sound[0], "", "SysListView32"); my ($left, $top, $right, $bottom) = GetWindowRect($list[0]); MouseMoveAbsPix($right - 7, $top + 57); SendMouse("{RightClick}"); SendKeys("{E}"); MouseMoveAbsPix($right - 7, $top + 112); SendMouse("{RightClick}"); SendKeys("{D}"); SetForegroundWindow($sound[0]); PushButton("OK");