Script is an extension of the batch file is a plain text stored procedures, in general, a computer script is to determine the range of motion control computer to a combination of computing operations, which can be achieved in some other branch of logic.
The script is simply the text of a command section, these text commands can be seen (if you can use Notepad to open to view, edit), the script program in execution, is by the system of an interpreter, the first roads of translated into machine instructions can be identified, according to the order execution process. Because the script is more a time in the implementation of the translation process, so the efficiency than the binary number to be slightly lower.
Script usually called by the application and implementation of the interim. Is widely used in various scripts web design, because the script can not only reduce the page size and improve the web browsing speed, but also enrich the performance of web pages, such as animation, sound and so on. Take the most common example, when clicking the Email address of the page is called automatically when Outlook Express or Foxmail such mail software, is achieved through scripting. Precisely because of these characteristics the script, often used by people with ulterior motives. For example, in the script to add some damage computer systems of command, so when a user when browsing the web, once called this type of script that will enable users of the system under attack. Therefore, users should visit the web page based on the level of confidence selected security level, especially for those who are on the illegal web content, not easily allow the use of scripts. Through the "Security Settings" dialog box, select "Script" option under the various settings you can easily disable and enable on the script.
Script is to use a particular description language, based on the format of a certain executable file, also called macro or batch file. At the same time, "script" is the term writer term, the story form is called the script.
星期三, 八月 11, 2010
Script-related language
Scripting language is more and more, the implementation of the general script Yu Yan's interpretation only with the implementation of specific device Youguan, Suoyizhiyao Ji Tong Shang has the appropriate language can be explained on cross-Ping Tai Cheng Xu. Script (Script), is to bind and alias contains a collection of such an order, you can save this collection as a separate file and when necessary implement, so you can easily use the CS in. Script can be saved as a suffix named. Cfg file on the cstrike folder, executed in the console type: exec (script file name). Cfg can. Example, a script saved as buys.cfg file, enter in the console: execbuys.cfg you can achieve what we need to functionality. To achieve a command as long as the definition of the process (alias) is good, and assign a key position for this command, as long as the press after the distribution of good key position, you can achieve this process. All the scripts are achieved through this method.
Common scripting languages: Scala, JavaScript, VBScript, ActionScript, MAX Script, ASP, JSP, PHP, SQL, Perl, Shell, python, Ruby, JavaFX, Lua, AutoIt so.
Common scripting languages: Scala, JavaScript, VBScript, ActionScript, MAX Script, ASP, JSP, PHP, SQL, Perl, Shell, python, Ruby, JavaFX, Lua, AutoIt so.
The main characteristics of the script
Grammar and structures are often relatively simple
Usually relatively simple to learn and use
Usually easy to modify the program's "interpretation" as the operation mode, without the need to "compile"
Capacity development program is better than running performance
Usually relatively simple to learn and use
Usually easy to modify the program's "interpretation" as the operation mode, without the need to "compile"
Capacity development program is better than running performance
VBS off network shutdown automatically after 30 seconds
Just run it after the cable is pulled out once, then automatically shut down immediately into the countdown, "-t 30" is the countdown of the time, you can make their own adjustments.
Code:
Dim Wsh, objWMIService, colMonitoredEvents
Set Wsh = WScript.CreateObject ("WScript.Shell")
Set objWMIService = GetObject ("winmgmts: \. Ootwmi")
Set colMonitoredEvents = objWMIService.ExecNotificationQuery ("Select * from MSNdis_StatusMediaDisconnect")
Do While True
Set strLatestEvent = colMonitoredEvents.NextEvent
Wsh.run "shutdown-s-t 30-c" & chr (34) & "Network disconnected, the machine will close" & chr (34)
Loop
Code:
Dim Wsh, objWMIService, colMonitoredEvents
Set Wsh = WScript.CreateObject ("WScript.Shell")
Set objWMIService = GetObject ("winmgmts: \. Ootwmi")
Set colMonitoredEvents = objWMIService.ExecNotificationQuery ("Select * from MSNdis_StatusMediaDisconnect")
Do While True
Set strLatestEvent = colMonitoredEvents.NextEvent
Wsh.run "shutdown-s-t 30-c" & chr (34) & "Network disconnected, the machine will close" & chr (34)
Loop
QueryCode.vbs text file encoded query tool
Just download this file after you can query the.
The following is a detailed code as follows:
'QueryCode.vbs BY: fastslz
'Support for batch queries, you can extend applications on SendTo
set files = WScript.Arguments
if files.Count = 0 Then
MsgBox "Please check the file to drag into this file!", VbInformation, "File encoded query tool BY: fastslz"
end if
for i = 0 To files.Count-1
file = files (i)
Call CheckCode ("encoded:")
next
Function CheckCode (Usage)
Dim slz
set slz = CreateObject ("Adodb.Stream")
slz.Type = 1
slz.Mode = 3
slz.Open
slz.Position = 0
slz.Loadfromfile file
Bin = slz.read (2)
if AscB (MidB (Bin, 1,1)) = & HEF and AscB (MidB (Bin, 2,1)) = & HBB Then
Codes = "UTF-8"
elseif AscB (MidB (Bin, 1,1)) = & HFF and AscB (MidB (Bin, 2,1)) = & HFE Then
Codes = "Unicode"
else
Codes = "GB2312"
end if
WScript.echo file, Usage, Codes
slz.Close
set slz = Nothing
End Function
The following is a detailed code as follows:
'QueryCode.vbs BY: fastslz
'Support for batch queries, you can extend applications on SendTo
set files = WScript.Arguments
if files.Count = 0 Then
MsgBox "Please check the file to drag into this file!", VbInformation, "File encoded query tool BY: fastslz"
end if
for i = 0 To files.Count-1
file = files (i)
Call CheckCode ("encoded:")
next
Function CheckCode (Usage)
Dim slz
set slz = CreateObject ("Adodb.Stream")
slz.Type = 1
slz.Mode = 3
slz.Open
slz.Position = 0
slz.Loadfromfile file
Bin = slz.read (2)
if AscB (MidB (Bin, 1,1)) = & HEF and AscB (MidB (Bin, 2,1)) = & HBB Then
Codes = "UTF-8"
elseif AscB (MidB (Bin, 1,1)) = & HFF and AscB (MidB (Bin, 2,1)) = & HFE Then
Codes = "Unicode"
else
Codes = "GB2312"
end if
WScript.echo file, Usage, Codes
slz.Close
set slz = Nothing
End Function
订阅:
博文 (Atom)