Cool little program beretboy !
This slightly modified version brings your DOS window back afterwards when running it from the commandline.
I know this code wasn't submitted for peer review but i couldn't resist :)
use Win32::Sound; use Win32::GUI; $MW = new Win32::GUI::Window( -title => 'Ignore-O-matic', -left => 100, -top => 100, -width => 150, -height => 175, -name => 'MainWindow', -visible => 1, ); $because = $MW->AddButton( -text => 'because!', -name => 'because', -left => 25, -top => 25, ); $quiet = $MW->AddButton( -text => 'Be Quiet!', -name => 'quiet', -left => 25, -top => 50, ); $goaway = $MW->AddButton( -text => 'Go AWAY!', -name => 'away', -left => 25, -top => 75, ); $nocare = $MW->AddButton( -text => 'I do not care!', -name => 'nocare', -left => 25, -top => 100, ); $important = $MW->AddButton( -text => 'More important!', -name => 'important', -left => 25, -top => 125, ); my ($DOS) = Win32::GUI::GetPerlWindow(); Win32::GUI::Hide($DOS); Win32::GUI::Dialog(); sub MainWindow_Terminate { $MW->PostQuitMessage(1); Win32::GUI::Show($DOS); } sub quiet_Click { Win32::Sound::Play("bequite.wav"); return 0; } sub because_Click { Win32::Sound::Play("because.wav"); return 0; } sub away_Click { Win32::Sound::Play("goaway.wav"); return 0; } sub nocare_Click { Win32::Sound::Play("nocare.wav"); return 0; } sub important_Click { Win32::Sound::Play("moreimportant.wav"); return 0; }


Jorg

"Do or do not, there is no try" -- Yoda

In reply to Re: Ignore-O-Matic by jorg
in thread Ignore-O-Matic by beretboy

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.