Advertising (This ad goes away for registered users. You can Login or Register)

[SOLVED]I Need help with batch

Discuss about your favorite (gaming...or not) devices here. The most popular ones will end up getting their own categories
Programming discussions for your favorite Device
Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
User avatar
ReaperX
Posts: 470
Joined: Fri Jan 21, 2011 2:04 am
Location: Georgia

[SOLVED]I Need help with batch

Post by ReaperX » Sun Apr 03, 2011 5:49 pm

I solved this like a week ago. This can be locked or whatever. ;) Thnx. (I guess)
Advertising
Last edited by ReaperX on Tue Apr 12, 2011 11:24 pm, edited 1 time in total.
PSP Information
PSP Model: Sold
PSP Motherboard:
PSP Firmware Version:
Make it idiot proof and someone will make a better idiot.

Nickolas
Posts: 174
Joined: Sat Jan 22, 2011 3:14 pm
Location: In a black hole...

Re: I Need help with batch

Post by Nickolas » Mon Apr 04, 2011 8:08 pm

ReaperX wrote:I'm a really experienced batch programmer. Yes I said programmer. When I'm bored I program applications in batch. Anyway for one application I'm making I made a settings option for color. What I want to do is have the user select the colors and then it will save a command based on the colors selected to a txt file. Then I will have another command at the base of the file that will check if the txt file exists before executing it.

I've got the settings and the selector set up. Now If someone will kindly tell me how to make it read a command in a txt file and execute it I can do the rest. Can you help?
I am assuming that by "Batch" you mean Windows... I had actually tried to do the same thing in the past but I soon realised that there is no way to do it appart from using a kinda stupid method: Open the file normally... Copy the contents... Paste them in your window... (As user input..) Check the user input... In other languages I'd use a streamreader but in batch...Well that's the only method I can think of...
Advertising
Image
Image
Image
Image

User avatar
ReaperX
Posts: 470
Joined: Fri Jan 21, 2011 2:04 am
Location: Georgia

Re: I Need help with batch

Post by ReaperX » Mon Apr 04, 2011 10:09 pm

Ok. Thnx anyway. ;)
PSP Information
PSP Model: Sold
PSP Motherboard:
PSP Firmware Version:
Make it idiot proof and someone will make a better idiot.

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: I Need help with batch

Post by m0skit0 » Tue Apr 05, 2011 11:38 am

There are many things at which Windows sucks, and Batch is king among them.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

JJS
Big Beholder
Posts: 1416
Joined: Mon Sep 27, 2010 2:18 pm
Contact:

Re: I Need help with batch

Post by JJS » Tue Apr 05, 2011 12:07 pm

If you cannot read a parameter from a text file, how about saving a batch file with the whole command + parameter in it? Then you just have to execute that file from your main script and the effect should be the same.

User avatar
ReaperX
Posts: 470
Joined: Fri Jan 21, 2011 2:04 am
Location: Georgia

Re: I Need help with batch

Post by ReaperX » Wed Apr 06, 2011 12:35 am

@moskit0 I know but I don't want to learn C++ and I'm good at batch.

@JJS thnx ill try that
PSP Information
PSP Model: Sold
PSP Motherboard:
PSP Firmware Version:
Make it idiot proof and someone will make a better idiot.

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: I Need help with batch

Post by m0skit0 » Wed Apr 06, 2011 6:21 am

Windows Batch is not programming.

You can also pass arguments/parameters to the batch file as well. You might want to check that out.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

User avatar
6.20TN(HEN)
Posts: 164
Joined: Wed Nov 24, 2010 4:04 pm
Location: With you fellow procrastinators

Re: I Need help with batch

Post by 6.20TN(HEN) » Mon Apr 11, 2011 8:25 pm

m0skit0 wrote:Windows Batch is not programming.
true. it is basically typing cmd commands for you. nice for easy repetitive tasks. ie. clearing temp, running text-based java apps.

java is the best programming language because of multi platform compatibly without changing code.
PSP 3000- 6.20 Perm. Pro B8
Image

waratte
Posts: 1320
Joined: Wed Oct 20, 2010 12:03 am

Re: I Need help with batch

Post by waratte » Mon Apr 11, 2011 8:43 pm

6.20TN(HEN) wrote:
m0skit0 wrote:Windows Batch is not programming.
true. it is basically typing cmd commands for you. nice for easy repetitive tasks. ie. clearing temp, running text-based java apps.

java is the best programming language because of multi platform compatibly without changing code.
Yeah, it is a type of scripting. By the way, there is no such thing as "the best programming language".

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: I Need help with batch

Post by m0skit0 » Tue Apr 12, 2011 8:36 am

6.20TN(HEN) wrote:java is the best programming language because of multi platform compatibly without changing code.
Yeah, letting aside the fact that is slower than a snail :roll:
waratte wrote:By the way, there is no such thing as "the best programming language".
+1
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

Post Reply

Return to “Programming and Security”