Welcome Guest [Log In] [Register]
Add Reply
[Batch]Scripting a algebraic Translater clalcualto
Topic Started: Feb 26 2009, 03:43 PM (393 Views)
CaptDeath
Member Avatar

so i was getting lasy and i was like hey i wanna try something in batch
so i was learning about translations in algebra and it clicked hell ill try this

but it seems i screwed up making a loop
whats in BOLD is not working im thinking its returning true?
but its only == 1 what the heck?

Spoiler: click to toggle


EDIT: Put Large codes in Spoiler tags :) [spoiler][/spoiler]
Edited by Alex, Feb 26 2009, 04:02 PM.
Offline Profile Quote Post Goto Top
 
Alex
Member Avatar
Administrator
I don't know batch syntax but maybe if you can explain what it should do and what it does I can help
Edited by Alex, Feb 26 2009, 04:43 PM.
Offline Profile Quote Post Goto Top
 
CaptDeath
Member Avatar

well a site for all the batch syntax
http://www.computerhope.com/msdos.htm#02
and what its supposed to do is let you enter a number which it does
then add +1 to the que if its <5 if its >5 go to cordsY
Offline Profile Quote Post Goto Top
 
shale4
Member Avatar

I managed to get it to run further. It just doesn't write to a text file. See if this helps you at all; it's been so long since I've done batch scripting so I couldn't remember how to do it.

-Shane

Quote:
 
@Echo off
echo this is translator
cls
:start
echo Made by RDMKiller0@Gmail.com
:nulling
set Name=nill
set temp=nill
set Dest=nill
set x1=0
set x2=0
set x3=0
set x4=0
set x5=0
set y1=0
set y2=0
set y3=0
set y4=0
set y5=0
set xchange=0
set ychange=0
set temp2=0
set xque=1
set yque=1
set Text=_OMFG Screw Up_
:setname
set /p Name=Type the name you want for the output file no spaces or this will not work.
cls
Echo %Name%
set /p temp=Press Y if thats ok or N if not then hit enter or X to kill this batch.
if not '%Temp%'=='' set Temp=%Temp:~0,1%
if '%Temp%'=='N' goto setname
if '%Temp%'=='n' goto setname
if '%Temp%'=='y' goto setx
if '%Temp%'=='Y' goto setx
if '%Temp%'=='X' goto killme
cls
:setx
set /p xchange=Type the change of X like 1,2,3,4,5 -1 -2 -3 -4 -5
cls
Echo %xchange%
set /p temp=Press Y if thats ok or N if not then hit enter or X to kill this batch.
if not '%Temp%'=='' set Temp=%Temp:~0,1%
if '%Temp%'=='N' goto X
if '%Temp%'=='n' goto X
if '%Temp%'=='y' goto sety
if '%Temp%'=='Y' goto sety
if '%Temp%'=='X' goto killme
cls
:sety
set /p ychange=Type the change of Y like 1,2,3,4,5 -1 -2 -3 -4 -5
cls
Echo %ychange%
set /p temp=Press Y if thats ok or N if not then hit enter or X to kill this batch.
if not '%Temp%'=='' set Temp=%Temp:~0,1%
if '%Temp%'=='N' goto setx
if '%Temp%'=='n' goto setx
if '%Temp%'=='y' goto cords_X
if '%Temp%'=='Y' goto cords_X
if '%Temp%'=='X' goto killme
cls

:cords_X
set /p %xque%=type the X cord of %xque%
if '%xque%'=='5' goto setem_X
set %xque%=%xque%+1

:setem_X
set x1=%x1%+%xchange%
set x2=%x2%+%xchange%
set x3=%x3%+%xchange%
set x4=%x4%+%xchange%
set x5=%x5%+%xchange%
goto cords_Y
:cords_Y
set y1=%y1%+%ychange%
set y2=%y2%+%ychange%
set y3=%y3%+%ychange%
set y4=%y4%+%ychange%
set y5=%y5%+%ychange%
:Write_to_File
echo Writing to txt file %name%.txt in %Out%
set Text %x1%=X %x2% test
pause
Cls
Echo your Done Woot please visit http://tyrealsfiles.webs.com/ for more of my creations i hoped you enjoyed this simple 72 line batch file
echo.
echo.
echo remember you file that was written is located in %out%
Echo and its named %Name%
Pause
Edited by shale4, Mar 2 2009, 02:39 PM.
Offline Profile Quote Post Goto Top
 
CaptDeath
Member Avatar

hey thanks :)
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Web-Based Programming Support · Next Topic »
Add Reply

Banner and Logo by TheKeith