With out using mid function in vb scripts
With out using mid in build functions require ,can any one help.
What is the use of optional key word in vbscript?
Vb Script functions cannot use the Optional keyword because it Vb Script we need to declare every argument that we want to use. In Visual Basic the Optional keyword, which allows some arguments to be ...
How are hex literals specified in vbscript?
The hex literals are specified using"Hex()" method in vb script.
Example:
a = 25
Wscript.Echo Hex(a)
The output of this script is 19, which just happens to be the hex equivalent of 25.
What are the conditional statements used in vbscript?
If-end if,If-else-end if,If-elseif-else-end if,
Select case(like switches in C)
IF,THEN, ELSE, END
How to hide the files with vbscript ?
Hi, i want code in vbscript that make all (files and folders) : a- if there are some (files and folders) not hidden make them hidden and if there are other (files and folders) hidden stay hidden without any change.
You need to make use of GetFile method on FileSystemObject and then set the value of "Attributes" property to -1 to hide the file.
What is the command or symbol used in vbscript for writing remarks?
rem is the command or an '(single quote) is used to write the remarks
We can use single quote (') or rem statement from beginning
How is variables declared in vbscript?
Simple way - Dim L, W --------------------(L and W is a variable) L = 3 W = 5 (so now your L value is 3 and W value is 5) Area = L*W Please Bessie tell me what would be the expected result out o...
Declare a variable, a constant Dim [Const] $variable [ = initializer ] Dim [Const] You can also declare multiple variables on a single line: Dim $a, $b, $c And initialize the variables: Dim $a = 2,...
to get value from the arguements
parametrization is nothing but, using variables instead of values. Mostly used if some values are to be taken at run-time, or as user input, instead of hard coding them in script.
Ex
c = 1 + 2 'Simple addition of 1 and 2
a = inputBox ("Enter A")
b = inputBox ("Enter B")
c = a + b
What is the use of redim statement in vbscript?
ReDim statement is used when we use dynamic array. i.e. to define size of an array dynamically. If you want to preserve the previously added elements in an array, you can use keyword preserve along w...
ReDim is used to resize the array or redeclare a variable.
What are the data types supported by vbscript?
VB Script supports only one type of data type called VARIANT.
But the Variant contains following sub types :
1.Boolean
2.Integer
3.Currency
4.Long
5.Double
6.Date
7.String
8.Object
vbscript supports only one datatype variant.
but variant can have subtypes like empty null boolean byte integer etc
How does vbscript differ from Javascript and which proves better? State the reason for the same
VB Script is compatible with only IE
Java is compatible with all browsers.
JavaScript is better than VB Script.
VB Script does not support client side validation where as Jscript supports it.
For Eg: If we want to validate some date before sending to the server, Vb script doesn't support it where as JavaScript suports it.
What are the major differences between visual basic and vbscript?
There are two main differences :1. VB script is 'untyped' and VB is 'typed'. This means that the datatypes doen NOT need to be set while declaring variables in VBScript unlike in VB.Th...
They are different: You dont compile VB scripts like in Visual Basic. You just distribute them as plain text HTML files.The script engine interprets this text into intermediate code when it loads...
What are the types of arrays handled by vbscript?
Broadly the array can categorized in 2 different ways.
1. Static Array.
2. Dynamic Array.
Static Array can be categorized into
- Single dimension Array.
- Multi dimension Array.
1.Static array
2.Dynamic array
How are arrays defined in vbscript?
Dim array(10)
' add values
for i=0 to 9
array(i)=i
Arrays are Declared like this:
DIm A as Variant ---> Where "A" is an Array.('Declaration part ---)
A= Array("Value1",Value2"..........) (Definition part)
What are the browsers supported by vbscript?
Mostly Internet Explorer because both are of microsoft.But it also support netscape.
What are the platforms supported by vbscript?
VBScript is supported by Windows 95, Windows NT (including a native version for Alpha), 16-bit Windows, and Unix Solaris. Microsoft is currently working with others to bring VBScript to UNIX versions for HP, Digital, and IBM platforms.
What is the use of option explicit in vbscript?
When you use the Option Explicit statement, you must explicitly declare all variables using the Dim, Private, Public, or ReDim statements. If you attempt to use an undeclared variable name, an error o...
To inilialize all the variable before using them.
What is variant data type in vbscript?
VBScript has only one data type called a Variant. A Variant is a special kind of data type that can contain different kinds of information, depending on how it's used. Because Variant is the only data type in VBScript, it's also the data type returned by all functions in VBScript.
Is it possible to pass optional argument to function in vb script?
VB script does not support optional keyword. Its not like VB. But dont know why its not provided like in VB.
Yes, it is possible to pass optional parameters to vb script functions.
It could be done as done in vb by qualifying optional key word.
What are the differences between sub-procedure and a function in vbscript?
The main difference is function returns a value where as a Sub-procedure does not.