Use securecrt for Linux Compilation

Source: Internet
Author: User
Create a batch -- buildlinux. cmd ---------------------------------------------------------------------
Del E: \ dailybuilder \ ftptemp \ Linux
Securecrt. exe / S " 192.168.0.2 "   / Script " E: \ dailybuilder \ website \ tools \ Linux. vbs "
Copy / Y e: \ dailybuilder \ ftptemp \ Linux E: \ dailybuilder \ website \ buildfolder \
Rem taskkill / Im securecrt. exe / T
---------------------------------------------------------------------

Create a VBScript file-linux. vbs ---------------------------------------------------------------------
# $ Language= "VBScript"
# $Interface = "1.0"

Sub main
' Turn on synchronous mode so we don ' T miss any data
CRT. Screen. synchronous = True
If (not CRT. Screen. waitforstring ( " Username " , 8 ) Then
CRT. Screen. Send vbcr
CRT. Screen. waitforstring " Username "
End if

CRT. Screen. Send " CD/home/username/Coding "   & Vbcr
CRT. Screen. waitforstring " Coding "
CRT. Screen. Send " MK-C Project. PLF "   & Vbcr
CRT. Screen. waitforstring " Coding "
CRT. Screen. Send " CD/home/username/coding/product/linuxd "   & Vbcr
CRT. Screen. waitforstring " Linuxd "
CRT. Screen. Send " FTP 192.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 "delete jx_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. Sleep 2000
' Turn Off synchronous mode to restore normal Input Processing
CRT. Screen. synchronous = False
CRT. Sleep 2000
CRT. Quit
End sub
---------------------------------------------------------------------

Appendix (securecrt help ): Application object properties and Methods

Properties
Methods
 
Activeprinter
Gettabcount
 
Dialog
Gettab
 
Screen
Sleep
 
Session
Quit
 
Version

 
Window

 

 

Properties

 

Activeprinter

Description

Returns or sets the name of the active printer.

Syntax

CRT. activeprinter [= printername]

Remarks

Read/write string property.

Example:

If CRT. activeprinter "\ Server \ inkjet2" then

CRT. activeprinter = "\ Server \ inkjet2"

Msgbox "updated printer"

End if

 

Dialog

Description

Returns a reference to securecrt's dialog object.

Syntax

Set object = CRT. Dialog

Remarks

See the dialog object documentation for a description of its properties and methods.

 

Screen

Description

Returns a reference to securecrt's screen object.

Syntax

Set object = CRT. Screen

Remarks

Object variables assigned from the screen property require the "set" syntax. See the Screen Object documentation for a description of its properties and methods.

 

Session

Description

Returns a reference to securecrt's session object.

Syntax

Set object = CRT. Session

Remarks

See the session object documentation for a description of its properties and methods.

 

Version

Description

Returns a string containing securecrt's version.

Syntax

CRT. Version

Remarks

Read-Only string Property

 

Example:

Msgbox "the version of securecrt is:" & CRT. Version

 

Window

Description

Returns a reference to securecrt's window object.

Syntax

Set object = CRT. Window

Remarks

See the window object documentation for a description of its properties and methods.

 

 

Methods

Gettabcount

Description

Returns the number of tabs.

Syntax

Object = CRT. gettabcount

Remarks

None.

 

Gettab

Description

Returns the tab object of the specified index.

Syntax

Set object = CRT. gettab ARG

Remarks

This does not bring the tab to the foreground.

 

Sleep

Description

Specifies the time (in milliseconds) to pause the script's execution

Syntax

CRT. Sleep millisec

Remarks

The amount of time that it takes to execute the sleep () method itself is a factor in how long the script pauses. therefore, the accuracy of invoking sleep with small values of 1 or 10 milliseconds will be affected by this overhead.

 

Example:

'Send a Cr and pause for one second

CRT. Screen. Send vbcr

CRT. Sleep 1000

 

Quit

Description

Causes securecrt to exit.

Syntax

CRT. Quit

Remarks

A script that invokes quit will be terminated immediately and cause securecrt to exit.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.