Yuav Ua Li Cas Khiav Ntawv Vbs

Cov txheej txheem:

Yuav Ua Li Cas Khiav Ntawv Vbs
Yuav Ua Li Cas Khiav Ntawv Vbs

Video: Yuav Ua Li Cas Khiav Ntawv Vbs

Video: Yuav Ua Li Cas Khiav Ntawv Vbs
Video: Huab Vwj u0026 Celesna Lor- Qhov Tawv Tawv-Nkauj Tawm Tshiab 2024, Hlis ntuj nqeg
Anonim

Vbs ntawv sau feem ntau yog siv los ua cov ntaub ntawv, tswj cov kab ke, ua haujlwm nrog khoos phis tawm thiab tus neeg siv nyiaj. Lawv kuj pab cuam tshuam nrog kev thov hauv chaw ua haujlwm, ua haujlwm nrog databases. Tag nrho nyob rau hauv tag nrho, thaj chaw tsis haum rau txhua tus programmer.

Yuav ua li cas khiav ntawv vbs
Yuav ua li cas khiav ntawv vbs

Cov Lus Qhia

Kauj ruam 1

Khiav cov ntaub ntawv nrog *.vbs txuas ntxiv los ntawm ob npaug nias nas lossis hu nws ntawm lub npe hauv lub console. Txhawm rau ua qhov no, mus rau pib / khiav ntawv qhia zaub mov thiab ntaus txoj hauv kev rau cov ntawv yuav tsum muaj nyob hauv lub qhov rai uas qhib. Nov yog cov ntawv luam ntawm cov ntawv ib txwm siv uas koj tuaj yeem kho tau yooj yim hauv ib tsab ntawv ceeb toom. Cov qauv no tau nkag siab tshaj plaws thiab yooj yim, tab sis qee zaus, vim qee lub sijhawm, nws tsis ua haujlwm (qhov system tsis txhawb cov hom ntawv, qhov kho tau ua tsis tiav, thiab lwm yam).

Kauj ruam 2

Yog tias cov ntawv nrog *.vbs txuas ntxiv tsis qhib, xyuas VBS cov kws txhais lus. Yuav tsum muaj ob ntawm lawv nyob hauv lub system: console CScript thiab windowed WScript (ua ke lawv yog Windows Script Host lossis WSH). Lawv, hauv kev tshawb xav, yuav tsum tau nruab nrog lub kaw lus tam sim ntawd, tab sis qee zaus nws hloov tawm tias lawv dhau los puas lossis tsis teeb tsa txhua lub sijhawm (tej zaum ntawm cov khoos phis tawm qub). Yog tias muaj cov txhais lus tsis muaj, nruab lawv rau koj lub khoos phis tawm thiab muab ob npaug rau nyem los khiav cov ntawv.

Kauj ruam 3

Tsim cov ntawv sau ua cov ntawv nyeem nrog txt txuas ntxiv. Luam tawm cov ntawv no rau ntawm: Sub Khiav (ByVal sFile) Dim plhaubSet plhaub = CreateObject ("WScript. Shell") plhaub. Run Chr (34) & sFile & Chr (34), 1, cuav plhaub plhaub = Tsis muaj dab tsi SubRun "C: / Program Files / FileZilla FTP Client / filezilla.exe "Lawm, hloov txoj hauv kev nrog koj cov ntaub ntawv ua tiav. Tom qab ntawv hloov lub txt ua yav dhau los txt thov vbs txuas ntxiv. Txhawm rau kuaj xyuas nws, nias ob npaug ntawm nws nrog nas, thiab qhov kev zov me nyuam yuav pib ntawm txoj kab kev tshwj xeeb.

Kauj ruam 4

Txhawm rau xa mus rau Windows Script Host txoj kev, hais kom meej qhov khoom thiab hom kev nrog qhov xav tau uas xav tau (sib cais los ntawm ib teev). Koj tseem hais txog WSH cov khoom, tab sis koj tuaj yeem muab thiab nyeem rau hauv kev hloov pauv thiab lwm yam khoom. Nco ntsoov xav txog cov ntaub ntawv hom khoom thiab cov hloov pauv, txwv tsis pub sau ntawv yuav pov ib qho yuam kev txog cov ntaub ntawv hom tsis sib xws.

Pom zoo: