Cov txheej txheem:
- Kauj ruam 1: Pib Koj VBScript
- Kauj Ruam 2: Ncua Koj VBS
- Kauj Ruam 3: Cov Lus thiab Cov Lus Taw Qhia
- Kauj ruam 4: Qhib.exe Cov Ntaub Ntawv
- Kauj ruam 5: Cov ntsiab lus
Video: VBScript Basics - Pib Koj Cov Ntawv, Ncua Sijhawm thiab Ntau Ntxiv!: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Zoo siab txais tos rau kuv thawj qhov kev qhia yuav ua li cas thiaj ua tau VBScripts nrog notepad. Nrog.vbs cov ntaub ntawv, koj tuaj yeem tsim qee qhov lom zem pranks lossis kab mob tuag taus. Hauv qhov kev qhia no, Kuv yuav qhia koj cov lus txib yooj yim xws li pib koj tsab ntawv, qhib cov ntaub ntawv thiab ntau ntxiv. Thaum kawg, Kuv yuav qhia koj cov ntsiab lus ntawm yam koj tau kawm thiab kuv yuav muab qee lub tswv yim rau koj thiab piv txwv tsab ntawv, thiab qee qhov ntawv sau ntau ntxiv hauv beetween. Cia peb mus rau nws!
Kauj ruam 1: Pib Koj VBScript
Txhawm rau pib, koj yuav tsum tau qhib notepad. Koj tuaj yeem nyem rau ntawm lub desktop, ntawm cov ntawv qhia zaub mov uas tshwm tuaj mus rau qhov tshiab thiab tom qab ntawv sau cov ntawv. Koj tseem tuaj yeem nias lub pob Windows + R thiab ntaus hauv notepad.
Thawj lo lus txib yog siv los tsim cov ntawv zoo nkauj heev. Nov yog cov lus txib:
Teeb WshShell = WScript. CreateObject ("WScript. Shell") Qhov no kuv twv tsim cov ntawv. Nco ntsoov muab lo rau thaum pib ntawm koj li VBS.
Huag, thiab nco ntsoov xaus lub npe ntawm txhua cov ntaub ntawv koj yuav tsim nrog cov lus txib qhia nrog.vbs.
Kauj Ruam 2: Ncua Koj VBS
Hauv qib no, kuv yuav qhia koj cov lus txib yooj yim los pab koj li VBS ua haujlwm kom raug. Qee zaum yam tsis muaj ncua koj tsab ntawv yuav tawg.
Thawj lo lus txib yog WScript.sleep. Koj yuav zoo li siv nws txhua lub sijhawm, nws ncua koj cov ntawv. Nov yog nws ua haujlwm li cas:
WScript.s pw 1000
Thawj ntu ntawm qhov hais kom ua yog qhov tseeb, hais kom ua (wow). Tom qab ntawd, koj muaj lub sijhawm uas yuav raug ncua. Txhua 1000 yog qhov ncaj ncees ntawm ib pliag.
Hauv qhov piv txwv hauv qab no muaj lub thawv ntawv yuav tshwm sim txhua txhua 3 vib nas this tom qab koj ntaus OK ntawm ib qho dhau los.
Kauj Ruam 3: Cov Lus thiab Cov Lus Taw Qhia
Tam sim no kuv yuav sim qhia koj li cas siv cov lus thiab cov thawv nkag thiab qhov piv txwv me ntsis ADVANCED uas koj tuaj yeem siv koj tus kheej.
Thawj qhov yooj yim tshaj plaws, lub thawv ntawv yooj yim thiab tsis muaj txim. Nov yog qhov piv txwv hais kom ua:
x = msgbox ("Koj cov lus", cov nyees khawm+hom ntawv xa, "Title")
Tom qab koj pib koj cov lus txib tsis txaus ntseeg, koj muaj cov lus, tom qab ntawd khawm, ntaus lub npov lus thiab nws lub npe. Muaj 5 hom sib txawv thiab 4 hom lub npov lus. Nov yog txhua tus ntawm lawv:
0 - OK khawm nkaus xwb 16 - Cov lus tseem ceeb icon1 - OK thiab Ncua tseg 32 - Ceeb toom cov lus nug icon2 - Abort, Rov qab thiab tsis quav ntsej 48 - Ceeb toom cov lus icon3 - Yog, Tsis yog thiab Ncua tseg 64 - Cov lus qhia icon4 - Yog thiab Tsis yog 5 - Rov ua dua thiab thim rov qab
Yog li nrog qhov ntawd, peb cov lus piv txwv yuav yog:
x = msgbox ("Xov", 0+16, "Title")
Tam sim no cov thawv nkag. Cov tsiaj nyaum no muaj qee tus neeg siv cuam tshuam ntau dua (wow), tab sis koj yuav tsis siv lawv ntau zaus (lossis tej zaum…). Nov yog qhov piv txwv:
y = InputBox ("Xov ntawm no", "Title ntawm no", "textbox message")
Pib qhov kev hais kom ua, ntaus cov lus, lub npe thiab cov ntawv xa xov. Yam khoom yooj yim.
Cia peb mus ntxiv me ntsis ntxiv. Tam sim no koj yuav pom lub thawv nkag ua raws los ntawm lub thawv ntawv uas muaj txhua yam koj tau ntaus hauv lub thawv nkag.
Npe = InputBox ("Sau koj lub npe hauv qab no", "Title", "Ntaus koj lub npe ntawm no") x = MsgBox ("Nyob Zoo" & Npe & "!", 16, "Nyob Zoo")
Cov lus hauv qab no nyuab nyuab dua. Ua ntej, koj muaj koj cov lus, tom qab ntawd qee yam koj tau sau ua ntej thiab tom qab ntawv txuas ntxiv. Tab sis tsis muaj dab tsi tawm ntawm qhov dog dig. Kuv xav.
Hauv cov ntawv hauv qab no koj tuaj yeem pom txhua lub thawv sib txawv thiab ib lub thawv nkag.
Kauj ruam 4: Qhib.exe Cov Ntaub Ntawv
Nrog VBScripts koj tseem tuaj yeem qhib.exe cov ntaub ntawv. Nov yog qhov piv txwv hais kom ua uas qhib lub laij lej:
WshShell.run "calc.exe"
Thaum pib koj muaj lus txib, thaum kawg koj muaj qhov program koj xav qhib. Tsis ntau los piav.
Cov ntaub ntawv hauv qab no yuav qhib lub laij lej, pleev xim thiab CMD.
Kauj ruam 5: Cov ntsiab lus
Hauv qhov kev qhia no koj tau kawm paub pib koj li ntawv.vbs, ncua nws, siv cov lus thiab cov thawv nkag, qhib.exe cov ntaub ntawv thiab xaus koj tsab ntawv. Tam sim no, cia mus vwm nrog qhov no. Kuv yuav tsim qhov tsis raug tab sis txaus ntshai prank rau troll koj cov phooj ywg.
Qhov piv txwv prank nug koj lub npe, qhia koj tias nws tsis yog lub tswv yim zoo thiab qhib zoo li CMD zoo li 30 zaug Kuv vam tias koj nyiam nyeem qhov no. Qhov no puas yog qhov ruam tshaj plaws? Koj puas tau kawm qee yam tshiab? Tsis pub dawb los qhia rau kuv hauv cov lus.
Pom zoo:
Cov Ncua Sijhawm Ncua Sijhawm: 19 Kauj Ruam (nrog Duab)
Cov Ncua Sij Hawm Ncua Sijhawm: Kev tsim lub tshuab ntaus suab paj nruag yog siv sijhawm, feem ntau nyuaj siab, thiab txheej txheem kim. Yog tias koj xav tias koj yuav txuag sijhawm thiab nyiaj txiag los ntawm kev ua koj tus kheej lub tsheb qeeb qeeb, Kuv qhia koj kom nyeem R.G. Keen nplooj ntawv ntawm kev lag luam ntawm pedal tsev
Yuav Tsim Li Cas thiab Ntxig Ib Lub Rooj Thiab Ntxiv Kab Ntxiv Thiab/lossis Kab Rau Cov Lus Hauv Microsoft Office Word 2007: 11 Cov Kauj Ruam
Yuav Tsim Li Cas thiab Ntxig Cov Lus Thiab Ntxiv Kab Ntxiv Thiab/lossis Kab Rau Cov Lus Hauv Microsoft Office Word 2007: Koj puas tau muaj cov ntaub ntawv ntau uas koj ua haujlwm nrog thiab xav rau koj tus kheej … " Kuv yuav ua li cas ntawm cov ntaub ntawv no saib zoo dua thiab nkag siab yooj yim dua? " Yog tias yog, tom qab ntawd lub rooj hauv Microsoft Office Word 2007 yuav yog koj cov lus teb
Lub Sijhawm Yooj Yim Ncua Sijhawm Circuit: 3 Cov Kauj Ruam (nrog Duab)
Lub Sij Hawm Sijhawm Yooj Yim Ncua Sijhawm: Kuv thaum kawg txiav txim siab ntxiv lwm txoj kab rau kuv tus tswj kev them nyiaj thiab kuv xav tau lub zog hluav taws xob ruaj khov hloov PWM uas tawm los ntawm cov tswj lub pob pov tseg yog li kuv tau ua qhov yooj yim me me Circuit Court coj PWM teeb liab thiab hloov mus rau qhov teeb liab DC tas mus li
Casting Yam Kom Paub Ntxiv: Cov Ntiv Tes Ntiv Tes (Uas Glow, Hloov Xim Nrog Tshav Kub, thiab Ntau Ntxiv ): 10 Cov Kauj Ruam (nrog Duab)
Casting Cov Lus Qhia Kom Paub: Cov Ntiv Tes Ntiv Tes (Uas Glow, Hloov Xim Nrog Tshav Kub, thiab Ntau Ntxiv …): Nov yog cov lus qhia hais txog kev nrum cov khoom me me, qhov nyuaj - pheej yig. Nws yuav tsum tau hais tias kuv tsis yog tus kws tshaj lij, tab sis raws li qhov xav tau feem ntau yog leej niam ntawm kev tsim khoom - qee cov txheej txheem ntawm no tau ua haujlwm zoo. Kuv tau ntsib Nigel Ackland ntawm Fest Yav Tom Ntej hauv London, thiab
Ua Koj Tus Kheej Cov Ntaub Ntawv Tu Lub Tshuab Kom Tsawg Tshaj $ 80 thiab Txuag Tau $ 3000 thiab Ntau Ntxiv: 6 Kauj Ruam (nrog Duab)
Ua Koj Tus Kheej Cov Ntaub Ntawv Tu Lub Tshuab Kom Tsawg Tshaj $ 80 thiab Txuag Tau $ 3000 thiab Ntau Ntxiv: Thov zam txim kuv cov lus Askiv.Kuv tom qab kuv pom lub suab zoo yas yas kuv muaj teeb meem txhua cov ntaub ntawv aficionado muaj. Yuav ua li cas ntxuav cov ntaub ntawv kom raug!? Muaj ntau txoj hauv kev ib puag ncig hauv Is Taws Nem. Txoj kev pheej yig dua li Knosti lossis Discofilm tab sis kuj