Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Cannot figure out why this won't work?

Name: Anonymous 2009-07-22 0:56

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.

http://www.mediafire.com/?y05yhzx1hnn

Would really appreciate it /prog/.

Name: Anonymous 2009-07-22 1:00

hax my anus

Name: Anonymous 2009-07-22 1:08

>>2
What?
I use newfag because it's used on virtually all of the imageboards, not just /b/.

Name: Anonymous 2009-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: Anonymous 2009-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: Anonymous 2009-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

Name: Anonymous 2009-07-22 12:56

>>1,3
newfag
Back to /b/, please.

Name: Anonymous 2009-07-22 18:43

>>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: Anonymous 2009-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.

Name: Anonymous 2009-07-22 19:58

>>9
Please behave and we'll help you.
We both know that's not true.

Name: Anonymous 2009-07-22 20:08

I said it once. I corrected myself on the poor hosting of code, am I supposed to suck your dick to get an answer?

Name: Anonymous 2009-07-22 22:08

>>11
we require a photo of your penis made to look like the /prog/ snake.

Name: Anonymous 2009-07-22 22:38

try this instead

if ERRORLEVEL ==1

etc.

Name: Anonymous 2009-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.

Name: Anonymous 2009-07-23 2:09

>>14
ok, try

choice /C:123 /N %1

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: Anonymous 2009-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

3\"
ping 127.0.0.1 -n 1
exit
goto end
:three
C:\Program Files (x86)\Electronic Arts\Red Alert 3\RA3.exe -win
:end
exit


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: Anonymous 2009-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: Anonymous 2009-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: Anonymous 2009-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.

Name: Anonymous 2009-07-23 11:42

>>18
I think if ERRORLEVEL 1 GOTO one means "if ERRORLEVEL >= 1"

Name: Anonymous 2009-07-23 20:23

>>19
Err... which section would that be in? This manual is enormous.

Name: Anonymous 2009-07-23 23:26

Wow. I googled commands in Python and managed to put this together, and it works!


print ""
print "PseudoBoris's Program Starter"
print ""
print "1: Spore"
print "2: Rosetta Stone"
print "3: Red Alert 3"
x = raw_input("Choose an option: ")
if x == '1':
    import subprocess
    subprocess.Popen('explorer "C:\Program Files (x86\Electronic Arts\SPORE\Sporebin"')
if x == '2':
    import subprocess
    subprocess.Popen('explorer "C:\Program Files (x86)\Rosetta Stone\Rosetta Stone Version 3"')                 
if x == '3':
    import subprocess
    subprocess.Popen('C:\Program Files (x86)\Electronic Arts\Red Alert 3\RA3.exe -win')


Is Python really this easy to do shit in?

Name: Anonymous 2009-07-24 0:52

Yes.  Yes it is.

also congrats on graduating from BAT files and getting this shit worked out :p

Name: Anonymous 2009-07-24 0:58

>>23
that's actually more like a step sideways, rather than a step up.

Name: OP 2009-07-24 1:40

>>24
It's a step up because it actually works. If I were having the same problems as with the BAT files then it would be a step sideways. It works.

Name: Anonymous 2009-07-24 1:46

>>22
Pseudo Boris

    * Age: 15
    * Astrological Sign: Taurus
    * Zodiac Year: Dog
    * Location: Tennesse : United States

About Me

Messenger names: mndmencia@aim.com pseudoboris@live.com thegod2929@yahoo.com 433-459-320 (ICQ ID)

GET OUT!!!

Name: Anonymous 2009-07-24 2:01

>>26
Hmm? What?
I'm not 15.
My friend wanted me to make this for him. He's quite dysfunctional with computers. He's the 15 year old.

Name: Anonymous 2009-07-24 2:45

>>27
You can't seriously think anyone would believe that.

Name: Anonymous 2009-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.

Name: Anonymous 2009-07-24 3:34

>>29
youth is
Proof, pudding.

Name: Anonymous 2009-07-24 3:36

>>29
frozenvoid is 15 and he can write programs (not well though).

Name: Anonymous 2009-07-24 3:46

>>29
America's youth is quite stupid now.
Not that you're much better, considering you apparently don't understand how import works.

Name: Anonymous 2009-07-24 4:09

>>32
Ignorance vs. stupidity fight

Name: Anonymous 2009-07-24 6:51

>>29
Who says you're an ``average'' 15-year-old? Also, batch files are not rocket surgery.

GET OUT!

Name: Anonymous 2009-07-24 21:18

>>31
Is that why people are trying to ban him?

>>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?

Name: Anonymous 2009-07-24 21:20

>>35
``Faggot Quotes'' are a /prog/ standard

Name: Anonymous 2009-07-24 21:27

>>36
Really? The close-quotes are formed how? Italic apostrophes?
``Faggot quotes?''

Name: Anonymous 2009-07-24 21:28

>>36
Faggot quotes are disgusting. You are clearly unaware of /prog/ standards, given the way you've typed.

Back to /lounge/, MILKRIBS.

Name: Anonymous 2009-07-24 21:35

No. ``Faggot quotes''. No italics.
Using italics to simulate the obliqueness is a clear sign of failure to type ``acute accents´´.

Name: Anonymous 2009-07-24 21:38

>>39
Oh, so it's just better to use ' " ' as opposed to ' `` ´´ '?

Name: Anonymous 2009-07-24 21:40

>>40
They aren't called "faggot quotes" for nothing.

Name: Anonymous 2009-07-24 21:51

>>40
It's historic.

Name: Anonymous 2009-07-24 22:03

>>29
I'm 16 and have been programming since I was 12.

I admit that at first it was HTML, BASIC, and PHP, but I've moved on. I'm reading my SICP and doing all the exercises in Haskell.

Name: Anonymous 2009-07-24 22:45

I'm reading my SICP and doing all the exercises in Haskell.
I can't wait until you get to streams!

Name: Anonymous 2009-07-24 23:41

HTML is not "programming"

Name: Anonymous 2009-07-25 0:18

>>40
Only on /prog/.

Name: Anonymous 2009-07-25 0:20

>>45
Excuse me HTML is Touring Complete

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-07-25 2:18

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.

Name: Anonymous 2009-09-19 14:53

Name: Anonymous 2009-09-19 16:43

>>45 >
Nor is PHP -- it is a scripting language.

Name: Anonymous 2009-09-19 17:21

You know what is awesome about PHP?

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: Anonymous 2009-09-19 17:22

You know what is awesome about PHP?
[code] "7dongz" == 7
( ≖‿≖)

Name: ​​​​​​​​​​ 2010-09-09 17:07

Name: Anonymous 2011-02-03 1:20


Don't change these.
Name: Email:
Entire Thread Thread List