Mac-KeyboardMaestro

 view release on metacpan or  search on metacpan

t/03macro.t  view on Meta::CPAN

	}
	plan( tests => 1 );
};

use Mac::KeyboardMaestro qw(km_set km_get km_delete km_macro);

my $varname = "mackeyboardmaestrotestsuite";
km_set $varname => "6*7";

# this triggers a macro on my system that
#  1) takes the mackeyboardmaestrotestsuite var and puts it in the clipboard
#  2) filters the clipboard with the "Calculate" filter
#  3) puts the clipboard back in the mackeyboardmaestrotestsuite var
km_macro "Mac::KeyboardMaestro test";

# the var should now be 42!
is km_get $varname, 42, "The answer to life the universe and everything!";

# and clean up after ourselves
km_delete $varname;



( run in 3.024 seconds using v1.01-cache-2.11-cpan-84e82930d8c )