Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2011
    Posts
    31
    Thanks
    25
    Thanked 0 Times in 0 Posts

    Calling batch files from dialog box

    Hi, I’d like to make a script were a dialog box will have three radio buttons, something like:
    Button 1---Calls TDS.bat
    Button2---Calls RCG.bat
    Button3---Calls PPS.bat
    Each button will call specific batch file. I need to install and use the TK module to make a DB (should not be that hard) but I still cannot find how to link my buttons to the batch files.
    Could you give me an idea how to do that?
    Thanks, vl123456

  • #2
    New Coder
    Join Date
    Mar 2011
    Posts
    31
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Nobody knows the answer?

  • #3
    New Coder
    Join Date
    Mar 2011
    Posts
    31
    Thanks
    25
    Thanked 0 Times in 0 Posts
    I found . Thanks vl123456

    #!/usr/local/bin/perl
    use Tk;
    use strict;
    use warnings;
    use diagnostics;


    my $mw = new MainWindow;
    my $but = $mw -> Button(-text => "Batch1",
    -command =>\&push_button);
    $but -> pack();
    MainLoop;

    sub push_button

    {
    system "start C:\\PERL_TEST\\TK\\batch.bat"
    }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •