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 653765 times)

0 Members and 1 Guest are viewing this topic.

millergram



    Rookie

    • Experience: Beginner
    • OS: Windows Vista
    Re: Batch Programs Thread.
    « Reply #555 on: July 04, 2012, 09:46:02 PM »
    Heres a batch to monitor programs/processes using the tasklist

    Code: [Select]
    @echo off
    title Wow Moniter v2
    :restart
    cls
    set y=0
    for /f "tokens=1" %%a in ('tasklist') do if "%%a"=="(Prosses Name)" goto next
    for /f "tokens=1" %%b in ('tasklist') do if "%%b"=="(This Line Not Needed Was Part of orginal File)" taskkill /f /im %%b
    if "%y%"=="0" start "" "(link to proccess or program)"
    Echo.Waiting For Launcher.exe
    timeout /nobreak /t 10
    goto restart
    :next
    set y=1
    goto restart

    cutedevilz



      Greenhorn

      • Experience: Beginner
      • OS: Unknown
      Re: Batch Programs Thread.
      « Reply #556 on: July 29, 2012, 03:09:42 AM »
      i try the code in the first page and that's very cool nice :D


      Helpmeh



        Guru

      • Roar.
      • Thanked: 123
        • Yes
        • Yes
      • Computer: Specs
      • Experience: Familiar
      • OS: Windows 8
      Re: Batch Programs Thread.
      « Reply #557 on: October 11, 2012, 10:48:07 PM »
      Made a little maze solver. It uses trial-and-error to slowly make its way through each maze. It's pretty neat to watch it make it's first steps through the maze, but after watching it go through a couple different mazes (3 included), I could predict what path it would follow very quickly, as it prioritizes (in this order) down, right, left, up.

      http://www.filedropper.com/maze_1

      It's pretty neat, I have to say. Not as amazing as some other stuff I've done in the past, but a good 2-hour project.
      Where's MagicSpeed?
      Quote from: 'matt'
      He's playing a game called IRL. Great graphics, *censored* gameplay.

      millergram



        Rookie

        • Experience: Beginner
        • OS: Windows Vista
        Re: Batch Programs Thread.
        « Reply #558 on: October 16, 2012, 12:42:25 PM »
        Yet another RPS!
        Code: [Select]
        @echo off
        Title RPS by millergram
        color 02
        :title
        set Com=0
        set Hum=0
        set R=1
        set P=2
        set S=3
        set C=0
        set H=0
        set /p UserName=Type Name Here:
        :main
        cls
        echo.1=rock 2=paper 3=Siccors
        echo.Computer's Score=%Com%
        echo.%UserName%'s Score=%Hum%
        set /p Input=RPS?:
        if /I "%Input%"=="1" goto rock
        if /I "%Input%"=="2" goto paper
        if /I "%Input%"=="3" goto sicc
        if /I "%Input%"=="%Input%" goto main
        goto main
        :rock
        set H=1
        set /a C=(%random% %%2)+1
        if %C% equ 1 goto RT
        if %C% equ 2 goto RL
        if %C% equ 3 goto RW
        :RT
        cls
        echo.%UserName% chose Rock Computer chose Rock too!
        echo.Its a tie!
        Echo.Press A Key...
        Pause>nul
        goto main
        :RL
        cls
        set /a Com=%Com%+1
        echo.%UserName% chose Rock Computer Chose Paper!
        echo.You Loose!
        Echo.Press A Key...
        Pause>nul
        goto main
        :RW
        cls
        set /a Hum=%Hum%+1
        echo.%UserName% chose Rock Computer Chose Siccors!
        echo.you win!
        Echo.Press A Key...
        Pause>nul
        goto main
        :paper
        set H=2
        set /a C=(%random% %%2)+1
        if %C% equ 2 goto PT
        if %C% equ 3 goto PL
        if %C% equ 1 goto PW
        :PT
        cls
        echo.%UserName% chose Paper Computer chose Paper too!
        echo.Its a tie!
        Echo.Press A Key...
        Pause>nul
        goto main
        :PL
        cls
        set /a Com=%Com%+1
        echo.%UserName% chose Paper Computer Chose Siccors!
        echo.You Loose!
        Echo.Press A Key...
        Pause>nul
        goto main
        :PW
        cls
        set /a Hum=%Hum%+1
        echo.%UserName% chose Paper Computer Chose Rock!
        echo.you win!
        Echo.Press A Key...
        Pause>nul
        goto main
        :sicc
        set H=3
        set /a C=(%random% %%2)+1
        if %C% equ 3 goto ST
        if %C% equ 1 goto SL
        if %C% equ 2 goto SW
        :ST
        cls
        echo.%UserName% chose Siccors Computer chose Siccors too!
        echo.Its a tie!
        Echo.Press A Key...
        Pause>nul
        goto main
        :SL
        cls
        set /a Com=%Com%+1
        echo.%UserName% chose Siccors Computer Chose Rock!
        echo.You Loose!
        Echo.Press A Key...
        Pause>nul
        goto main
        :SW
        cls
        set /a Hum=%Hum%+1
        echo.%UserName% chose Siccors Computer Chose Paper!
        echo.you win!
        Echo.Press A Key...
        Pause>nul
        goto main

        Helpmeh



          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Batch Programs Thread.
        « Reply #559 on: October 20, 2012, 05:44:48 PM »
        Bruce Sterling says in The Hacker Crackdown, "Hackers  long for recognition  as a praiseworthy cultural archetype...." And this recognition is exactly what I craved when I posted my source. I thought it was a pretty good idea and a pretty cool process, but if my most-respected peers don't seem to care about what I've been up to lately, I don't know what to say.
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        foxidrive



          Specialist
        • Thanked: 268
        • Experience: Experienced
        • OS: Windows 8
        Re: Batch Programs Thread.
        « Reply #560 on: October 21, 2012, 07:51:25 AM »
        Your link is broken.

        FWIW - this is IRL and the gameplay sucks.  People will check stuff out if they are looking for a tool to solve a task, or if they are bored and have time to kill.
        And you gave away the punch line - saying how it solves the maze.

        Maybe you should have posted the batch code instead of a dropbox download??

        Helpmeh



          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Batch Programs Thread.
        « Reply #561 on: October 21, 2012, 03:31:10 PM »
        Your link is broken.

        FWIW - this is IRL and the gameplay sucks.  People will check stuff out if they are looking for a tool to solve a task, or if they are bored and have time to kill.
        And you gave away the punch line - saying how it solves the maze.

        Maybe you should have posted the batch code instead of a dropbox download??

        http://www.filedropper.com/maze

        It's not just the code that is required, it also have files for each individual maze you can use. I've updated it since I originally posted it so that it doesn't refresh the whole screen each time it moves around (improving the speed and visibility).
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        1998golfer



          Greenhorn

          • Yes
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 7
        Re: Batch Programs Thread.
        « Reply #562 on: November 22, 2012, 09:49:40 AM »
        I need some help here...
        I need to make a batch file to track progress, storing ongoing info in a progress.txt file... I need it to be when I make changes it reads data from line1 and add %num% and re-write it to the progress.txt file. any way how to do this?

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: Batch Programs Thread.
        « Reply #563 on: December 15, 2012, 11:39:18 AM »
        I still think everyone the does natch should at some point in time consider Microsoft Power Shell.
        http://en.wikipedia.org/wiki/Windows_PowerShell

        gamerx365



          Adviser
        • Radda Radda!
        • Thanked: 1
          • Yes
          • Yes
        • Experience: Experienced
        • OS: Windows 10
        Re: Batch Programs Thread.
        « Reply #564 on: December 19, 2012, 11:16:42 AM »
        I want to share my webpage hosting my batch programs. Since I noticed my old attachments have been removed from my posts. Hope no one minds...
        http://72.18.61.194/lightstorm/index.html
        Check it out maybe? I've got some games and other random files there.

        foxidrive



          Specialist
        • Thanked: 268
        • Experience: Experienced
        • OS: Windows 8
        Re: Batch Programs Thread.
        « Reply #565 on: February 08, 2013, 09:15:08 PM »
        There's this really spiffy thing out nowadays, they call it a loop.  Crazy name.  Google it. :D

        patio

        • Moderator


        • Genius
        • Maud' Dib
        • Thanked: 1769
          • Yes
        • Experience: Beginner
        • OS: Windows 7
        Re: Batch Programs Thread.
        « Reply #566 on: February 08, 2013, 09:30:08 PM »
        But if you print his out you have a hard copy..... 8)
        " Anyone who goes to a psychiatrist should have his head examined. "

        foxidrive



          Specialist
        • Thanked: 268
        • Experience: Experienced
        • OS: Windows 8
        Re: Batch Programs Thread.
        « Reply #567 on: February 09, 2013, 12:59:08 AM »
        And you would have printed 57 + pages  (assuming 60 lines per page) :D

        You know, I think his post was truncated too... and would have been 30,000 + more lines
        « Last Edit: February 09, 2013, 01:28:11 AM by foxidrive »

        generikk



          Newbie

          • Experience: Beginner
          • OS: Windows 7
          Re: Batch Programs Thread.
          « Reply #568 on: March 15, 2013, 04:34:43 AM »
          ok i need a basic bat file i need it to be able to send an emulated press of a key (up arrow) to the active window every 10-20 secs (random)
          if u make one email it to me at email address removed by Allan

          -generikk
          « Last Edit: March 15, 2013, 07:13:34 AM by Allan »

          Allan

          • Moderator

          • Mastermind
          • Thanked: 1260
          • Experience: Guru
          • OS: Windows 10
          Re: Batch Programs Thread.
          « Reply #569 on: March 15, 2013, 07:15:05 AM »
          ok i need a basic bat file i need it to be able to send an emulated press of a key (up arrow) to the active window every 10-20 secs (random)
          if u make one email it to me at email address removed by Allan

          -generikk
          I removed your email address for two reasons:

          1) That's not how support forums work. Questions and answers are posted on the forum for all to see and learn

          2) Posting your email address on a public forum will result in a TON of spam. There are "bots" that do nothing but scour forums for email addresses, which are then sold to spammers.