Maybe this will get you started. Save it as 700695.pl and run it from the directory where you saved it:

#! perl -slw use strict; use Win32::GuiTest qw[SendKeys FindWindowLike SetForegroundWindow]; ## Start asynchronously system 1, 'notepad'; sleep 1; ## Give it chance to start ## Find it's window id ## Assumes only one copy with 'Untitled' is running. ## It two copies are, it doesn't matter which to use anyway my $wid = ( FindWindowLike 0, "Untitled - Notepad", 0, 0 )[0]; ## Ensure it's on top SetForegroundWindow( $wid ); sleep 1; ## Give it chance to respond ## Send the commands needed. ## If the processing is slow it may be better to break them into chaun +ks ## and intersperse with sleeps SendKeys ## Open the file menu, then the open dialog, ## enter the name of the file, and hit alt-O "%FO 700695.pl %O" ## Move to the end, add a DATA section and some text . "^{END}__DATA__~This was added automatically using Win32::GuiTes +t~" ## Open the file menu and save. OPen the file menu and exit. ## Say Yes to quiting . "%fs %fx Y" ## A short delay between keystrokes can help with slow dialogs. , 50;

When you run it, it should get the following appended to it:

__DATA__ This was added automatically using Win32::GuiTest

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re: Automating QuickTime Movies To Streaming by BrowserUk
in thread Automating QuickTime Movies To Streaming by Limbic~Region

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.