-
Notifications
You must be signed in to change notification settings - Fork 1
/
Various.hta
executable file
·162 lines (134 loc) · 3.97 KB
/
Various.hta
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html lang="en">
<head>
<title>Useful Elements</title>
<HTA:APPLICATION
APPLICATIONNAME = "Useful Elements"
/>
<script language="vbscript">
Sub Window_Onload
Msgbox "The application has started."
End Sub
Sub RunScript_Refresh
Location.Reload(True)
End Sub
Sub RunScript_Cursor
document.body.style.cursor = "wait"
End Sub
Sub RunScript_Copy
strCopy = BasicTextArea.Value
document.parentwindow.clipboardData.SetData "text", strCopy
End Sub
Sub RunScript_Paste
DataArea.InnerHTML = document.parentwindow.clipboardData.GetData("text")
End Sub
Sub RunScript_Disable
BasicTextArea.Disabled = False
End Sub
Sub RunScript_Confirmation
blnAnswer = window.confirm("Are you sure you want to continue?")
If blnAnswer Then
Msgbox "You clicked the OK button"
Else
Msgbox "You clicked the Cancel button."
End If
End Sub
Sub RunScript_Prompt
strAnswer = window.prompt("Please enter the domain name.", "599CD.com")
If IsNull(strAnswer) Then
Msgbox "You clicked the Cancel button"
Else
Msgbox "You entered: " & strAnswer
End If
End Sub
Sub RunScript_IE
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("about:blank")
objIE.ToolBar = 0
objIE.StatusBar = 0
Set objDoc = objIE.Document.Body
strHTML = "<B>This information is displayed in a separate window.</B>"
objDoc.InnerHTML = strHTML
objIE.Visible = True
End Sub
Sub RunScript_Print
Window.Print()
End Sub
Sub RunScript_Save
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CreateTextFile("test.htm")
Set objFile = objFSO.OpenTextFile("test.htm", 2)
objFile.WriteLine DataArea.InnerHTML
objFile.Close
End Sub
Sub Window_OnLoad
iTimerID = window.setInterval("RunScript", 5000, "VBScript")
End Sub
Sub RunScript_Tooltip
Tooltip.Title = "You successfully changed the tooltip."
End Sub
Sub RunScript_Quit
Window.Close
End Sub
</script>
</head>
<body>
<h1>Usful Elements</h1>
<u>Refresh</u>
<p>
<input class="button" type="button" value="Refresh" id="Refresh" name="Refresh" onClick="RunScript_Refresh">
</p>
<u>Cursor</u>
<p>
<input class="button" type="button" value="Cursor" id="Cursor" name="Cursor" onClick="RunScript_Cursor">
</p>
<u>Copy</u>
<p>
<textarea id="BasicTextArea">A B C</textarea>
<br />
<input class="button" type="button" value="Copy" id="Copy" name="Copy" onClick="RunScript_Copy">
</p>
<u>Paste</u>
<p>
<span id=DataArea>This is a span named DataArea.</span>
<br />
<input class="button" type="button" value="Paste" id="Paste" name="Paste" onClick="RunScript_Paste">
</p>
<u>Disable</u>
<p>
<input class="button" type="button" value="Disable" id="Disable" name="Disable" onClick="RunScript_Disable">
</p>
<u>Confirmation</u>
<p>
<input class="button" type="button" value="Confirmation" id="Confirmation" name="Confirmation" onClick="RunScript_Confirmation">
</p>
<u>Prompt</u>
<p>
<input class="button" type="button" value="Prompt" id="Prompt" name="Prompt" onClick="RunScript_Prompt">
</p>
<u>IE</u>
<p>
<input class="button" type="button" value="IE" id="IE" name="IE" onClick="RunScript_IE">
</p>
<u>Print</u>
<p>
<input class="button" type="button" value="Print" id="Print" name="Print" onClick="RunScript_Print">
</p>
<u>Save</u>
<p>
<input class="button" type="button" value="Save" id="Save" name="Save" onClick="RunScript_Save">
</p>
<u>Timer</u>
<p>
<input class="button" type="button" value="Timer" id="Timer" name="Timer" onClick="Window_OnLoad">
</p>
<u>Tooltip</u>
<p>
<input class="button" type="button" value="Tooltip" id="Tooltip" name="Tooltip" onClick="RunScript_Tooltip" title="Original Tooltip">
</p>
<u>Quit</u>
<p>
<input class="button" type="button" value="Quit" id="Quit" name="Quit" onClick="RunScript_Quit">
</p>
</body>
</html>