Yes I am a stupid newfag to /prog/ but I need help. I cannot figure out why my gamestarter won't work. Neither set nor choice will work when it prompts you to choose an option to start a game, it always chooses the first option, regardless of if you hit 1, 2, or 3.
>>2
What?
I use newfag because it's used on virtually all of the imageboards, not just /b/.
Name:
Anonymous2009-07-22 1:09
OK OP I'LL DOWNLOAD AND RUN YOUR RANDOM .BAT FILE OFF THE INTERNET TO SEE WHY IT DOESN'T WORK!
... *downloading* ...
"SYSTEM32 NOT FOUND"?? THE FUCK??
Name:
Anonymous2009-07-22 1:10
Wait what the hell am I doing, time for code.
@echo off
cls
:start
echo.
echo PseudoBoris's Dynamic Program Starter!
echo.
echo 1: Spore
echo 2: Rosetta Stone
echo 3: Red Alert 3
choice /C 123 /N %1
if %errorlevel% =='1' goto one
if %errorlevel% =='2' goto two
if %errorlevel% =='3' goto three
:start
:one
call Explorer.exe C:\Program Files (x86)\Electronic Arts\Spore\Sporebin\
exit
goto end
:two
@echo on
explorer.exe "C:\Program Files (x86)\Rosetta Stone\Rosetta Stone Version
3\"
ping 127.0.0.1 -n 1
exit
goto end
:three
C:\Program Files (x86)\Electronic Arts\Red Alert 3\RA3.exe -win
goto end
end:
exit
I don't actually expect my code tag to work.
Name:
Anonymous2009-07-22 1:12
>>4
Yeah I read that and thought that's gonna raise suspicions, even though you can just as easily right click -> edit
>>7
I just use the lingo. I am in no way one of those degenerated idiots.
This is a genuine problem I have and I came to /prog/ because I thought you guys could troubleshoot a simple batch file...
Name:
Anonymous2009-07-22 19:23
>>8
I don't give a fuck. We don't use that lingo here. Actually, we hate the lingo just as much as the people. Please behave and we'll help you.
>>11
we require a photo of your penis made to look like the /prog/ snake.
Name:
Anonymous2009-07-22 22:38
try this instead
if ERRORLEVEL ==1
etc.
Name:
Anonymous2009-07-22 22:53
>>13
Doesn't work. I tried playing with the order of what opens, and it always opens the first one listed on the if section, regardless of which one you select.
with the : between the /C and your choices.... Also:
goto end
end:
1. You don't need this last goto
2. It should be :end with the colon at the start of the line.
Name:
Anonymous2009-07-23 2:13
Revised code that still doesn't work:
@echo off
cls
:start
echo.
echo PseudoBoris's Dynamic Program Starter!
echo.
echo 1: Spore
echo 2: Rosetta Stone
echo 3: Red Alert 3
choice /C:123 /N %1
if ERRORLEVEL ==1 goto one
if ERRORLEVEL ==2 goto two
if ERRORLEVEL ==3 goto three
:one
call Explorer.exe C:\Program Files (x86)\Electronic Arts\Spore\Sporebin\
exit
goto end
:two
@echo on
explorer.exe "C:\Program Files (x86)\Rosetta Stone\Rosetta Stone Version
Ffs why won't this basic DOS command function correctly? If I put Rosetta Stone as the first choice, it always opens that, and same for Red Alert 3. Quite frustrating. Can this be written simply in another programming language that I can put this into and use? It appears as if this just won't work.
Name:
Anonymous2009-07-23 2:17
An interesting note: I went to all the sites that show the syntax and usage of choice and I copied them into a .bat file and they don't work either.
I'm also on 64-bit Vista if the number of bits matters in this case.
Name:
Anonymous2009-07-23 2:36
That's fucked up. It's too bad I'm on WinXP so it's impossible for me to test your batch script.
Apparently Vista lets you do some shit like
if ERRORLEVEL 1 GOTO one
etc. So try that syntax.
Name:
Anonymous2009-07-23 11:34
>>1
I strongly suggest that you read the manual. That is, SICP. There is a whole chapter dedicated to this problem.
>>27
You can't seriously think anyone would believe that.
Name:
Anonymous2009-07-24 3:19
>>28
It's not a lie. You seriously think an average 15-year old would have the capability to write a program for Windows, let alone know what a .bat file is? America's youth is quite stupid now.
>>34
He's pretty bad at computers. He honestly couldn't tell you what TCP/IP stands for or what a port does on a computer.
On an off-note, is there a a reason I'm seeing a bunch of people who use two '`'s for their open quotes?
The first time i was genuinely interested in programming was when i discovered all the dos commands.
Writing batch files was the next step. IIRC i still have those first batch files somewhere in archives.
Batch files are basically simplest shell scripting language. You can write menus,loaders, and even compile them to .exe files with some utilities.
They are still useful in XP and i use them for automating compilation and minor tasks, but not that much.
______________________________ http://xs135.xs.to/xs135/09042/av922.jpg
You're always a little disappointing in person because you can't be the edited essence of yourself.
PHP is not self hosting.
PHP is supposed to be easy for fags, but uses terse C syntax.
The PHP base libraries can't even be written in PHP, they are written in C.
PHP's Object Oriented shit is short bus remedial.
PHP uses C syntax to call C coded libraires on top of an interpreter wirtten in C, and it has none of the benefits or power of C, and can't even implement the C++ OO extentions correctly.
Name:
Anonymous2009-09-19 17:22
You know what is awesome about PHP? [code] "7dongz" == 7
( ≖‿≖)