Text To Speech Conversion and Custom Voices

Learn how to easily convert text to speech and Install Custom Voicdes on Windows 7!!

Cool Batch Tricks - Part IV

Learn to create a program for Reminder and Decimal to Binary Converter

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Cool Batch Tricks - Part IV

Yo guys,

        I'm back again with Cool Batch Tricks – Part IV. It’s always better that you go serially.So go and check my previous posts if haven’t. 



It’s better that you see earlier parts as it will help you to understand the code.


So, Let’s start.   

Today, we will again learn two cool programs. They are :-


1.    Decimal TO Binary Converter :-

Yes, this programs converts Decimal Numbers to Binary Form.


Code:


@echo off
title Decimal To Binary Converter
color a
echo.
echo.
echo ---------------------------
echo Decimal To Binary Converter
echo ---------------------------
echo.
echo.
echo Enter a Decimal Number;
set /p a=Number:
set y=%a%
:BIN
set /a "x=%y%%%2%"
set f=%x%%f%
if %y%==1 goto out
set /a "y=y/2"
goto BIN
pause

:out
set f=0%f%
echo %f%
pause
exit





Output:

Converter 



          I won’t be explaining the lines I already explained in previous posts.

          In this program, we first get an input from the user & convert that number into Binary. We use ‘%’ symbol to show mod operation. We’ve used mod and division in a loop to convert the number. We’ve set the condition that when the input number becomes 1 then we come out of the loop. Then we display the eoutput in ‘f’ variable.

2.   Reminder

This program sets a reminder for a specified time. Actually this program is not perfected as Reminder should an a voice message. We’ll introduce how to add Voice to your Batch Scripts in upcoming parts.

Code:

@echo off
color a
:start
cls
title Reminder
echo.
echo.
echo ---------------Reminder-----------------
echo  Tell the time to remind at:
set /p a=Enter Time(24 hrs format: HH:MM[Very Strict]):
echo Give the reminder a Name(One word only)
set /p name=Name:
echo Enter the message to be displayed
set /p msg=Message:
:main
 if not exist %appdata%\Reminder md %appdata%\Reminder\
if exist %appdata%\Reminder\Rem.bat del %appdata%\Reminder\Rem.bat
set NULL=echo.
echo @echo off>>%appdata%\Reminder\Rem.bat
echo set NULL=echo. >>%appdata%\Reminder\Rem.bat
echo color a>>%appdata%\Reminder\Rem.bat
echo :start>>%appdata%\Reminder\Rem.bat
echo %NULL% >>%appdata%\Reminder\Rem.bat
echo echo Hey %username%, it is %a% .You,ve set the following Reminder.>>%appdata%\Reminder\Rem.bat
echo %NULL% >>%appdata%\Reminder\Rem.bat
echo echo REMINDER:%msg%>>%appdata%\Reminder\Rem.bat
echo %NULL%  >>%appdata%\Reminder\Rem.bat
echo %NULL%  >>%appdata%\Reminder\Rem.bat
echo pause >>%appdata%\Reminder\Rem.bat
echo del /Q %appdata%\Reminder\Rem.bat>>%appdata%\Reminder\Rem.bat
echo exit>>%appdata%\Reminder\Rem.bat



:confirm
echo The reminder named %name% will trigger at %a% giving message %msg%
echo Is everything Right??
echo 1. Yes
echo 2. No. Restart Again
set /p x=Choice:
if %x%==2 goto start
schtasks /create /st %a% /tn %name% /tr %appdata%\Reminder\Rem.bat   /sc once
echo.
echo.
title Reminder Set
echo ---------------Reminder Set-----------------
pause


Output:

Main program asking info

       
Reminder triggered at specified time

          

          Here, we’ve used the echo command with ‘>>’ and a directory with using the variable appdata. We can create another text file with the use of this. Here,first take all information from the user assign it to variable place them appropriately in desired places then we create another file namd ‘Rm.bat’. Then we use the schtasks command to trigger the file we just created at specified time. That’s it!!


Batch Files:                              1. DEC TO BIN Converter
                                                        2. Reminder(No voice)



So, these were the two programs of this tutorial. If you like this post please support us by sharing the post. Don't Forget to visit our Facebook & Instagram pages, If you want to contact us, write us at Remedyhub11@gmail.com & don’t forget to subscribe.


        

Cool Batch Tricks - Part III

Hello guys,

        I'm back again with the 3rd part of Cool Batch Tricks. If you’re seeing this post, you must have seen the earlier posts, if you haven’t then click here.

       Cool Batch Tricks - Part I                                          Cool Batch Tricks - Part II

 Its better that yo see earlier parts as it will help you to understand the code.


So, Let’s start.   

Today, we will again learn two cool programs. They are :-


1.    Shutdowm Program

This programs schedules a Shutdown process after a specified period of time. You can Shutdown, Restrart, Log Off, Hibernate your Windows with this program


Code:


@echo off
color a
title Aborting Shutdown
echo Aborting Shutdown
shutdown.exe -a
if %errorlevel%==1116 goto timer
echo The Shutdown was Aborted
pause
exit

