佳木斯湛栽影视文化发展公司

主頁(yè) > 知識(shí)庫(kù) > vbs-toolkit VBSEdit 提供 免費(fèi)的COM組件

vbs-toolkit VBSEdit 提供 免費(fèi)的COM組件

熱門(mén)標(biāo)簽:呼叫中心市場(chǎng)需求 智能手機(jī) 銀行業(yè)務(wù) 網(wǎng)站文章發(fā)布 服務(wù)器配置 鐵路電話系統(tǒng) 美圖手機(jī) 檢查注冊(cè)表項(xiàng)

VBSCRIPT 語(yǔ)法簡(jiǎn)單 強(qiáng)大 但是功能上明顯不足 需要第三方的控制 e.g. COM 組件來(lái)擴(kuò)展其功能. VBSEDIT 安裝完之后就可以在安裝目錄下發(fā)現(xiàn) 免費(fèi)提供的 COM 組件 vbs toolkit.

下載 VBSEDIT 工具

32 位 DLL: vbsedit32 60 VBSEdit 提供
64 位 DLL: vbsedit64 61 VBSEdit 提供

注冊(cè)組件

注冊(cè)組件需要管理員權(quán)限. 可以運(yùn)行下面命令分別注冊(cè) 32, 64 位的VBSEDIT 工具箱.

regsvr32 vbsedit32.dll
regsvr32 vbsedit64.dll

注銷(xiāo)的時(shí)候則需要 加 /u 參數(shù)

regsvr32 /u vbsedit32.dll
regsvr32 /u vbsedit64.dll

提供了一些方便的功能擴(kuò)展 比如剪貼板.

Set toolkit = CreateObject("VbsEdit.Toolkit")
toolkit.PutClipboardText "Hello World" 
WScript.Echo toolkit.GetClipboardText() 

CLIPBOARD OPERATIONS

GetClipboardText method

1、獲取剪切板中的文本內(nèi)容

Set toolkit = CreateObject("VbsEdit.Toolkit")
WScript.Echo toolkit.GetClipboardText() 

PutClipboardText method

2、將指定內(nèi)容設(shè)置到剪切板中

Set toolkit = CreateObject("VbsEdit.Toolkit")
toolkit.PutClipboardText "Hello World"

運(yùn)行后就將剪切板的數(shù)據(jù)設(shè)置為 Hello World

DIALOG BOXES

OpenFileDialog method
Prompt the user to open a file
toolkit.OpenFileDialog ([initialFolder,[filters,[multiselect,[title]]]])

'Opens a single file
Set toolkit = CreateObject("VbsEdit.Toolkit")
files=toolkit.OpenFileDialog("c:\scripts\","Text Files (*.txt)|*.txt",False,"Open a text file")
If UBound(files)>=0 Then
 WScript.Echo files(0)
Else
 Wscript.Quit
End If
 
'Opens multiple files
Set toolkit = CreateObject("VbsEdit.Toolkit")
files=toolkit.OpenFileDialog("c:\scripts\","Text Files (*.txt)|*.txt",True,"Open a text file")
If UBound(files)>=0 Then
 For Each filepath In files
  WScript.Echo filepath
 Next
Else
 Wscript.Quit
End If

上面的代碼就是打開(kāi)只可以輸入一個(gè)文件的對(duì)話框,第二段就是可以選擇多個(gè)文件的對(duì)話框

SaveFileDialog method

Prompt the user to save a file
toolkit.SaveFileDialog ([initialFolder,[initialFilename,[filters,[title]]]])

Set toolkit = CreateObject("VbsEdit.Toolkit")
filepath = toolkit.SaveFileDialog("c:\scripts","test.txt","Text Files (*.txt)|*.txt")
 
If Not(IsNull(filepath)) Then
 Set objFSO = CreateObject("Scripting.FileSystemObject")
 Set objFile = objFSO.CreateTextFile(filepath,True)
 objFile.WriteLine Date
 objFile.Close
Else
 Wscript.Quit
End If

上面的代碼就是另存為 文本文件對(duì)話框

SelectFolder method

Prompt the user to select a folder
toolkit.SelectFolder ([initialDir,[title]])

Set toolkit = CreateObject("VbsEdit.Toolkit")
myfolder=toolkit.SelectFolder("c:\scripts\","Please select a folder")
 
If Not(IsNull(myfolder)) Then
 WScript.Echo myfolder
Else
 Wscript.Quit
End If

上面的就是瀏覽文件夾對(duì)話框

ENUMERATING WINDOWS

TopLevelWindows method
Enumerates top level windows

Set toolkit = CreateObject("VbsEdit.Toolkit")
For each window in toolkit.TopLevelWindows()
 WScript.Echo window.WindowTitle
 WScript.Echo window.ProcessId
Next

枚舉頂級(jí)窗口

Window object

ClassName
Retrieves the name of the class to which the specified window belongs.

WindowTitle
Retrieves the title of the specified window's title bar or the text of the control if the specified window is a control.

DlgCtrlID
Retrieves the identifier of the specified control.

Height
Retrieves the height of the specified window.

Width
Retrieves the width of the specified window.

X
Retrieves the X coordinate of the upper-left corner of the specified window.

Y
Retrieves the Y coordinate of the upper-left corner of the specified window.

IsVisible
Determines the visibility state of the specified window.

ProcessId
Retrieves the identifier of the process that created the specified window.

Click method
Sends a mouse click event to the specified window.
window.Click ([offsetX ,[offsetY]])
If offsetX and offsetY are not specified, the event is sent into the middle of the window.

SendText method
Sends text to the specified window.
window.SendText text

ChildWindows method
Enumerates the child windows that belong to the specified parent window.

–EOF (The Ultimate Computing Technology Blog) —

您可能感興趣的文章:
  • 記逆向小白的第一次vbsedit 9爆破及內(nèi)存補(bǔ)丁制作過(guò)程

標(biāo)簽:新疆 紅河 河南 沈陽(yáng) 上海 樂(lè)山 長(zhǎng)治 滄州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《vbs-toolkit VBSEdit 提供 免費(fèi)的COM組件》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    盈江县| 曲阳县| 达尔| 濮阳市| 张北县| 乃东县| 介休市| 汽车| 咸阳市| 蕲春县| 东港市| 内丘县| 临夏市| 东乌珠穆沁旗| 长海县| 吉水县| 梁平县| 准格尔旗| 双牌县| 九江市| 宁远县| 建宁县| 赤水市| 峨眉山市| 尼玛县| 宣武区| 西城区| 普宁市| 荥经县| 湘潭县| 临安市| 赞皇县| 宁陕县| 兴业县| 顺义区| 怀集县| 泰安市| 双柏县| 聂拉木县| 沽源县| 新邵县|