[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Controlling KeyQuencer from MacPerl



At 15.02 -0400 1999.05.25, Darryl Tang wrote:
>Hi all,
>
>I received some e-mails expressing interest on how to control KeyQuencer
>from MacPerl.  If you are interested in this subject, download the stuffit
>file from my website at:
>
>http://www.yoshisonline.com/temp/KeyQuencerLink.sit
>
>I tested out the above link by using IE4.5 to go there and it automatically
>downloaded the file to my hard disk.  The ReadMe file contains details on
>how it all works.  In short, you can control almost anything on your Mac by
>combining MacPerl with KeyQuencer.
>

Looks really promising.  A couple of notes:

  * You don't need to use "package Dartmouth".  Dartmouth was used in other
examples because the XCMDs used were from Dartmouth.  "KQ" or "KeyQuencer"
might be a more logical name.

  * The apostrophe ' as a package delimiter is deprecated.  The double
colon :: syntax is preferred now:

  &KQ::KQSetVariable("passedString", $searchstring);

  * I assume KeyQuencer itself is scriptable ... if so, Mac::Glue and other
AppleScript / Apple event options for MacPerl could be used as an
alternative to this.  I am not advocating using them as alternatives, just
mentioning them.  I made a glue for PreFab Player, for instance, that works
well:


  #!perl -wl
  use Mac::Glue;
  use Mac::Apps::Launch;
  LaunchApps(['ttxt'], 1) or die $^E;  # launch SimpleText

  $p = new Mac::Glue 'PreFab Player';
  $p->do_menu_menu_item('New',        { of_menu => 'File' });
  $p->type('This land is your land, this land is my land.');
  $p->do_menu_menu_item('Select All', { of_menu => 'Edit' });
  $p->do_menu_menu_item('Replace',    { of_menu => 'Edit' });
  $p->type("your\tmy");
  $p->type('L');  # enter

But if you want to use KeyQuencer, your option is probably faster and
(right now, at least, given that Mac::Glue is in beta!) more stable.  Yours
might be easier to use, too.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org