Professional Documents
Culture Documents
Do Until/Loop
Do/Loop Until
&rede"ined "unctions
Variant "unctions
1sE2pty
ScriptEngine
ScriptEngine&uild%ersion
ScriptEngine+a5or%ersion
ScriptEngine+inor%ersion
Script variables
Variables declared outside o" procedures
Const %eyword
Create constants
%&Script Exa2ple 7rogra2s %&Script Exa2ple 7rogra2s
Comments
Single quote :8;
<eyword 9e2 :remar%;
Considered outdated
&rocedures:
Sub %eyword
2unction 1nput&ox
Displays a dialog "or user to input data
Call 1nput&ox , pro2pt: caption: help !ile:6
x;coord: y;coord/
Coordinates measured "rom top le"t :1#1;*
Calling "unctions
" "unction call has arguments in parentheses# use %eyword
Call
2unction +sg&ox
Displays message dialog
+sg&ox -%&Script is =un>-: : -9esults-
Displays -%&Script is =un>- with -9esults- in the title
bar
$ptional argument to customi(e buttons and icon ignored
1.1Set language to
VBScript
1.2<5ti0n Ex5licit
statement
1.3Define procedure <n
,lic% for the c=>dd
button
1.4Use ,Int to convert
input values from
string subtype to
integer subtype
1712<,T?@E AT-4 @3/4I, #B88C3,882T2 AT-4 4D)
Tr!nsiti0n!l88E;#> 27AT-4>
371BB9i.D 22D15" !dditi0nDht=l BB>
57AE>2>
67TIT4E><ur first E/+cri5t78TIT4E>
7
&7+,FI@T 4>;G3>GE = #E/+cri5t#>
'71BB
1) <5ti0n Ex5licit
11 2i= intT0t!l
12
13 +u$ c=d>ddH<n,lic%()
14 2i= intE!lue
15
16 intE!lue = In5ut/0x(#Enter !n inte.er#I #In5ut
/0x#I I H 17 1)))I 1))))
1& intT0t!l = ,Int( intT0t!l ) + ,Int( intE!lue )
1' ,!ll -s./0x(#?0u entered # J intE!lue J H
2) #; t0t!l s0 f!r is # J intT0t!lI I
#Fesults#) 21 End +u$
22BB>
2378+,FI@T>
2478AE>2>
25
267/<2?>
27,lic% the $utt0n t0 !dd !n inte.er t0 the t0t!lD
2&7AF>
2'79<F->
3)7I;@3T ;>-E = #c=d>dd# T?@E = #/3TT<;#
31 E>43E = #,lic% Aere t0 >dd t0 the T0t!l#>
32789<F->
3378/<2?>
3478AT-4>
Adding integers on a Web page using VBScript Adding integers on a Web page using VBScript
nput dialog
)essage dialog
"aceboo%*com.ape!*tgi
twitter*com.8pe!tgi?oida
pinterest*com.ape!tgi
Stay Connected with us =or 2ore chapters on %& Script and 34%4
Script
http://www.apextgi.in