Cov txheej txheem:

Batch Tutorial - Siv 1: 4 Cov Kauj Ruam
Batch Tutorial - Siv 1: 4 Cov Kauj Ruam

Video: Batch Tutorial - Siv 1: 4 Cov Kauj Ruam

Video: Batch Tutorial - Siv 1: 4 Cov Kauj Ruam
Video: Qhia Cov Lus Slang Siv Rau Kev Sib Tham- Lesson 1 2024, Kaum ib hlis
Anonim
Batch Tutorial - Siv 1
Batch Tutorial - Siv 1

Zoo kuv tau pom ob peb pawg qhia tawm, tab sis tsis muaj ib tus ntawm lawv tiag ua raws nrog txhua yam yog li kuv tab tom ua 3 ntu qhia ntawm ib pawg, nrog cov vis dis aus tsuas yog rau qhov yooj yim ntxiv. Kuv yuav xa txhua cov ntaub ntawv.bat (batch) xav tau hauv lawv cov kauj ruam tsim nyog.

Kauj ruam 1: Nyob Zoo Ntiaj Teb

Txhawm rau pib qhib Command Prompt cia li nyem "Pib => Khiav thiab ntaus 'cmd'" Yeej kom pib tawm nrog koj yuav tsum qhib notepad thiab ntaus:

@echo tawmQhov no ua dab tsi yog qhov tseem ceeb thaiv cov lus txib los ntawm kev qhia thaum tseem qhia qhov tso tawm.

@echo offecho nyob zoo worldmsg * nyob zoo worldnet xa * nyob zoo ntiaj tebMus tom ntej thiab sau qhov ntawd rau hauv notepad thiab khaws nws li com.bat. Ces ob npaug nias kom pib. Peb yuav siv txhua tus ntawm lawv tshwj tsis yog ncha vim nws zoo nkauj piav qhia tus kheej.

Kauj ruam 2: Me ntsis ntxiv "lo lus"

Okay tam sim no peb nkag mus rau qhov nyuaj me ntsis, peb yuav tsis yog tiag.: DStart tawm nrog daim ntawv sau tseg tsis muaj dab tsi thiab ntaus qhov no:

@echo offshutdown -spauseshutdown -amg * dag koj !! hahaTam sim no kaw cia li tsuas yog kaw lub computer. Saib cov vis dis aus kom ntxaws ntxaws saib lossis ntaus kaw -? mus cmd. ncua cia li tos rau koj los nyem TXHUA YEEM txuas ntxiv mus. Thiab koj paub tias dab tsi ua los ntawm cov kauj ruam dhau los.. Thov qhov no los ntawm kev khaws nws li tricky.bat.

Kauj Ruam 3: Riam Bombs / Infinite Loop (GOTO Trap)

Yeej yog txhua rab diav rawg yog, yog qhov haujlwm uas khaws qhib cov ntawv ntawm nws tus kheej uas qhib cov ntawv luam ntawm nws tus kheej, thiab ntxiv rau thiab ntxiv mus. Zoo, qhov yooj yim heev rab diav rawg yuav yog:

@echo tawm: Startstart fork.batGOTO PibTxuag raws li fork.bat: Pib cim qhov chaw hauv tsab ntawv uas koj yuav xav tau GOTO tom qab lossis nrawm dua tom qab tau npaj tseg. GOTO qhia txoj haujlwm kom mus rau qhov tshwj xeeb pib pib "pib" qee yam nws tuaj yeem yog lub vev xaib, anything.eg, pib https://instructables.com khoos phis tawj. Qhov pib fork.bat tuaj yeem hloov nrog cov lus txib uas koj nyiam, piv txwv

@echo tawm: Startnet xa * laconix cov cai! GOTO PibUas pib xa cov ntawv "laconix cov cai!" rau leej twg hauv koj lub network nrog Kev Pabcuam Messenger tau khiav.

Kauj ruam 4: Muaj kev lom zem…

Vam tias koj mob siab rau kev qhia tom ntej, kuv paub kuv yog!

Mus rau hone koj nyuam qhuav kawm txuj ci thiab muaj phun!

Pom zoo: