aries1979 发表于 2006-1-18 15:54:47

Robot里怎么执行一个DOS命令

一段脚本里,想加入执行DOS命令,如ftp somehost,怎么执行?

bushmen 发表于 2006-1-19 10:26:58

可以参考Shell命令.本人没试验过:)

可以参考Shell命令.本人没试验过:)
如果成功不妨告诉下

bushmen 发表于 2006-1-19 10:28:17

可以参考Shell命令.本人没试验过:)

可以参考Shell命令.本人没试验过:)
如果成功不妨告诉下

ilovejolly 发表于 2006-1-20 08:37:28

是要在命令行里输?

guirongb 发表于 2006-1-23 14:15:35

以下这段函数实现了向目标计算机发送消息的功能:

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:34

InputKeys "{LEFTWIN}"
    InputKeys "r"
    InputKeys "ftp somehost{ENTER}"

:$

wonderswan 发表于 2006-2-5 10:03:45

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:18

startapplication "cmd"
Window SetContext, "Caption=C:\WINDOWS\system32\cmd.exe", ""
nputKeys "...(Dos commonds)..."
页: [1]
查看完整版本: Robot里怎么执行一个DOS命令