More complex Batch Codes - THE TECH RELATED BLOG
Trending

More complex Batch Codes

In this tutorial, I will be showing a more complex batch programming. This will show 1 way of the if command and how to make he program save files for you. Lets get started.   
You must have notepad to do this and you have to start with the following command:

Using the if Statement 


This will show/tell you how to use the if I'll try to explain as i go along.

But we need to do something first, you see in the Program there's 'set /p userin1=' that will make 'userin1' what ever the user types so then with the  'if' it says (lets say userin1=hello but you will type %userin1%) 'if 'hello'=='hello' *command* so in the program it says:
if '%userin1%'=='no' goto new user. this shows that if the user types no then carry out this command with in this case is goto new user. And new user will make the user profile.

So if the player doesn't have a user account then it will make one. the next step will how you how you can do this.

Saving Files




In this step I will show you how to save files with you batch program this will carry on with the other program.

The echo here won't project what is on the line. It will save what ever the user typed for his/her username and password.
So let's say %username%=Relate with me Blog then it will save Relate with me Blog in username.txt same with the other one.

How to make the program Accept the password and Username From User

In this step, well its in the name, set /p userin2=<username.txt makes what ever is in username.txt into a variable called %userin2% same with the password then if the username is the same as what the person typed then carry on with the program.

Completing the Program
And that's it, you have completed all

Relate with me Blog
Share the post with friends
More complex Batch Codes Reviewed by Egunleti Damilola on Tuesday, June 14, 2016 Rating: 5 In this tutorial, I will be showing a more complex batch programming. This will show 1 way of the if command and how to make he program ...

No comments: