欢迎光临
我们一直在努力

Script Encoder 语法

建站超值云服务器,限时71元/月

script encoder syntax

screnc [/s] [/f] [/xl] [/l deflanguage ] [/e defextension] inputfile outputfile

argument

description

/s

optional. switch that specifies that the script encoder is to work silently; that is, produce no screen output. if omitted, the default is to provide verbose output.

/f

optional. specifies that the input file is to be overwritten by the output file. note that this option destroys your original input source file. if omitted, the output file is not overwritten.

/xl

optional. specifies that the <@language> directive is not added at the top of .asp files. if omitted, the <@language> directive is added for all .asp files.

/l deflanguage

optional. specifies the default scripting language (jscript or vbscript) to use during encoding. script blocks within the file being encoded that do not contain a language attribute are assumed to be of this specified language. if omitted, jscript is the default language for html pages and scriptlets, while vbscript is the default for asp. for plain text files, the file extension (either .js or .vbs) determines the default scripting language.

/e defextension

optional. associates the input file with a specific file type. use this switch when the input files extension doesnt make the file type obvious; that is, when the input file extension is not one of the recognized extensions, but the file content does fall into one of the recognized types. there is no default for this option. if a file with an unrecognized extension is encountered and this option is not specified, the script encoder fails for that unrecognized file. recognized file extensions are .asa, .asp, .cdx, .htm, .html, .js, .sct, and .vbs.

inputfile

required. the name of the input file to be encoded, including any necessary path information relative to the current directory.

outputfile

required. the name of the output file to be produced, including any necessary path information relative to the current directory.

——————————————————————————–

figure 3 encoding a page

public sub encodepage()

sample encoder

andrew clinick jan 1999

obviously this code could do with some error trapping etc

but it should give you the basics to get started

dim strhtml as string

get the frontpage document

dim mydoc as fphtmldocument

create a new instance of the scripting.encoder object

dim myencoder as new scripting.encoder

get the current active document

set mydoc = activedocument

get the html for the active document

strhtml = mydoc.documenthtml

call the encodescriptfile method with the html

strhtml = myencoder.encodescriptfile(".htm", strhtml, 0, "")

set the documenthtml to be the return html with encoded script

mydoc.documenthtml = strhtml

were done!

end sub

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » Script Encoder 语法
分享到: 更多 (0)