51Testing软件测试论坛

标题: Robot里怎么执行一个DOS命令 [打印本页]

作者: aries1979    时间: 2006-1-18 15:54
标题: Robot里怎么执行一个DOS命令
一段脚本里,想加入执行DOS命令,如ftp somehost,怎么执行?
作者: bushmen    时间: 2006-1-19 10:26
标题: 可以参考Shell命令.本人没试验过:)
可以参考Shell命令.本人没试验过
如果成功不妨告诉下
作者: bushmen    时间: 2006-1-19 10:28
标题: 可以参考Shell命令.本人没试验过:)
可以参考Shell命令.本人没试验过
如果成功不妨告诉下
作者: ilovejolly    时间: 2006-1-20 08:37
是要在命令行里输?
作者: guirongb    时间: 2006-1-23 14:15
以下这段函数实现了向目标计算机发送消息的功能:

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 命令就可以了
作者: san    时间: 2006-1-24 17:31
InputKeys "{LEFTWIN}"
    InputKeys "r"
    InputKeys "ftp somehost{ENTER}"


作者: wonderswan    时间: 2006-2-5 10:03
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 编辑 ]
作者: youyun    时间: 2006-2-28 20:57
startapplication "cmd"
Window SetContext, "Caption=C:\WINDOWS\system32\cmd.exe", ""
nputKeys "...(Dos commonds)..."




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2