:timer
title Settng Up Shutdown
cls
echo.
echo.
echo WARNING : Timer Does not work with Log Off and Hibernate
echo.
echo.
set time=000
echo Enter the time-out period in seconds
set /p time=Time:
echo Time set as %time% seconds

:choice
echo What you want to do:
echo.
echo 1. Shutdown & set p1=Shutdown
echo 2. Restart & set p2=Restart
echo 3. Log Off & set p3=Log_Off
echo 4. Hibernate & set p4=Hibernate
echo.
echo Choose Your Option:
set /p a=Option:
if %a%==1 set p=%p1% & shutdown.exe -s -t %time%
if %a%==2 set p=%p2% & shutdown.exe -r -t %time%
if %a%==3 set p=%p3% & shutdown.exe -l
if %a%==4 set p=%p4% & shutdown.exe -h -t
echo Your computer will %p% in %time% seconds
pause
exit






Output:

Aborting Shutdown


Shutting Down after 500 Secs
        




          I won’t be explaining the lines I already explained in previous posts.

          This program first Aborts any shutdown if any is predefined. For this we use the shutdown.exe with parameter /a. Here another variable named ‘errorlevel’ is introduced. If a command is performed and if any error occurs then the error code is stored in this variable. We use this to check for any predefined shutdowns, if there are any it will terminate them and exit. Other wise, it jumps to the next section. As warned, the timer doesn’t work for Log Off and Hibernate. As you can see, we’ve used & in some lines. It is used for starting a new line.

          I hope you understand the program. If not then comment your problem.
We’ll definitely help you.

2.   Task Manager

We know there exists a GUI application, but it would be more cool to get a CLI.

Code:

@echo off
Title Task Manager
color a
:start
cls
echo.
echo.
echo ------------
echo Task Manager
echo ------------
echo.
echo.
echo What you want to do??
echo 1. Get Tasklist
echo 2. Create a new task
echo 3. End a Task
echo 4. Exit
set /p c=Choice:
if %c%==1 goto tasklist
if %c%==2 goto newtask
if %c%==3 goto endtask
if %c%==4 goto exit
echo Wrong Choice
pause
goto start

:tasklist
cls
echo The current running tasks are :-
echo.
tasklist
pause
goto start

:newtask
cls
echo Enter the path of the new task :
set /p p=Path with filename and extension:
start %p%
if %errorlevel%==9059 goto error
echo Task has been successfully launched
pause
goto start

:error
cls
if %errorlevel%==9059 echo The path or program name is incorrect
if %errorlevel%==128 echo The program %tname% is not running
pause
goto start

:endtask
cls
echo Enter the name of the task to end:
set /p tname=Name (without extension):
taskkill /IM %tname%.exe
if %errorlevel%==128 goto error
echo The program %tname% was successfully terminated
pause
goto start

:exit
cls
echo Exitting Program...
pause
exit


Output:

Show Tasklist

       
Create Fucntion


          Here, we’ve used the three commands for three different functions. They are tasklist to show task List,start to start an application,taskkill to End a Task. It may look lengthy but it is very simple to understand. The command taskkill is used with varius parameters. For ex. You can modify the code and end a task by using it Process ID. For that open Command Prompt and type, taskkill /?.

Batch Files :                                  1. Shutdown 
                                                      2. Task Manager


So, these were the two programs of this tutorial. If you like this post please support us by sharing the post. Don't Forget to visit our Facebook & Instagram pages, If you want to contact us, write us at Remedyhub11@gmail.com & don’t forget to subscribe.


        

Cool Batch Tricks - Part II

Hello guys,

        I'm back again with the 2nd part of Cool Batch Tricks. In this series, I present some cool Batch Files & try to explain how they work. If you still haven’t seen the first part of the series, Click Here.You should watch the first part as it will help you to understand the code.


So, Let’s start.   

Today, we will again learn two cool but very easy and programs. They are :-


1.    Folder Bomber

     This program creates folders with random names. You can set a limit or create unlimited folders (Can be used as a Virus, but IF SOMETHING WRONG HAPPENS DON’T BLAME ME)

Code:

@echo off
Title Folder Bomber
color a
:start
cls
echo.
echo.
echo NOTE : Folders will be bombed in a folder called bomb
echo.
echo.
echo.
echo.
echo Folder Bomber
echo.
echo.
echo Choose an Option??
echo 1. Limited
echo 2. Unlimited
set /p a=Enter Choice:
if %a%==1 goto limited
if %a%==2 goto unlimited
cls
echo Wrong Choice
pause
goto start

:unlimited
md bomb\%random%
cls
goto unlimited
pause

:Limited
set i=0
echo How many folders to bomb??
set /p b=Enter no. of Folders

:s
md bomb\%random%
set /a "i=i+1"
if %i%==%b% goto exit
goto s

:exit
echo %b% folders bombed successfully
pause>nul
exit







