Anybody have any experience trying to use Perl as a kind of "scripting engine overlay", that could be used to send and receive text into say a 3D online video game?

I'm not too ashamed to admit that I sometimes use Windows and I found a fun 3D MMORPG recently that allows you to send keystrokes to the application that make your avatar "emote" different moves. For instance, to make your avatar smile, you just preface the command "smile" with a single quote.

I'd basically like to see if I can run Perl as a daemon on Windows and have it wait for certain function keys, and perhaps make some more complex loops so I could, for instance, type another character's name into the command, and it would incorporate that into a little song + dance routine. (Maybe find an automatic rhyme generator? heh.)

If I can get this to work, it'd open up a whole new realm of possibilities for my character - some people have suggested I use commercial macros packages instead, but I think this way would be far more rewarding (and hopefully I'd learn enough about Win32 Perl that I could use the knowledge in the future to automate my other apps.)

I've seen a few other avatars using the macros apps and they're frankly kind of limited in what they can accomplish.

I know I'll have to work with the Win32::OLE automation stuff probably, I was just hoping perhaps some of you would have had experience with this and could give me a jump start.

I have worked with Expect a while back to script a few routines for a MUD, but this is a totally different ball o' wax I think.

Thanks!

- Mark Beihoffer, Network Architect (and video gamer evidently.)


In reply to Scripting for Video Games by Dragonfly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.