Robot里怎么执行一个DOS命令
一段脚本里,想加入执行DOS命令,如ftp somehost,怎么执行?可以参考Shell命令.本人没试验过:)
可以参考Shell命令.本人没试验过:)如果成功不妨告诉下
可以参考Shell命令.本人没试验过:)
可以参考Shell命令.本人没试验过:)如果成功不妨告诉下 是要在命令行里输? 以下这段函数实现了向目标计算机发送消息的功能:
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Declare Function SendMsg(computer as string,txt as string)
Function SendMsg(computer as string,txt as string)
dim operate as string
operate="/c net send " & computer & " " & txt
shellexecute 0,"open","cmd.exe",operate,"c:\",0
End Function
将其中的 Net Send 命令换成你所需要的 DOS 命令就可以了 InputKeys "{LEFTWIN}"
InputKeys "r"
InputKeys "ftp somehost{ENTER}"
:$ Window SetContext, "Class=Shell_TrayWnd", ""
PushButton Click, "Text=开始"
Window SetContext, "Caption=「开始」菜单", ""
ListView Click, "ObjectIndex=2;\;ItemText=运行(R)...", ""
Window SetContext, "Caption=运行", ""
InputKeys "cmd{ENTER}"
Window SetContext, "Caption=C:\WINDOWS\system32\cmd.exe", ""
InputKeys "...(Dos commonds)..."
^_^:$
[ 本帖最后由 wonderswan 于 2006-2-5 10:14 编辑 ] startapplication "cmd"
Window SetContext, "Caption=C:\WINDOWS\system32\cmd.exe", ""
nputKeys "...(Dos commonds)..."
页:
[1]