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