Learn to help the stupid Wolf regular practice _hta
Source: Internet
Author: User
<HTML>
<HEAD>
<TITLE> stupid Wolf Regular practice _www.jb51.net cloud Habitat Community </TITLE>
<style>
Body
{
Font-size:12;
BACKGROUND: #DADADA;
margin-left:20;
}
Sub Showorg ()
' Load a file in a text box
Dim f,ts,s
If FSO. FileExists (Fileorg.value) Then
Set F = fso. GetFile (Fileorg.value)
Set ts = F.openastextstream (1)
S= ""
If not TS. AtEndOfStream Then
s = ts. ReadAll
End If
Ts. Close
Blockorg.value = S
End If
End Sub
Function LaStone (STR,SPLITSTR)
' Enter characters and delimiters to get the last part
LaStone = Right (Str,len (STR)-instrrev (STR,SPLITSTR))
End Function
function Getfolderdir (fulldir)
' Input get full path, get folder path
S=lastone (Fulldir, "\")
Getfolderdir = Left (Fulldir,len (Fulldir)-len (s))
End Function
function Px2int (px)
Px2int = CInt (replace (px, "px", ""))
End Function
Sub GoGoGo ()
Re.ignorecase = imode.checked
Re.global = gmode.checked
Re.pattern = Blockreg.value
Replacestr = Replacevar.value
Select Case Window.event.srcElement.id
Case "Isvbs"
Replacestr = eval (replacestr)
Case "Isjs"
Window.execscript "Jsvalue.value=eval (Replacevar.value);", "JavaScript"
Replacestr = Jsvalue.value
End Select
Showme.value = Re.replace (BLOCKORG.VALUE,REPLACESTR)
End Sub
Sub Back
Showme.value = ""
End Sub
Sub SaveFile
If FSO. FileExists (Fileorg.value) Then
Set F = fso. GetFile (Fileorg.value)
F.copy Fileorg.value & Makerand () & ". Bak" ' Create backup
Set ts = F.openastextstream (2)
Ts.write Showme.value
Ts. Close
Blockorg.value = Showme.value
Else
Set ts = fso. OpenTextFile (Thisfilefolder & Makerand () & ". txt", 2,true)
Ts.write Showme.value
Ts. Close
Blockorg.value = Showme.value
End If
End Sub
function Makerand ()
Dim Resault
Resault = Mid (CStr (now ()), 3)
Resault =replace (Resault, ":", "")
Resault =replace (Resault, "-", "")
Resault =replace (Resault, "", "")
Makerand = Resault
End Function
</SCRIPT>
</BODY>
</HTML>
The stupid wolf is the practice device. HTA
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