I was using Win32::GuiTest to automate a process I was doing manually. The script I was writing would open the application, navigate the menus, enter the data, and capture the text for me to get the results. It worked fine.

But then I needed to add a Tk interface to make it a little easier and user friendly for other people to use. For some reason, though, when I moved my program into a sub, that I had assigned as a command on a Tk Button, when it used the system("start foo.exe", foo.exe would freeze on it's start-up splash screen until the entire keypress routine was finished. As soon as the routine finished, boom, it would load up.

Without Tk, the program worked fine. It would call the program, the program would start, and it would press the right buttons. But when I bound it all inside Tk, suddenly the program decided it didn't really want to start until the routine was completely done it's Keypress routine.

Any ideas why this is happening, and how to get around it?

In reply to Tk Stopped a working program by bblustein

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.