标题: [转贴] VBS调用AU3 [打印本页]
作者: pusofalse 时间: 2009-4-11 00:00 标题: VBS调用AU3
au3提供了此方面的接口,可以弥补vbs对窗口管理/按键等方面的不足。需要先注册AutoItX3.Dll- ::注册
- regsvr32 AutoItX3.Dll
复制代码
- ::卸载
- regsvr32 /s /u AutoItX3.dll
复制代码
- AU3_AutoItSetOption
- AU3_BlockInput
- AU3_CDTray
- AU3_ClipGet
- AU3_ClipPut
- AU3_ControlClick
- AU3_ControlCommand
- AU3_ControlDisable
- AU3_ControlEnable
- AU3_ControlFocus
- AU3_ControlGetFocus
- AU3_ControlGetHandle
- AU3_ControlGetPosHeight
- AU3_ControlGetPosWidth
- AU3_ControlGetPosX
- AU3_ControlGetPosY
- AU3_ControlGetText
- AU3_ControlHide
- AU3_ControlListView
- AU3_ControlMove
- AU3_ControlSend
- AU3_ControlSetText
- AU3_ControlShow
- AU3_ControlTreeView
- AU3_DriveMapAdd
- AU3_DriveMapDel
- AU3_DriveMapGet
- AU3_IniDelete
- AU3_IniRead
- AU3_IniWrite
- AU3_Init
- AU3_IsAdmin
- AU3_MouseClick
- AU3_MouseClickDrag
- AU3_MouseDown
- AU3_MouseGetCursor
- AU3_MouseGetPosX
- AU3_MouseGetPosY
- AU3_MouseMove
- AU3_MouseUp
- AU3_MouseWheel
- AU3_Opt
- AU3_PixelChecksum
- AU3_PixelGetColor
- AU3_PixelSearch
- AU3_ProcessClose
- AU3_ProcessExists
- AU3_ProcessSetPriority
- AU3_ProcessWait
- AU3_ProcessWaitClose
- AU3_RegDeleteKey
- AU3_RegDeleteVal
- AU3_RegEnumKey
- AU3_RegEnumVal
- AU3_RegRead
- AU3_RegWrite
- AU3_Run
- AU3_RunAsSet
- AU3_RunWait
- AU3_Send
- AU3_Shutdown
- AU3_Sleep
- AU3_StatusbarGetText
- AU3_ToolTip
- AU3_WinActivate
- AU3_WinActive
- AU3_WinClose
- AU3_WinExists
- AU3_WinGetCaretPosX
- AU3_WinGetCaretPosY
- AU3_WinGetClassList
- AU3_WinGetClientSizeHeight
- AU3_WinGetClientSizeWidth
- AU3_WinGetHandle
- AU3_WinGetPosHeight
- AU3_WinGetPosWidth
- AU3_WinGetPosX
- AU3_WinGetPosY
- AU3_WinGetProcess
- AU3_WinGetState
- AU3_WinGetText
- AU3_WinGetTitle
- AU3_WinKill
- AU3_WinMenuSelectItem
- AU3_WinMinimizeAll
- AU3_WinMinimizeAllUndo
- AU3_WinMove
- AU3_WinSetOnTop
- AU3_WinSetState
- AU3_WinSetTitle
- AU3_WinSetTrans
- AU3_WinWait
- AU3_WinWaitActive
- AU3_WinWaitClose
- AU3_WinWaitNotActive
- AU3_error
复制代码
以下是在记事本失去焦点的情况下发送按键的例子。- Option Explicit
- Dim oAutoIt, sTitle, iMinimize, iRestore, sControlID
- iMinimize = 6
- iRestore = 9
- sControlID = "Edit1"
- sTitle = "无标题 - 记事本"
- Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
- oAutoIt.Run "C:\Windows\Notepad.exe"
- oAutoIt.WinWait sTitle
- oAutoIt.WinSetState sTitle, "", iMinimize
- oAutoIt.ControlSend sTitle, "", sControlID, "Test"
- oAutoIt.WinSetState sTitle, "", iRestore
- oAutoIt.WinClose sTitle, "Test"
- oAutoIt.WinWait "记事本", "已经改变"
- oAutoIt.ControlClick "记事本", "已经改变", "Button2"
复制代码
AutoItX3下载:
http://pan.baidu.com/share/link?shareid=3652782989&uk=1124163200
作者: lxzzr 时间: 2009-4-11 00:29
很好的一个贴子!!!!
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |