Saturday, December 15, 2012

Notepad ကို သူကိုယ္တိုင္ေရး ေအာင္ လုပ္ၾကည့္ရမယ္


၁။ notepad ကိုဖြင့္ပါ
၂။ ဒီေအာက္က script ကို notepad ထဲကို ကူးထည့္လိုက္ပါ။
set wshshell = wscript.CreateObject("wscript.shell")
wshshell.run "Notepad"
wscript.sleep 2000
wshshell.AppActivate "Notepad"
WshShell.SendKeys "H"
WScript.Sleep 500

WshShell.SendKeys "ell"
WScript.Sleep 500
WshShell.SendKeys "o "


ဒီ script ကေလးက noptepad ကို သူကိုယ္တိုင္သူ႔ေပၚမွာ Hello ဆိုပီးေတာ့ ေရးေစပါလိမ့္မယ္။ သင္ႀကိဳက္တဲ့ စာကိုလဲ "......" ႏွစ္ခု ၾကားထဲမွာ ထည့္လို႔ရပါတယ္။

ေနာက္ပီးေတာ့ သင္ႀကိဳက္သေလာက္လဲ လိုင္းေတြထပ္ထည့္လို႔ရပါတယ္ ဒီေအာက္မွာ ျပထားသလိုမ်ိဳးေပါ့ဗ်ာ ............

WScript.Sleep 500
WshShell.SendKeys "insert here your letter of group of letters "

၃။ ပီးရင္ ဒီဖိုင္ေလးကို File>Save as ဆိုပီးေတာ့ save ပါ။ file extension က *.vbs ပါ။ ဥပမာအားျဖင့္ နာမည္က notepad ဆိုရင္ (notepad.vbs) လို႔ save ရပါမယ္။ ေအာ ဒါနဲ႔
file type ေနရာမွာက All File ဆိုတာကို ေရြးေပးရမယ္ေနာ္။
ေနာက္ပီးရင္ အဲ့ save ထားတဲ့ ဖိုင္ကို run လိုက္ရင္ ဒီလိုေပၚလာပါလိမ့္မယ္။

၄။ သင္က အဲ့ဒီ icon ကို doubleclick လုပ္လုိက္ရင္ ။ notepad ပြင့္လာပီးေတာ့ Hello ဆိုပီးေတာ့ run ပါလိမ့္မယ္။

No comments:

Post a Comment