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

Author Topic: Batch Programs Thread.  (Read 721380 times)

0 Members and 1 Guest are viewing this topic.

macdad-

    Topic Starter


    Expert

    Thanked: 40
    Re: Batch Programs Thread.
    « Reply #90 on: August 31, 2008, 09:49:54 AM »
    ok now it works.
    If you dont know DOS, you dont know Windows...

    Thats why Bill Gates created the Windows NT Family.

    devcom



      Apprentice

      Thanked: 37
      Re: Batch Programs Thread.
      « Reply #91 on: September 07, 2008, 10:28:55 AM »
      here is my game tru FTP for 2 players. it's not done yet becouse i have no idea what would be good here, anyway first you must start CONFIG_CONNCECTION.bat in TOOLS folder on booth computers to configure connection ;) move is WASD

      any comments would be good ;)



      [recovering disk space -- attachment deleted by admin]
      Download: Choice.exe

      macdad-

        Topic Starter


        Expert

        Thanked: 40
        Re: Batch Programs Thread.
        « Reply #92 on: September 08, 2008, 02:54:47 PM »
        HOLY CRAP!

        Multiplayer game through FTP! Devcom 10/10! A++ it all works execept a. i wish i had another computer to play against. but o well! Execellent Work Dev!
        If you dont know DOS, you dont know Windows...

        Thats why Bill Gates created the Windows NT Family.

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: Batch Programs Thread.
        « Reply #93 on: September 08, 2008, 07:27:38 PM »
        HOLY CRAP!

        Multiplayer game through FTP! Devcom 10/10! A++ it all works execept a. i wish i had another computer to play against. but o well! Execellent Work Dev!

        are we still talking about batch? I mostly use it for file management tasks, and even then I can barely be bothered to actually make a batch file (mostly using for and such on the command line.). I'm surprised it can even be used for games, since games are in general interactive and don't execute their commands in a batch.


        Now it just needs to be updated to use TCP/IP!
        I was trying to dereference Null Pointers before it was cool.

        devcom



          Apprentice

          Thanked: 37
          Re: Batch Programs Thread.
          « Reply #94 on: September 09, 2008, 06:56:25 AM »
          yeah thanks   ;D

          Quote
          Now it just needs to be updated to use TCP/IP!

          i thing without another program created in c++ or sth its imposible ;)
          Download: Choice.exe

          fireballs



            Apprentice

          • Code:Terminal
          • Thanked: 3
            Re: Batch Programs Thread.
            « Reply #95 on: September 09, 2008, 08:58:46 AM »
            are we still talking about batch?

            This is the batch programs thread!

            I'm surprised it can even be used for games, since games are in general interactive and don't execute their commands in a batch.

            I don't suppose you remember the 1980-90's when almost all games were made for dos?

            FB
            Next time google it.

            BC_Programmer


              Mastermind
            • Typing is no substitute for thinking.
            • Thanked: 1140
              • Yes
              • Yes
              • BC-Programming.com
            • Certifications: List
            • Computer: Specs
            • Experience: Beginner
            • OS: Windows 11
            Re: Batch Programs Thread.
            « Reply #96 on: September 09, 2008, 02:10:32 PM »
            This is the batch programs thread!
            u got me. I concede.
            I don't suppose you remember the 1980-90's when almost all games were made for dos?
            If I recall correctly, those programs were written in "real" programming languages(usually a mix of ASM and C). Batch programs at that point in time where just that- they didn't have a lot of the constructs and such they have now (except of course for the for command, which has been expanded quite a lot since). Warranted, games could be constructed with batch, but even a simple guessing game required kludges- and since you couldn't perform numeric comparisons it became a bit difficult to add hints like "higher" and "lower" if desired.
            I was trying to dereference Null Pointers before it was cool.

            macdad-

              Topic Starter


              Expert

              Thanked: 40
              Re: Batch Programs Thread.
              « Reply #97 on: September 09, 2008, 03:04:53 PM »
              thats true but im just amazed about dev's program because it was written in batch. and good idea of breaking the components of the program down into modules(it makes debugging much easier  ;) )
              If you dont know DOS, you dont know Windows...

              Thats why Bill Gates created the Windows NT Family.

              Jacob



                Hopeful

                Thanked: 1
                • Experience: Expert
                • OS: Windows XP
                Re: Batch Programs Thread.
                « Reply #98 on: September 11, 2008, 12:13:47 PM »

                devcom



                  Apprentice

                  Thanked: 37
                  Re: Batch Programs Thread.
                  « Reply #99 on: September 22, 2008, 12:32:32 PM »
                  my web searcher  ;D

                  you can add your sites if u want and add it to autostart for faster searching at startup ;)
                  must have choice !

                  Code: [Select]
                  @echo off

                  setlocal enableextensions
                  setlocal enabledelayedexpansion

                  set Sch_choice=,Google,Youtube,Yahoo,
                  set Sch=Google

                  :LOOP
                  echo.
                  echo.= Menu =================================================
                  echo.
                  for /f "tokens=1,2,* delims=_ " %%A in ('"findstr /b /c:":menu_" "%~f0""') do echo.  %%B  %%C
                  echo.
                  echo.========================================================
                  choice /C:12 >nul
                  set choice=%errorlevel%
                  call :menu_%choice%
                  GOTO LOOP

                  :menu_1   Search Type: '!Sch!' [!Sch_choice:~1,-1!]
                  call :NIL Sch "!Sch_choice!"
                  cls
                  GOTO :EOF

                  :menu_2   Search
                  call :Search "!Sch!"
                  cls
                  GOTO :EOF

                  :NIL
                  SETLOCAL
                  set lst=%~2
                  set dlm=%lst:~-1%
                  set old=!%~1!
                  set fst=
                  for /f "delims=%dlm%" %%a in ("%lst%") do set fst=%%a
                  set lll=!lst:%dlm%%old%%dlm%=%dlm%@%dlm%!%fst%%dlm%
                  for /f "tokens=2 delims=@" %%a in ("%lll%") do set lll=%%a

                  for /f "delims=%dlm%" %%a in ("%lll%") do set new=%%a
                  ( ENDLOCAL
                  SET %~1=%new%
                  )
                  GOTO :EOF


                  REM --------------------------------------------------------------

                  :Search
                  echo.
                  echo.
                  set type=%~1
                  if '%type%' equ '' EXIT /b
                  choice /C:YN /M "Search %type% ??"
                  echo.
                  if not %errorlevel% equ 1 EXIT /b
                  set /p Schtxt=Search:
                  call :Config
                  call start %%%type%%%
                  EXIT /b

                  :Config
                  set Google=http://www.google.com/search?q=%Schtxt%
                  set Youtube=http://www.youtube.com/results?search_query=%Schtxt%
                  set Yahoo=http://search.yahoo.com/search?p=%Schtxt%
                  EXIT /b
                  Download: Choice.exe

                  cpsiemens



                    Newbie

                    Re: Batch Programs Thread.
                    « Reply #100 on: September 30, 2008, 12:05:15 PM »
                    Thanks for the tip...

                    Would you know which thread i should post on to get some help?

                    Thanks again...

                    Chris

                    macdad-

                      Topic Starter


                      Expert

                      Thanked: 40
                      Re: Batch Programs Thread.
                      « Reply #101 on: September 30, 2008, 12:41:21 PM »
                      just make a new topic in the Microsoft DOS board.
                      If you dont know DOS, you dont know Windows...

                      Thats why Bill Gates created the Windows NT Family.

                      Gforce



                        Greenhorn

                        Re: Batch Programs Thread.
                        « Reply #102 on: October 08, 2008, 10:43:52 PM »
                        Hey, I have a simple batch file I'm working on right now- basically it's "multiplayer notepad", or a simple way of instant-messaging across a file server. It's set up so that the text refreshes whenever you type a message or type "refresh", but I want it to refresh in 1- or 2-second intervals. How would I do this without causing it to disrupt the user input?
                        Code: [Select]
                        @echo off
                        set chatname=%COMPUTERNAME%
                        echo %chatname% has joined.>>chat.txt
                        :text
                        cls
                        echo Enter a message: Type something that isn't
                        echo   a command listed below, then press Enter.
                        echo Refresh: "refresh"
                        echo Change your username: "username"
                        echo Exit the program: "exit" or "end" or "quit"
                        echo ---
                        type chat.txt
                        echo ---
                        set /p msg=%chatname%:
                        if %msg%==refresh goto :text
                        if %msg%==username goto :username
                        if %msg%==exit goto :end
                        if %msg%==end goto :end
                        if %msg%==quit goto :end
                        echo %chatname%: %msg%>>chat.txt
                        goto :text
                        :username
                        set /p chatname=Set new username:
                        goto :text
                        :end
                        echo %chatname% has exited.>>chat.txt

                        Also, if it's at all possible, how can I stop the program from crashing whenever certain symbols (including <>'"\) are inputted?

                        devcom



                          Apprentice

                          Thanked: 37
                          Re: Batch Programs Thread.
                          « Reply #103 on: October 09, 2008, 06:54:58 AM »
                          its hard to make a chat program becouse on each computer you must have one prog to read what sombody wrote and other to read and send your text, it works like e-mail.
                          or other way is if you send massage to wait until he receive it and send etc. (ofc im talking about FTP)

                          Code: [Select]
                          Also, if it's at all possible, how can I stop the program from crashing whenever certain symbols (including <>'"\) are
                          simpliest is to not write them ;) but this is sample:

                          Code: [Select]
                          set a=abc
                          set a=%a:b=x%

                          so output a will looke like axc, but this is topic for another thread ;)
                          Download: Choice.exe

                          macdad-

                            Topic Starter


                            Expert

                            Thanked: 40
                            Re: Batch Programs Thread.
                            « Reply #104 on: October 09, 2008, 11:29:43 AM »
                            it would probably be easier if you used a 3rd-party software to do the sending and recieving through the network.
                            If you dont know DOS, you dont know Windows...

                            Thats why Bill Gates created the Windows NT Family.