Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch Program Tip  (Read 11192 times)

0 Members and 1 Guest are viewing this topic.

macdad-

    Topic Starter


    Expert

    Thanked: 40
    Batch Program Tip
    « on: August 08, 2008, 07:52:53 AM »
    if you want to add sound to you batch file such as when your displaying an important message, you can use CTRL+G to tell the computer to beep so you can get the user's attention
    example:

    Code: [Select]
    echo This is an important message^G
    the ^G is CTRL+G. just press this key combination were you want it and it will beep on the line you put it on.

    Hope this tip comes in handy.
    If you dont know DOS, you dont know Windows...

    Thats why Bill Gates created the Windows NT Family.

    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: Batch Program Tip
    « Reply #1 on: August 08, 2008, 07:56:42 AM »
    How do you put it in a batch file? As far as I'm aware of, it can only be done if you input it in the Command Line.

    Dias de verano

    • Guest
    Re: Batch Program Tip
    « Reply #2 on: August 08, 2008, 08:35:15 AM »
    Yes, how do you get it in the line?

    And what do you do if your PC doesn't have a speaker? Mine doesn't.


    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: Batch Program Tip
    « Reply #3 on: August 08, 2008, 08:36:26 AM »
    And what do you do if your PC doesn't have a speaker? Mine doesn't.

    On two of our family computers, the sound plays through the motherboard speakers.
    On my laptop, it uses the speakers.

    Dias de verano

    • Guest
    Re: Batch Program Tip
    « Reply #4 on: August 08, 2008, 08:42:48 AM »
    And what do you do if your PC doesn't have a speaker? Mine doesn't.

    On two of our family computers, the sound plays through the motherboard speakers.
    On my laptop, it uses the speakers.

    That's what I meant. I have a little Shuttle and it does not have a motherboard speaker, so the CTRL-G beep is impossible to use. It doesn't come out of the external speakers either. I'd have to play a WAV.


    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: Batch Program Tip
    « Reply #5 on: August 08, 2008, 09:06:12 AM »
    Strange? What about looking at volume control?


    Dias de verano

    • Guest
    Re: Batch Program Tip
    « Reply #6 on: August 08, 2008, 09:32:56 AM »
    It never has done in all the 3 years I have owned the Shuttle. I don't have "PC Beep" on my volume control, I have "PC Speaker", even though there isn't one on the motherboard. It is set at max. My PC has never beeped, ever.

    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: Batch Program Tip
    « Reply #7 on: August 08, 2008, 09:34:29 AM »
    Interesting......anyways, let's wait for Macdad to answer our question.  :)

    macdad-

      Topic Starter


      Expert

      Thanked: 40
      Re: Batch Program Tip
      « Reply #8 on: August 09, 2008, 01:10:32 PM »
      ok to enter CTRL+G into the batch program just type out a command like so
      Code: [Select]
      echo This is an important messagethen right after you type that, just do the key combination CTRL + G (the + sign is not included)

      then you should get this after you do that key combination
      Code: [Select]
      echo This is an important message^G
      thats how you put it in a batch program, so far i know for sure that CTRL + G works with the echo command, but all that CTRL + G does is tell DOS to beep once it gets to the line that has ^G.

      so look at this

      line 1:pause
      line 2:echo This works^G
      line 3:pause

      DOS know to only beep when it gets to line 2 because ^G is on line 2. and yes DOS beeps through the Motherboard Speaker if you dont have external speakers or your speakers are turned off.

      does that help?

      If you dont know DOS, you dont know Windows...

      Thats why Bill Gates created the Windows NT Family.

      Dias de verano

      • Guest
      Re: Batch Program Tip
      « Reply #9 on: August 09, 2008, 01:20:02 PM »
      Well, I don't have a motherboard speaker, my external speakers are turned on, and I heard nothing.

      and XP command prompt is not DOS.

      macdad-

        Topic Starter


        Expert

        Thanked: 40
        Re: Batch Program Tip
        « Reply #10 on: August 09, 2008, 01:25:21 PM »
        Quote
        and XP command prompt is not DOS.
        ok but you know wat i mean

        and are your speakers plugged in? did you do the key combination CTRL + G, instead of just typing ^G?
        If you dont know DOS, you dont know Windows...

        Thats why Bill Gates created the Windows NT Family.

        Dias de verano

        • Guest
        Re: Batch Program Tip
        « Reply #11 on: August 09, 2008, 01:37:11 PM »
        yes, and yes

        macdad-

          Topic Starter


          Expert

          Thanked: 40
          Re: Batch Program Tip
          « Reply #12 on: August 09, 2008, 05:53:12 PM »
          thats weird. Does your speakers work when you try to play other sounds?
          If you dont know DOS, you dont know Windows...

          Thats why Bill Gates created the Windows NT Family.

          Dias de verano

          • Guest
          Re: Batch Program Tip
          « Reply #13 on: August 10, 2008, 12:51:30 AM »
          I can hear wavs, mp3s, sound tracks of movies etc.

          macdad-

            Topic Starter


            Expert

            Thanked: 40
            Re: Batch Program Tip
            « Reply #14 on: August 10, 2008, 07:06:14 PM »
            huh. that just leaves me scratching my head. But i promise you Dias that CTRL + G does make a beep. it says here http://www.microsoft.com/technet/archive/msdos/suppdisk.mspx?mfr=true

            Scroll down to "Inserting control characters" is were it says that.
            If you dont know DOS, you dont know Windows...

            Thats why Bill Gates created the Windows NT Family.