Script Encoder Syntax

Source: Internet
Author: User
encode| Syntax Script encoder Syntax

Screnc [/S] [f] [/XL] [/L deflanguage] [/e defextension] inputfile outputfile

Argument
Description

/s
Optional. Switch that specifies that script encoder are to work silently; That is, produce no screen output. If omitted, the default is to provide verbose output.

/F
Optional. Specifies that the ' input ' is overwritten by the output file. This option destroys your original input source file. If omitted, the output file is not overwritten.

/xl
Optional. Specifies that the < @language > directive isn't added at the top of. asp files. If omitted, the < @language > directive is added to 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 does not contain a language attributes are assumed to is of this specified l Anguage. If omitted, the JScript is the default language for HTML pages and scriptlets, while the in-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 file ' s extension doesn ' t make the file type obvious; The ' is ', when the ' input ' is ' not ' recognized extensions, but the file content does fall into one of The recognized types. There is no default to this option. If a file with an unrecognized extension are encountered and this option are not specified, the script encoder fails for tha T unrecognized file. Recognized file extensions are. asa,. asp,. CDX,. htm,. html,. js,. SCT, and. vbs.

Inputfile
Required. The name of the input file to is encoded, including any necessary path information relative to the current directory.

OutputFile
Required. The name of the output file to is produced, including any necessary path information relative to the current directory.





--------------------------------------------------------------------------------

Figure 3 Encoding a Page



Public Sub Encodepage ()
' Sample encoder
' Andrew Clinick 1999
' Obviously this code could does with some error trapping etc
' But it should give 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 is the return HTML with encoded script
MyDoc. documenthtml = strHTML
' We ' re done!
End Sub



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.