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 11213 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.

            computeruler



              Egghead

              Thanked: 63
              • Yes
              • Yes
            • Experience: Experienced
            • OS: Mac OS
            Re: Batch Program Tip
            « Reply #15 on: August 10, 2008, 09:55:11 PM »
            i made my dad mad because i went into cmd and kept pressing ctrl g lol but how would i add this to a batch file? i press ctrl g in the notepad that doesnt do anything i try typing ^g that doesnt do anything  ??? ??? ???

            Carbon Dudeoxide

            • Global Moderator

            • Mastermind
            • Thanked: 169
              • Yes
              • Yes
              • Yes
            • Certifications: List
            • Experience: Guru
            • OS: Mac OS
            Re: Batch Program Tip
            « Reply #16 on: August 10, 2008, 10:01:06 PM »
            i made my dad mad because i went into cmd and kept pressing ctrl g lol but how would i add this to a batch file? i press ctrl g in the notepad that doesnt do anything i try typing ^g that doesnt do anything  ??? ??? ???
            Same with me.

            Dias de verano

            • Guest
            Re: Batch Program Tip
            « Reply #17 on: August 11, 2008, 12:09:35 AM »
            I know CTRL-G is supposed to make a beep, it has made one on every computer I have owned since 1988, except this one.

            « Last Edit: August 11, 2008, 01:59:04 PM by Dias de verano »

            macdad-

              Topic Starter


              Expert

              Thanked: 40
              Re: Batch Program Tip
              « Reply #18 on: August 11, 2008, 01:47:58 PM »
              i made my dad mad because i went into cmd and kept pressing ctrl g lol but how would i add this to a batch file? i press ctrl g in the notepad that doesnt do anything i try typing ^g that doesnt do anything  ??? ??? ???

              huh. thats weird. i promise you that i tested CTRL + G in CMD.EXE and Command.COM and it work on both. but i wonder if Windows version has something to do with this? Mine is Window 2000 but wat is yours computeruler and Carbon?
              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 #19 on: August 11, 2008, 01:59:56 PM »
              we understand about pressing ctrl + G in a cmd or command window, but how do you get it into a batch file?

              macdad-

                Topic Starter


                Expert

                Thanked: 40
                Re: Batch Program Tip
                « Reply #20 on: August 11, 2008, 03:54:54 PM »
                sorry you guys. :-\ i found that you can only make a batch file beep if you write the batch file in edlin. Notepad and Edit, dont work. but Edlin will put the beep in the batch program.
                If you dont know DOS, you dont know Windows...

                Thats why Bill Gates created the Windows NT Family.

                computeruler



                  Egghead

                  Thanked: 63
                  • Yes
                  • Yes
                • Experience: Experienced
                • OS: Mac OS
                Re: Batch Program Tip
                « Reply #21 on: August 11, 2008, 05:28:50 PM »
                awww i need to download a program just to make an infenet beeping to annoy poeple LOL
                EDIT wait i cant download it can i

                macdad-

                  Topic Starter


                  Expert

                  Thanked: 40
                  Re: Batch Program Tip
                  « Reply #22 on: August 11, 2008, 06:02:58 PM »
                  computeruler heres edlin. 8) you just need to unzip it.

                  [recovering disk space -- attachment deleted by admin]
                  If you dont know DOS, you dont know Windows...

                  Thats why Bill Gates created the Windows NT Family.

                  computeruler



                    Egghead

                    Thanked: 63
                    • Yes
                    • Yes
                  • Experience: Experienced
                  • OS: Mac OS
                  Re: Batch Program Tip
                  « Reply #23 on: August 11, 2008, 06:06:08 PM »
                  when i opened it it closed

                  diablo416



                    Hopeful
                    • Experience: Beginner
                    • OS: Unknown
                    Re: Batch Program Tip
                    « Reply #24 on: August 11, 2008, 10:40:31 PM »
                    echo ^G into a file, open the file with notepad and you are left with this charachter that makes the beep 

                    macdad-

                      Topic Starter


                      Expert

                      Thanked: 40
                      Re: Batch Program Tip
                      « Reply #25 on: August 12, 2008, 04:38:13 PM »
                      computeruler you have to open command prompt, and goto were you put edlin. then type edlin <name of file>.<extension> to run edlin.

                      and Diablo. the  means an unknown symbol. if you try to copy and paste that into another batch program to make it beep, it'll just skip that.
                      If you dont know DOS, you dont know Windows...

                      Thats why Bill Gates created the Windows NT Family.

                      computeruler



                        Egghead

                        Thanked: 63
                        • Yes
                        • Yes
                      • Experience: Experienced
                      • OS: Mac OS
                      Re: Batch Program Tip
                      « Reply #26 on: August 12, 2008, 05:45:12 PM »
                      so what exactly do i type? the folder is on my desktop called edlin and the edlin.exe is in the folder called edlin.exe

                      diablo416



                        Hopeful
                        • Experience: Beginner
                        • OS: Unknown
                        Re: Batch Program Tip
                        « Reply #27 on: August 12, 2008, 05:54:47 PM »
                        when i copy and paste the symbol from the post its displayed as ^G when i paste it into the cmd.exe window,and it makes the beep.. so i dont know what you are talking about

                        computeruler



                          Egghead

                          Thanked: 63
                          • Yes
                          • Yes
                        • Experience: Experienced
                        • OS: Mac OS
                        Re: Batch Program Tip
                        « Reply #28 on: August 12, 2008, 06:01:52 PM »
                        when i paste things into the cmd it just does this ^V

                        diablo416



                          Hopeful
                          • Experience: Beginner
                          • OS: Unknown
                          Re: Batch Program Tip
                          « Reply #29 on: August 12, 2008, 06:07:50 PM »
                          in cmd.exe type echo then type CTRL+G so it looks like this echo ^G then append it to a file, echo ^G>>file.txt & notepad file.txt and get the symbol that way..

                          diablo416



                            Hopeful
                            • Experience: Beginner
                            • OS: Unknown
                            Re: Batch Program Tip
                            « Reply #30 on: August 12, 2008, 06:08:55 PM »
                            Nevermind, dont use CTRL+V to paste it in.. make sure quickedit mode is on and then paste it in using the right mouse button