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

Author Topic: Can i Create a MessageBox with batch command??  (Read 116748 times)

0 Members and 1 Guest are viewing this topic.

linuxyf

    Topic Starter


    Rookie

    Can i Create a MessageBox with batch command??
    « on: July 02, 2008, 02:23:13 AM »
    Can i Create a MessageBox with appointed caption and displaying message using batch command??

    gpl



      Apprentice
    • Thanked: 27
      Re: Can i Create a MessageBox with batch command??
      « Reply #1 on: July 02, 2008, 03:02:26 AM »
      Yes, sort of
      You can create a short vbscript file with the messagebox in it, you could write the response from the messagebox to a file and read that in your bat

      Graham

      linuxyf

        Topic Starter


        Rookie

        Re: Can i Create a MessageBox with batch command??
        « Reply #2 on: July 02, 2008, 03:31:05 AM »
        i know i can start a exe file displaying a messagebox implemented by c or c++.

        but i want to know whether i can start a messagebox directly with batch command or not.

        Sidewinder



          Guru

          Thanked: 139
        • Experience: Familiar
        • OS: Windows 10
        Re: Can i Create a MessageBox with batch command??
        « Reply #3 on: July 02, 2008, 05:28:48 AM »
        Quote
        but i want to know whether i can start a messagebox directly with batch command or not

        Batch code does not support messageboxes, popups, or windows. However this little novelty script maybe helpful:

        Code: [Select]
        @echo off
        start %comspec% /c "mode 40,10&title My Popup&color 1e&echo.&echo. Today is %date%&echo.&echo. Press a key!&pause>NUL"

        This is one of those scripts where you keep asking "What was I thinking"

         8)
        The true sign of intelligence is not knowledge but imagination.

        -- Albert Einstein

        Carbon Dudeoxide

        • Global Moderator

        • Mastermind
        • Thanked: 169
          • Yes
          • Yes
          • Yes
        • Certifications: List
        • Experience: Guru
        • OS: Mac OS
        Re: Can i Create a MessageBox with batch command??
        « Reply #4 on: July 02, 2008, 05:58:25 AM »
        What about:

        msg * Hello!!!!!!!!!!

        That works in Command Prompt and in a batch file.

        diablo416



          Hopeful
          Re: Can i Create a MessageBox with batch command??
          « Reply #5 on: July 05, 2008, 06:38:57 PM »
          echo msgbox"yourmesagehere">a.vbs,&;a.vbs  <<to display once
          echo for i = 1 to 10>a.vbs &;echo msgbox"yourmessagehere">>a.vbs &;echo next>>a.vbs  << to display 10 times

          Dias de verano

          • Guest
          Re: Can i Create a MessageBox with batch command??
          « Reply #6 on: July 06, 2008, 04:45:15 AM »
          echo msgbox"yourmesagehere">a.vbs,&;a.vbs  <<to display once

          That doesn't work, gives a VBS compilation error.

          This does

          Code: [Select]
          echo msgbox"your message here">a.vbs&a.vbs
          (The semicolon and comma were causing the error)


          diablo416



            Hopeful
            Re: Can i Create a MessageBox with batch command??
            « Reply #7 on: July 07, 2008, 10:24:04 AM »
            that was a typo sorry,

            echo msgbox"yourmesagehere">a.vbs &;a.vbs   is what i ment instead.

            Dias de verano

            • Guest
            Re: Can i Create a MessageBox with batch command??
            « Reply #8 on: July 07, 2008, 10:41:30 AM »
            that was a typo sorry,

            echo msgbox"yourmesagehere">a.vbs &;a.vbs   is what i ment instead.

            You don't need the semicolon (';')

            This is tidier because it deletes the vbs afterwards

            Code: [Select]
            echo msgbox"your message here">a.vbs&a.vbs&del a.vbs