Skip to main content

Creating a Simple Batch File Program

Creating a Simple Batch File Program

Running the program
a. Open Notepad 
b. Type the following syntax: 
start chrome.exe www.facebook.com

c. Save the file with the name facebook.bat remember yes DOT BAT 
d. If so, try your location to save the file, then open the facebook.bat. The result will open google chrome to open a facebook page 

to build your program menu
a. Open Notepad 
b. Type the following syntax: 
@echo off
color 0a
:a
CLS
echo @@@@@@@@@@@@@@@@@@@@@@@
echo @@     Applications FAJARYUSUF.COM    @@
echo @@                           @@
echo @@                             @@
echo @@ *-----------------------------------------------*@@
echo @@ *          Select Your Choice * @@
echo @@ *-----------------------------------------------*@@
echo @@ *                     *@@
echo @@ *     [1] Word                 *@@
echo @@ *     [2] Excel                              *@@
echo @@ *     [3] Power Point                   *@@
echo @@ *     [4] Outlook                         *@@
echo @@ *     [5] OneNote                       *@@
echo @@ *     [6] Winamp                        *@@
echo @@ *     [7] Paint                 *@@
echo @@ *-----------------------------------------------*@@
echo @@                            @@
echo @@@@@@@@@@@@@@@@@@@@@@
echo.
set /p "pil=Insert Your Choice [1-7] : "
if %pil%==1 start winword
if %pil%==2 start excel
if %pil%==3 start powerpnt
if %pil%==4 start outlook
if %pil%==5 start onenote
if %pil%==6 start winamp
if %pil%==7 start mspaint
echo.
Pause
goto a
c. Save the text file with the name menuprogram.bat 
d. Run program 
results if the run:
Creating a Simple Batch File Program
No display menu selection program, and if we input the numbers 1-7 on menu appropriate programs will be running and open input. 

Make the program calculate
a. Open Notepad 
b. Type the following syntax:

@echo off
title Learn to Count with Batch files
:awal
color 1b
ECHO ******************************************************
echo LEARN TO CALCULATE !
echo.
echo ******************************************************
echo.
set/p "b1=Input Number 1: "
set/p "b2=Input Number 2: "
echo.
echo [1] multiplication [2] add on [3] division [4] subtract it
set/p "pil=Pilih Action:"
if %pil%==''goto early
if %pil%==1 goto multiplication
if %pil%==2 goto add on
If %pil%==3 goto division
if %pil%==4 goto subtract it
echo.
:multiplication
set/a b=b1*b2
echo The results are = %b%
pause
goto early
:add on
set/a b=b1+b2
echo The results are = %b%
pause
goto early
:division
set/a b=b1/b2
echo The results are = %b%
pause
goto early
:subtract it
set/a b=b1-b2
echo The results are = %b%
pause
goto early

c. Save with name calculate.bat, then run the program 
result will be like this:
Creating a Simple Batch File Program


If you have any questions please comment. 
Do not forget to like and share. 
Greeting the spirit of fajaryusuf com . :)

Comments

Popular posts from this blog

Menambahkan Peraturan Komentar Pada Blog

Menambahkan Peraturan Komentar Pada Blog : Ngblog Menulis sebuah artikel dan dikomentari dengan link aktif/promosi produk dan kata kata spam lainnya memang tidak mengenakan anda mungkin akan sangat merasa kecewa sekali, anda mungkin seperti menulis sebuah artikel namun tidak dihargai karyanya oleh orang lain. Mungkin membuat aturan berkomentar di blog adalah salah 1 cara menetralisirnya, mungkin jika ada aturan tersebut orang berpikir 2 kali untuk meninggalkan komentar Spam, lalu bagaimana cara membuat aturan komentar tersebut? langsung saja kita praktekan Ikuti langkah berikut : Login ke bloger,masuk ke blog yang anda inginkan, Klik Setelan -> POS-KOMENTAR   Scroll kebawah dan cari menu "pesan formulir komentar" klik tambahkan , dan isi kolom sesuai keinginan kalian atau peraturan yang kalian inginkan.  Setelah selesai silakan klik simpan setelan dipojok kanan atas. Lihat hasilnya di blog kalian ,akan seperti ini : Jika ada pertanyaan...

Traha Infinity a lancé une campagne événementielle de pré-inscription

Moai Games a officiellement annoncé la sortie d’ un  nouveau  MMORPG  intitulé  Traha Infinity , dans la première moitié de 2022. Ce jeu mobile devrait se dérouler 200 ans avant les événements des précédents jeux  Traha , il a  des  graphismes  Full 3D  et optimisés performances haut de gamme pour smartphones. Traha a  été un énorme succès en Corée avec 4,2 millions de précommandes avant sa sortie officielle en 2019, le jeu mobile n’a jamais eu de sortie mondiale. Ce jeu a été développé par Moai Games et publié par  Nexon , et est devenu l’un des jeux les plus vendus de l’époque. Et maintenant,  Traha Infinity  continuera le même monde comme une suite, plutôt une préquelle. Le nouveau jeu présentera la même vision du monde et la même topographie que le jeu précédent, mais présentera un nouveau scénario. Ils se vantent d’ une qualité graphique  Full 3D haut  de gamme ainsi que d’un système optimisé pour les smartphones. Les joueurs pourront explorer l...

Contoh Program C++ : Konversi Bilangan Hexadesimal, Oktal , Biner.

Hai Pembaca FajarYusuf.Com yang pintar dan berwawasan tinggi, kali ini FajarYusuf.Com akan post Contoh Program C++ : Konversi Bilangan Hexadesimal, Oktal , Biner . Mari kita membuat program konversi bilangan yang sangat mudah di buat dengan menggunakan bahasa pemrograman C++. Yaitu dengan menggunakan type data long, untuk Hexadesimal dengan rumus : <<hex<<desimal (merubah dari bilangan Desimal ke Hexadesimal) , untuk Oktal dengan rumus : <<oct<<desimal (merubah dari bilangan Desimal ke Oktal). Dan untuk biner dilakukan pembagian 2. Contoh Coding Program C++ Konversi Bilangan: #include<iostream> using namespace std; int main() { long desimal, pembagi=1073741824, bit; cout<<"Nilai Desimal : "; cin>>desimal; cout<<"Hexadesimal = "<<hex<<desimal<<endl; cout<<"Oktal = "<<oct<<desimal<<endl; ...