Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

basic program

Options
  • 01-08-2005 11:40pm
    #1
    Registered Users Posts: 1,985 ✭✭✭


    how do i make a program that when i click on a certain icon, two "proper" programs open??


    cheers
    moe


Comments

  • Registered Users Posts: 31 angry


    Any particular language?


  • Registered Users Posts: 1,606 ✭✭✭djmarkus


    a dos batch file would be ok for what i can read from the situation


  • Registered Users Posts: 1,985 ✭✭✭big_moe


    i have done as few searches and i know that i need the code

    CALL "C:\...."

    to call up the program but when i save that file it wont work... do i need any other lines of code for the batch file to work??

    cheers
    moe


  • Registered Users Posts: 1,606 ✭✭✭djmarkus


    You dont need call, all you need is the path and name of the executable, i.e., if you wanted to open notepad and calculator your batch file would just be:
    C:\WINDOWS\system32\calc.exe
    C:\WINDOWS\system32\notepad.exe

    BUT notepad.exe wont be opened until calculator is closed!


  • Closed Accounts Posts: 8 philh1


    Presumably, big_moe, you don't want your programs to start one after the other, but both at the same time.

    The command 'start' (not 'call') invokes a program in a separate process - what this means for you is that the the 'start' command returns before the program finishes. So you can put two lines in a batch file...
    start C:\WINDOWS\system32\calc.exe
    start C:\WINDOWS\system32\notepad.exe
    

    The batch file will start calculator and then start notepad right away, without waiting for you to shut down calculator.

    So you should have a little batch file which you can run from the command line (or double-click as an icon) which pops both programs up at the same time.


  • Advertisement
  • Registered Users Posts: 1,985 ✭✭✭big_moe


    thanks people, got it working


    moe


Advertisement