VBS腳本入門
A. vbs腳本教程
VBS病毒的原理與防護(轉帖
B. 如何編寫wincc 按鈕的vbs腳本
i/o域的屬性中輸入輸出屬性連接變數a,
按鈕腳本:事件中 點擊左鍵
Dim a
set a=hmiruntime.tags("a")
a.read
hmiruntime.tags("b").write a.value
你試試
C. 璋佽兘甯鎴戠紪涓猇BS鐨勮剼鏈,瑕佹眰瑕佷竴鐩存寜涓婼HIFT閿
vbs浣跨敤sendkeys妯℃嫙鎸夐敭錛屼竴嬈″彧鑳芥寜涓嬈★紙鎸囧畾嬈℃暟錛夛紝涓嶈兘鈥滄寜浣忎笉鏀鋸濄傚彧鑳介氳繃寰鐜妯℃嫙涓嶅仠鍦版寜shift閿錛屼絾榪欎釜璺熶綘鐨勮佹眰灝變笉涓鑷翠簡銆
浣犲彲浠ュ皾璇曠敤AutoIt鑴氭湰鎴栨寜閿綺劇伒鑴氭湰銆侫utoIt瑕佹寜浣(淇濇寔鎸変笅鐘舵)shift閿
Send("{SHIFTDOWN}") ;鎸変綇shift閿
鐒跺悗鐢℉otKeySet璁劇疆涓涓鐑閿鐢ㄤ簬鍋滄錛屽仠姝㈢殑浠g爜錛
Send("{SHIFTUP}") ;鏉懼紑shift閿
AutoIt鍙浠ョ紪璇戜負exe鏂囦歡鐩存帴榪愯岀殑錛堝嵆浣跨數鑴戞病瑁匒utoIt涔熷彲浠ヨ繍琛岋級銆
涓嬮潰鏄鍙傝冪▼搴忥紙浣跨敤GUI涓婄殑鎸夐挳鏉ユ帶鍒訛級錛
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("鎸夐敭鎺у埗", 156, 65, 192, 114, -1, $WS_EX_TOPMOST)
$Button1 = GUICtrlCreateButton("鎸変笅Shift", 40, 16, 81, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If GUICtrlRead($Button1) == "鎸変笅Shift" Then
Send("{SHIFTDOWN}")
GUICtrlSetData($Button1, "寮硅搗Shift")
ElseIf GUICtrlRead($Button1) == "寮硅搗Shift" Then
Send("{SHIFTUP}")
GUICtrlSetData($Button1, "鎸変笅Shift")
EndIf
EndSwitch
WEnd