• VBS implementation code for writing string to clipboard


    Function code: Copy codeThe codes are as follows: Sub CopyString(s) Set forms=WScript.CreateObject(“forms.form.1”) Set textbox=forms.Controls.Add(“forms.textbox.1”).Object With textbox .multiline=True .text=s .selstart=0 .sellength=Len(.text) .copy End With End Sub ‘call Copy codeThe codes are as follows: CopyString “developpaper www.zzvips.com” Complete test code Copy codeThe codes are as follows: Sub CopyString(s) Set forms=WScript.CreateObject(“forms.form.1”) Set textbox=forms.Controls.Add(“forms.textbox.1”).Object With textbox .multiline=True .text=s .selstart=0 […]

  • VBS code for obtaining the Internet IP and sending it to the specified mailbox [tested]


    Copy codeThe codes are as follows: ”getIP set http=createobject(“Microsoft.XMLHTTP”) ipp=”http://www.ip138.com/ip2city.asp” http.open “get”,ipp,false http.send ss=bytes2BSTR(Http.responsebody) intStrA = InStr(1,ss,”[“,1)+1 sss=mid(ss,intStrA) intStrB = InStr(1,sss,”]”,1)-1 ss=mid(ss,intStrA,intStrB) ‘wscript.echo ss Function bytes2BSTR(vIn) strReturn = “” For i = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode < &H80 Then strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,i+1,1)) strReturn = strReturn […]

  • Vbs script for exe2bat (EXE to bat)


    Script for exe2bat Copy codeThe codes are as follows: fp=wscript.arguments(0) fn=right(fp,len(fp)-instrrev(fp,””)) with createobject(“adodb.stream”) .type=1:.open:.loadfromfile fp:str=.read:sl=lenb(str) end with sll=sl mod 65536:slh=sl65536 with createobject(“scripting.filesystemobject”).opentextfile(fp&”.bat”,2,true) .write “@echo str=””” for i=1 to sl bt=ascb(midb(str,i,1)) if bt<16 then .write “0” .write hex(bt) if i mod 128=0 then .write “””_>>debug.vbs“+vbcrlf+”@echo +””” next .writeline “””>>debug.vbs”+vbcrlf+”@echo with wscript.stdout:r=vbcrlf”_ +”:for i=1 to len(str) step […]

  • VBS basic tutorial


    VBScript (Microsoft Visual Basic script editor), Microsoft Visual Basic script) Just as the information revealed by its literal meaning, VBS (a further abbreviation of VBScript) is a scripting language based on Visual Basic Microsoft Visual Basic is a set of visual programming tools produced by Microsoft. The syntax is based on basic The scripting language […]

  • Understand VBE VBE is compiled (encrypted) VBS code


    1、 VBE and VB VBE is similar to VBS, both of which are VB script code files, but they are also different:VBS is plaintext code, that is, you can edit it directly with Notepad;VBE is the compiled (encrypted) VBS code. You can’t directly see the source code when you open it with Notepad. (with some […]

  • VBS encryption 14 method how many kinds of VBS encryption can you avoid killing


    Mobile phone typing is really troublesome, so I will not directly provide examples of some relatively simple or too complex codes. 1. Not a method – annotate Add some rule useless comments without signature. Code omitted 2. Case blending Ignore case with vbs 3. Mixed use of branches and peers Use colon (:) to connect […]

  • VBS implementation saves excel table as TXT text


    I hope to find a VBS code that can save excel tables as TXT. Although saving as is optional, it still needs to be saved as TXT directly by VBS. How should I write the code? If excel is installed, it will be easier. The following is a common one that can run without office, […]

  • VBS to solve the problems related to processing TXT text data


    There is a small problem, as follows:Existing text file 1 Txt, as follows:Numerical value_ Frequency of occurrence 12647Numerical value_ 2 occurrence frequency 10000Numerical value_ 3 occurrence frequency 12608Numerical value_ 4 occurrence frequency 8712Numerical value_ 5 occurrence frequency 10658Numerical value_ 6 frequency of occurrence 8472Numerical value_ 7 occurrence frequency 11232Numerical value_ 8 occurrence frequency 8648Numerical value_ […]

  • Problems in the process of generating static pages by vbs


    Whether VBS can realize the following: visit an ASPX page, and then save the page returned by the server in the form of FileStream as HTML format. If it can be realized, how should it be realized in code?Start with Internet Explorer Application open http://xxx.xxx.xxx/xxx.aspx , and then save OIE document. body. Outerhtml is OK!! […]

  • Modify (set) the code of system time and date with vbs


    Talking to others about y2k38 that day, I thought of a prank: modify the system time to 3:14:07 on January 19, 2038 with VBS, so that some programs that rely on UNIX timestamp will have problems. So how to modify the system time with VBS? The simplest and least technical method is to call CMD’s […]

  • Some details of VBS for next loop


    For NextThe basic structure of the statement is: Copy codeThe code is as follows: For counter = start To end [Step step] [statements] [Exit For] [statements] Next When for nextloopAt the beginning, Visual Basic Scripting Edition(VBSScript) assign start to counter. Before running the statement block in the loop, compare counter with end. If the counter […]

  • Trap sharing of VBS for next loop


    When writing “QWERTY password: encryption and decryption” yesterday, in order to get a 26 letter string, I wrote such a for next loop: Copy codeThe code is as follows: ‘Author: Demon ‘Website: http://demon.tw ‘Date: 2012/2/10 For i = 65 To (i + 25) s = s & Chr(i) Next WScript.Echo s After running, I found […]