Output:



          I won’t be explaining the lines I already explained in previous posts.

          The 2nd line ‘Title Folder Bomber’ sets the Title to Folder Bomber in the Title Bar. The command’echo.’ Is used to print a blank line.
         
          The if condition checks that if value of a is equal to 1, if true, then it directs the interpreter to the ‘Limited’ Section. The same is for next if condition.
         
          The ‘cls’ command is used to clear the screen. The ‘md’ command means Make directory. It creates a new directory named ‘bomb’ & also creates a sub-directory of the value of random.

          In limited Section we set the value of variable ‘i’ to 0. Then we create a loop with a condition inside it. If the condition is matched then the interpreter jumps out of the loop, else it repeats the commands in the loop.

          We’ve used nul in front of pause with ‘>’, so pause won’t display any text when executed.

2.   Calculator

As the name suggests, this program is used to calculate the values of expressions entered.


Code:

@echo off
color a
Title Calculator
:Start
cls
echo -----------
echo Calculator
echo -----------
echo Enter the expression you want to calculate
set /p e=Expression :
set /a "x=%e%"
echo The answer is %x%
echo Do you want to calculate another expression ?
set /p y=Press NO to exit :
if %y%==No GOTO Exit
if %y%==NO GOTO Exit
if %y%==no GOTO Exit
GOTO start
pause
:Exit
echo Exitting Program...
pause
exit


Output:


       

          Here, we’ve used the set command with another parameter i.e ‘/a’. With this parameter, we can calculate the the value of an expression. We get the expression through the variable ‘e’ and set the output value of this expression to’x’. Then we print the variable ‘x’. Then we ask the user to repeat the process or not. Thus, it is so simple


Batch Files:                                              1.  Folder Bomber                               
                                                                  2.  Calculator


So, these were the two programs of this tutorial. If you like this post please support us by sharing the post. Don't Forget to visit our Facebook & Instagram pages, If you want to contact us, write us at Remedyhub11@gmail.com & don’t forget to subscribe.


        

Cool Batch Tricks - Part I

Hello guys,

        I'm starting a new series of posts in which I will show you some cool useful batch programs that you can use on your Windows PC. I will provide the code and will try to explain how it works. This is the first part of this series. Each part will contain two programs.


So, Let’s start.   

1.  What is a Batch Script??

      A Batch Script is a set of lines written in Batch Language. This language is used to execute commands in the Windows Command Prompt. This files have an extension of ‘.bat’. These can be executed without any need of compiler directly through Command Prompt. To know more about Command Prompt, go see my earlier post about Command Prompt.


Symbol of '.bat' files 

          Today, we will learn two cool but very easy and basi programs. They are :-


1.    The Matrix

     This program displays a cool Matrix of random numbers repeating continuously with a message displayed between them.

Code:

@echo off
color a
:Start
echo %random%%random%%random%%random%%random%You have been hacked!!%random%%random%%random%%random%%random%%random% 
/*  Its only one line from echo */ 
goto start



Output:



The first line ‘@echo off’ sets the echo to off. Echo means to display the current working path before each command. If its on then all paths are displayed,if it is off only outputs of commands that are performed are displayed.
In the next line ‘color a’, the color command is used to change the colour of the foreground and the background & ‘a’ sets the colour to green. To know more colours, open Command Prompt and type ‘color /?’(Without quotes).

          The next line ‘:Start’, states that a new section is being started named Start. We will use a command to come back here. This will form a loop.
         
          In the next line is ‘echo %random%.... %random%’, the echo command is used to display messages, %variable% is used to print the value of a variable. ‘Random’ generates random numbers.

          The last line ‘goto start’, sends the interpreter to Start section that we declared earlier to form a loop.


2.   SMS

This program used to send messages to other users that are on the same computer or to the clients of a server.


Code:

@echo off
color a
echo Type the message you want to send:
set /p a=MSG:
Echo Enter Username:
set /p b=User:
msg %b% %a%
pause
exit


Output:

 

I’ve already explained about the 1st, 2nd, 3rd & 5th lines. So, I won’t be explaining them again.

Moving on 4th & 6th line(they are almost similar), in this line we use the command ‘set’, which is used to assign values to a variable. ‘/p’ is an argument which prompts the user for input.
‘a’ is the variable name, and ‘MSG’ is the text to be displayed. Its Syntax is:

Set [arguements] <variable_name>=<Text>
          In the 7th line, we use ‘msg’ funcyion to send messages. We use the variables a,b in its arguments position. The Syntax of msg command is:

Msg [username] [message]
         
          It is the basic syntax, there are more advanced options available, to check them, open Command Prompt & type ‘msg /?’ (without quotes).

          The last second line contains only ‘pause’ word. This temperorily stops the execution and waits for the user to press any key.
         
          The exit command is used to exit from the program.


          So, these were the two programs of this tutorial. If you like this post please support us by sharing the post. You will get the .bat files of these programs down here:


  BAT Files :          1. The Matrix                                                                    2. Send MSG



          Don't Forget to visit our Facebook & Instagram pages, If you want to contact us, write us at Remedyhub11@gmail.com & don’t forget to Subscribe.

          .