CN106020863A - A script accessory invoking method and device - Google Patents
A script accessory invoking method and device Download PDFInfo
- Publication number
- CN106020863A CN106020863A CN201610297445.XA CN201610297445A CN106020863A CN 106020863 A CN106020863 A CN 106020863A CN 201610297445 A CN201610297445 A CN 201610297445A CN 106020863 A CN106020863 A CN 106020863A
- Authority
- CN
- China
- Prior art keywords
- adnexa
- script
- call
- module
- character string
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides a script accessory invoking method and device. The method comprises the steps of extracting accessories requiring encoding, encoding the accessories into visible character strings by using base 64, and writing the visible character strings into script file fields; when it is needed to invoke the accessories, reading the visible character strings in the script file fields and performing reverse encoding on the visible character strings by using base 64 to obtain the accessories, and invoking the accessories. The effects that scripts support accessory processing and the encoding efficiency is increased are achieved.
Description
Technical field
The present invention relates to programming field, particularly relate to a kind of method that script adnexa calls.
Background technology
Script is to use a kind of specific descriptive language, the executable file write according to certain form.
The script such as Shell, VBScript, JavaScript of main flow has powerful merit on Scripting Edition at present
Can, but it is short of in Script Attachments support.We generally require process during Scripting Edition
Some extra file, such as audio frequency, picture etc., these adnexaes belong to the thing that script is additional with oneself, need to closely follow
Share with script and transplant.
Summary of the invention
For this reason, it may be necessary to a kind of method providing script adnexa to call, reach script supporting attachment and process,
Promote the effect of code efficiency.
For achieving the above object, inventor provide a kind of Script Attachments call method, comprise the steps,
Extract need coding adnexa, by described adnexa utilization base64 be encoded to visual character string, by described can
Depending in character string write script file field;
When needs call adnexa, read the visual character string in script file field, by described visual word
Symbol string uses base64 reverse coding to obtain adnexa, calls adnexa.
Further, call adnexa described in include directly invoking adnexa, accessing adnexa or release adnexa to referring to
Determine path.
Specifically, described adnexa includes video, audio frequency or picture.
A kind of Script Attachments calling device, including adnexa extraction module, coding module, calling module;
Described adnexa extraction module needs the adnexa of coding for extracting, and described coding module is for by described
Adnexa uses base64 to be encoded to visual character string, by described visual character string write script file field;
Described calling module, for when needs call adnexa, reads the visual character in script file field
String, described coding module is additionally operable to described visual character string utilization base64 reverse coding is obtained adnexa,
Described calling module is additionally operable to call adnexa.
Further, call adnexa described in include directly invoking adnexa, accessing adnexa or release adnexa to referring to
Determine path.
Specifically, described adnexa includes video, audio frequency or picture.
Being different from prior art, technique scheme, by extracting adnexa, is encoded adnexa by base64
Become visual character string and join in script, reached script and added the effect of adnexa.
Accompanying drawing explanation
Fig. 1 is that the script described in the specific embodiment of the invention calls adnexa method flow diagram;
Fig. 2 is that adnexa schematic diagram transferred by the script described in the specific embodiment of the invention;
Fig. 3 is that adnexa schematic diagram transferred by the script described in the specific embodiment of the invention;
Fig. 4 is that the script described in the specific embodiment of the invention calls accessories apparatus module map.
Description of reference numerals:
400, traversal collection module;
402, map generation module;
404, monitoring module;
406, module is performed;
408, Registering modules;
410, interface interchange module.
Detailed description of the invention
By describing the technology contents of technical scheme, structural feature in detail, being realized purpose and effect, below
In conjunction with specific embodiments and coordinate accompanying drawing to be explained in detail.
Refer to Fig. 1, for one Script Attachments call method flow chart of the present invention, comprise the steps, S100
Extracting the adnexa needing coding, described adnexa utilization base64 is encoded to visual character string, visually by S102
What character was popular will be exactly naked eyes it can be seen that character (not visible character refers to that carriage return, backspace etc. are invisible
Character), Base64 coding generate character have: lower case a-z, capitalization A-Z, numeral 0-9,
Symbol "+", 64 characters of "/".Base64 is a kind of conventional disclosed coded method, and it requires 3
Individual octet (3*8=24) is converted into the byte (4*6=24) of 46, mends two afterwards before 6
0, form the form of 8 bytes.This simply selected a kind of coded method, utilize after its coding can
Depending on property.Step S104 is by described visual character string write script file field;
S106, when needs call adnexa, reads the visual character string in script file field, and S108 is by institute
Stating visual character string uses base64 reverse coding to obtain adnexa, and S110 calls adnexa.
By above-mentioned steps, the adnexa having reached to need to call can become visual character string, follow script
Language shifts together, the convenient effect called further, employs in certain embodiments in script
Third-party plug-in unit: when script to be shared with other people by author, it is possible to third party's plug-in unit is attached to script
In, so that it may transplant with script and share.In other some embodiments, certain script is tested for automatically identifying
Card code, identifies that the character library that identifying code is used can be attached in script, then this script can facilitate transplanting to share
Other people use.Solve the problem that script adnexa calls.Also promote code efficiency.
In further carrying out example, described in call adnexa and include directly invoking adnexa, access adnexa or release
Put adnexa to specified path.Adnexa can include the multiple formats such as video, audio frequency or picture, it is true that
Being in security consideration, by said method, any adnexa in addition to EXE form can be with above-mentioned
Method is mutual, preferably solves the problem that script adnexa calls.
In the embodiment that Fig. 2 and Fig. 3 shows, after user adds all kinds adnexa when Scripting Edition,
Adnexa is read internal memory by program in a binary fashion, and uses Base64 algorithm coding to become visual character string,
Now visual character string is saved in appointment " [Attachment] " the adnexa section of script file.Work as script
Need use attachment files time, program by reverse Base64 algorithm by " [Attachment] " adnexa section
Character string be reduced into original document, now can pass through in the middle of script " Attachment:
FileName.mp3 " directly access this document or use order " PutAttachment " C: ", "
File is discharged into designated disk position and visits again this document by FileName.mp3 " ".
Here please see Figure 4, for a kind of Script Attachments calling device, including adnexa extraction module 400, encode
Module 402, calling module 404;
Described adnexa extraction module needs the adnexa of coding for extracting, and described coding module is for by described
Adnexa uses base64 to be encoded to visual character string, by described visual character string write script file field;
Described calling module, for when needs call adnexa, reads the visual character in script file field
String, described coding module is additionally operable to described visual character string utilization base64 reverse coding is obtained adnexa,
Described calling module is additionally operable to call adnexa.Designed by above-mentioned module, reached script language calling attached
The effect of part.
In further carrying out example, described in call adnexa and include directly invoking adnexa, access adnexa or release
Put adnexa to specified path.Described adnexa includes video, audio frequency or picture.Design preferably with upper module
Solve the problem that script adnexa calls.
It should be noted that in this article, the relational terms of such as first and second or the like is used merely to
One entity or operation are separated with another entity or operating space, and not necessarily requires or imply
Relation or the order of any this reality is there is between these entities or operation.And, term " includes ",
" comprise " or its any other variant is intended to comprising of nonexcludability, so that include that one is
The process of row key element, method, article or terminal unit not only include those key elements, but also include not
There are other key elements being expressly recited, or also include setting for this process, method, article or terminal
Standby intrinsic key element.In the case of there is no more restriction, by statement " including ... " or " comprising ... "
The key element limited, it is not excluded that in including the process of described key element, method, article or terminal unit
There is also other key element.Additionally, in this article, " being more than ", " being less than ", " exceeding " etc. are interpreted as not
Including this number;More than " ", " below ", " within " etc. be interpreted as including this number.
Those skilled in the art are it should be appreciated that the various embodiments described above can be provided as method, device or meter
Calculation machine program product.These embodiments can use complete hardware embodiment, complete software implementation or knot
The form of the embodiment in terms of conjunction software and hardware.Whole or portion in the method that the various embodiments described above relate to
Can instruct relevant hardware by program step by step to complete, described program can be stored in calculating
In the storage medium that machine equipment can read, all or part of for perform described in the various embodiments described above method
Step.Described computer equipment, includes but not limited to: personal computer, server, general purpose computer,
Special-purpose computer, the network equipment, embedded device, programmable device, intelligent mobile terminal, intelligence man
Occupy equipment, wearable intelligent equipment, vehicle intelligent equipment etc.;Described storage medium, including but do not limit
In: RAM, ROM, magnetic disc, tape, CD, flash memory, USB flash disk, portable hard drive, storage card, note
Recall rod, webserver storage, network cloud storage etc..
The various embodiments described above are with reference to according to the method described in embodiment, equipment (system) and computer program
The flow chart of product and/or block diagram describe.It should be understood that flow process can be realized by computer program instructions
Stream in each flow process in figure and/or block diagram and/or square frame and flow chart and/or block diagram
Journey and/or the combination of square frame.Can provide these computer program instructions to computer equipment processor with
Produce a machine so that the instruction performed by the processor of computer equipment is produced for realizing at stream
The function specified in one flow process of journey figure or multiple flow process and/or one square frame of block diagram or multiple square frame
Device.
These computer program instructions may be alternatively stored in the meter that computer equipment can be guided to work in a specific way
Calculate in machine equipment readable memory so that the instruction being stored in this computer equipment readable memory produces
Including the manufacture of command device, this command device realize one flow process of flow chart or multiple flow process and/
Or the function specified in one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded on computer equipment so that holds on a computing device
Row sequence of operations step is to produce computer implemented process, thus the finger performed on a computing device
Order provides for realizing at one flow process of flow chart or multiple flow process and/or one square frame or multiple of block diagram
The step of the function specified in square frame.
Although being described the various embodiments described above, but those skilled in the art once learn
Basic creative concept, then can make other change and amendment to these embodiments, so above institute
Stating only embodiments of the invention, not thereby limit the scope of patent protection of the present invention, every utilization is originally
Equivalent structure or equivalence flow process that description of the invention and accompanying drawing content are made convert, or directly or indirectly use
In the technical field that other are relevant, within being the most in like manner included in the scope of patent protection of the present invention.
Claims (6)
1. a Script Attachments call method, it is characterised in that comprise the steps, extracts and needs coding
Adnexa, by described adnexa utilization base64 be encoded to visual character string, will described visual character string write
In script file field;
When needs call adnexa, read the visual character string in script file field, by described visual word
Symbol string uses base64 reverse coding to obtain adnexa, calls adnexa.
Script Attachments call method the most according to claim 1, it is characterised in that described in call attached
Part includes directly invoking adnexa, accessing adnexa or release adnexa to specified path.
Script Attachments call method the most according to claim 1, it is characterised in that described adnexa bag
Include video, audio frequency or picture.
4. a Script Attachments calling device, it is characterised in that include adnexa extraction module, coding module,
Calling module;
Described adnexa extraction module needs the adnexa of coding for extracting, and described coding module is for by described
Adnexa uses base64 to be encoded to visual character string, by described visual character string write script file field;
Described calling module, for when needs call adnexa, reads the visual character in script file field
String, described coding module is additionally operable to described visual character string utilization base64 reverse coding is obtained adnexa,
Described calling module is additionally operable to call adnexa.
Script Attachments calling device the most according to claim 4, it is characterised in that described in call attached
Part includes directly invoking adnexa, accessing adnexa or release adnexa to specified path.
Script Attachments calling device the most according to claim 4, it is characterised in that described adnexa bag
Include video, audio frequency or picture.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610297445.XA CN106020863A (en) | 2016-05-06 | 2016-05-06 | A script accessory invoking method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610297445.XA CN106020863A (en) | 2016-05-06 | 2016-05-06 | A script accessory invoking method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106020863A true CN106020863A (en) | 2016-10-12 |
Family
ID=57081245
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610297445.XA Pending CN106020863A (en) | 2016-05-06 | 2016-05-06 | A script accessory invoking method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106020863A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101039369A (en) * | 2006-03-14 | 2007-09-19 | 株式会社理光 | Electronic mail editing device, image forming apparatus, and electronic mail editing method |
CN101076027A (en) * | 2006-05-17 | 2007-11-21 | 软件股份公司 | Method and system for transporting data between MIME accessory and corresponding database |
CN101478730A (en) * | 2007-11-12 | 2009-07-08 | 华为技术有限公司 | Data exchanging method, system and device |
CN102446176A (en) * | 2010-10-09 | 2012-05-09 | 上海博路信息技术有限公司 | Multimedia user data recording and loading method used in electronic reading |
US20120254321A1 (en) * | 2011-04-04 | 2012-10-04 | Microsoft Corporation | Providing additional email content in an email client |
US20130246337A1 (en) * | 2009-01-15 | 2013-09-19 | Mcafee, Inc. | System and Method for Intelligent Term Grouping |
-
2016
- 2016-05-06 CN CN201610297445.XA patent/CN106020863A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101039369A (en) * | 2006-03-14 | 2007-09-19 | 株式会社理光 | Electronic mail editing device, image forming apparatus, and electronic mail editing method |
CN101076027A (en) * | 2006-05-17 | 2007-11-21 | 软件股份公司 | Method and system for transporting data between MIME accessory and corresponding database |
CN101478730A (en) * | 2007-11-12 | 2009-07-08 | 华为技术有限公司 | Data exchanging method, system and device |
US20130246337A1 (en) * | 2009-01-15 | 2013-09-19 | Mcafee, Inc. | System and Method for Intelligent Term Grouping |
CN102446176A (en) * | 2010-10-09 | 2012-05-09 | 上海博路信息技术有限公司 | Multimedia user data recording and loading method used in electronic reading |
US20120254321A1 (en) * | 2011-04-04 | 2012-10-04 | Microsoft Corporation | Providing additional email content in an email client |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105573733B (en) | Method, web front-end and the system that browser is communicated with web front-end | |
KR101780905B1 (en) | Method and apparatus for establishing ultra-large character library and method and apparatus for displaying character | |
CN105335036A (en) | Input interaction method and input method system | |
CN111314388B (en) | Method and apparatus for detecting SQL injection | |
CN109828776A (en) | A kind of method and system searching missing resource and supplementing | |
CN104978430A (en) | Data processing method and device | |
CN110309631A (en) | A kind of programming language structure obscures processing method, intelligent terminal and storage medium | |
CN108121539A (en) | Component processing method and device | |
CN108830779A (en) | Processing method, device, electronic equipment and the storage medium of three-dimensional modeling data | |
CN109189389A (en) | Data processing method and device, server | |
CN110007922B (en) | Artificial intelligence-based graphical source code compiling method, device and equipment | |
CN110363206A (en) | Cluster, data processing and the data identification method of data object | |
CN108536584A (en) | A kind of automated testing method based on Sikuli | |
CN106293658B (en) | Interface component generation method and equipment | |
CN106209575A (en) | Method for sending information, acquisition methods, device and interface system | |
CN106294293B (en) | It is a kind of realize interactive electronic read system, method and apparatus | |
CN106020863A (en) | A script accessory invoking method and device | |
CN112612830B (en) | Method and system for exporting compressed data in batches and electronic equipment | |
CN115294312A (en) | Three-dimensional model merging processing method, device and medium | |
CN109344941B (en) | Big data secure sharing method and device | |
CN114511854A (en) | Contract normalization auditing method, device, equipment and medium | |
CN115730225A (en) | Clustering method and device for discrete sequences | |
CN107193913A (en) | The searching method and system of cartoon material | |
CN111213146B (en) | Pseudo data generating apparatus, method thereof, and recording medium | |
CN115495712B (en) | Digital work processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20161012 |