学员就业
推荐阅读
随机阅读
- 新建批处理--buildLinux.cmd
---------------------------------------------------------------------
delE:dailybuilderftpTemplinux
SecureCRT.EXE/s"192.168.0.2"/script"E:dailybuilderWebSiteToolsLinux.vbs"
copy/YE:dailybuilderftpTemplinux E:dailybuilderWebSitebuildFolder
REMTaskkill/IMSecureCRT.EXE/T
---------------------------------------------------------------------
新建VBScript文件--Linux.vbs
---------------------------------------------------------------------
#$language="VBScript"
#$interface="1.0"
Submain
'turnonsynchronousmodesowedon'tmissanydata
crt.Screen.Synchronous=True
If(Notcrt.Screen.WaitForString("username",8))Then
crt.Screen.SendvbCr
crt.Screen.WaitForString"username"
EndIf
crt.Screen.Send"cd/home/username/Coding"&VbCr
crt.Screen.WaitForString"Coding"
crt.Screen.Send"mk-cproject.plf"&VbCr
crt.Screen.WaitForString"Coding"
crt.Screen.Send"cd/home/username/Coding/product/linuxd"&VbCr
crt.Screen.WaitForString"linuxd"
crt.Screen.Send"ftp192.168.0.1"&VbCr
crt.Screen.WaitForString"Name"
crt.Screen.Send"ftpUser"&VbCr
crt.Screen.WaitForString"Password:"crt.Screen.Send"ftpPassword"&VbCr
'crt.Screen.WaitForString"ftp>"
'crt.Screen.Send"deletejx_linux_t"&VbCr
crt.Screen.WaitForString"ftp>"
crt.Screen.Send"put linux"&VbCr
crt.Screen.WaitForString"ftp>"
crt.Screen.Send"quit"&VbCr
crt.Screen.WaitForString"linuxd"
crt.Screen.Send"exit"&VbCr
crt.Sleep2000
'turnoffsynchronousmodetorestorenormalinputprocessing
crt.Screen.Synchronous=False
crt.Sleep2000
crt.Quit
EndSub
---------------------------------------------------------------------
附录(SecureCRT帮助):
ApplicationObjectPropertiesandMethods
Properties
Methods
ActivePrinter
GetTabCount
Dialog
GetTab
Screen
Sleep
Session
Quit
Version
Window
Properties
ActivePrinter
Description
Returnsorsetsthenameoftheactiveprinter.
Syntax
crt.ActivePrinter[=printerName]
Remarks
Read/Writestringproperty.
Example:
Ifcrt.ActivePrinter"SERVERInkJet2"Then
crt.ActivePrinter="SERVERInkJet2"
MsgBox"UpdatedPrinter"
EndIf
Dialog
Description
ReturnsareferencetoSecureCRT'sDialogobject.Syntax
Setobject=crt.Dialog
Remarks
SeetheDialogobjectdocumentationforadescriptionofitspropertiesandmethods.
Screen
Description
ReturnsareferencetoSecureCRT'sScreenobject.
Syntax
Setobject=crt.Screen
Remarks
Objectvariablesassignedfromthescreenpropertyrequirethe"Set"syntax.SeetheScreenobjectdocumentationforadescriptionofitspropertiesandmethods.
Session
Description
ReturnsareferencetoSecureCRT'sSessionobject.
Syntax
Setobject=crt.Session
Remarks
SeetheSessionobjectdocumentationforadescriptionofitspropertiesandmethods.
Version
Description
ReturnsastringcontainingSecureCRT'sversion.
Syntax
crt.Version
Remarks
Read-onlystringproperty
Example:
MsgBox"TheversionofSecureCRTis:"&crt.Version
Window
Description
ReturnsareferencetoSecureCRT'sWindowobject.
Syntax
Setobject=crt.Window
Remarks
SeetheWindowobjectdocumentationforadescriptionofitspropertiesandmethods.
Methods
GetTabCount
Description
Returnsthenumberoftabs.
Syntax
object=crt.GetTabCount
Remarks
None.
GetTab
Description
Returnsthetabobjectofthespecifiedindex.
Syntax
Setobject=crt.GetTabarg
Remarks
Thisdoesnotbringthetabtotheforeground.
Sleep
Description
Specifiesthetime(inmilliseconds)topausethescript'sexecution
Syntax
crt.Sleepmillisec
Remarks
TheamountoftimethatittakestoexecutetheSleep()methoditselfisafactorinhowlongthescriptpauses.Therefore,theaccuracyofinvokingSleepwithsmallvaluesof1or10millisecondswillbeaffectedbythisoverhead.
Example:
'SendaCRandpauseforonesecond
crt.Screen.SendvbCr
crt.Sleep1000
Quit
Description
CausesSecureCRTtoexit.
Syntax
crt.Quit
Remarks
AscriptthatinvokesQuitwillbeterminatedimmediatelyandcauseSecureCRTtoexit.
利用SecureCRT实现Linux编译
- 2009-08-02 10:31:05
浏览次数:0
网友评论 0 条
相关文章
[错误报告] [推荐] [收藏] [打印] [关闭] [返回顶部]

已有