Useful VBScript Functions

Administrative Routines
Administrative Routines to help manage data
Browser Function Returns the http_user_agent server variable
IsCookieReady Function Determines if the current browser allows cookies
IsFrameReady Function Determines if the current browser is able to displayed framed pages
IsJSReady Function Determines if the current browser is able to run client-side javascript
IsVBSReady Function Determines if the current browser is able to run client-side VBScript
MkArchive Function Creates a zip archive of a specified files on the server
RegDelete Statement Deletes Keys and Values from the Windows Registry
RegRead Function Reads Keys and Values contained in the Windows Registry
RegWrite Statement Writes Keys and Values into the Windows Registry
SessInfo Function Returns a two-dimmensional array containing session variable names and their corresponding values
Shell Statement Executes a DOS command on the server
Spider Object Parses and saves HTML Meta Tag, head and or body data

Database Routines
Database related routines
Proc Function Returns an array containing the names of all procedures in a database
Recs Function Returns the record count returned by a SQL Statement
RecSet Function Returns a two-dimmensional array representing the resultant recordset of a SQL Query
SqlExec Statement Executes a sql statement that returns no records on a database
Tables Function Returns an array of all table names in a database

Email Routines
Email routines
MailIt Function Send and email message to a recipient

File/Folder Routines
These routines allow you to work with files or folders on the server
DIR Function Checks for the existence of a folder of directory
DirSrch Object Finds any directory matching the search criteria
Drive Function Checks a drive for existence and then checks it's rediness
File Function Checks for the existence of a file
FileCopy Statement Copies a file or folder
FileDateTime Function Returns the time and date a file was last modified
FileLen Function Returns a long representing the size of a file in bytes
FileRead Function Reads the contents of a file
FileWrite Function Writes to a file
GetWebPage Function Returns the html source code of a specified web address
Kill Statement Deletes one or more files
MkDatabase Function Creates and empty Microsoft Access Database
MkDir Statement Creates a Directory or Folder
MkFile Statement Creates a file
MkSheet Statement Creates a Microsoft Excel Spreadsheet with one workbook
RMDir Statement Deletes a directory or folder
Search Function Recursively searches all files on a hard drive for a specific phrase from a specified start directory
SetAttr Statement Sets the attributes of a file or folder
Title Function Returns a string representing the title of a web page
UnMapppath Function Returns a string representing the virtual location of n absolute path
WriteLog Statement Writes a line of text representing and event into a log file
XMLRead Function Outputs an array of values returned by an XML expression

Other Routines
Miscellaneous routines
Clear Statement Resets a variable to Empty or an object reference to Nothing
Pi Function Returns the mathematical constant Pi
Root Function Returns the root folder of the server
UsrID Function Returns the sessionID of a site vistor

String Manipulations Routines
Functions to manipulate, alter and check strings.
AddChr Function Adds characters to a string in a spcific location
CalcArea Function Calculates the area of a triangle, square, rectangle, etc…
Censor Function Removes disallowed words from a string
Censor Function2 Removes disallowed words from a string
Check Function Checks a string for a specified length
CombSort Function Sorts an array alphabetically (A-Z) or numerically (Low-High)
ConvUSCurrency Function Approximates the value of US currency in other currencies
Credit Card Validation Validates a credit card number based on standardized criteria
Decrypt Function Changes an encrypted string into readable text
DegC Function Converts a Fahrenheit temperature into a Celsius temperature
DegF Function Converts a Celsius temperature into a Fahrenheit temperature
Encrypt Function Encrypts a string
ExchangeSort Function Sorts an array alphabetically (A-Z) or numerically (Low-High)
Format Function Formats a number, date or time based on the use entered format type
FormatTxt Function Formats a string with special HTML characters
HasDups Function Indicates if an array has at least one duplicate value
HTMLDecode Function Deocodes and HTML encoded string
InArray Function Checks to see if a string is in an array.
IsAlpha Function Allows only white spaces, letters of the alphabet, and underscore chracters to pass as valid input
IsAlphaNumeric Function Allows only white space, letters of the alphabet, numbers, and underscore characters to pass as valid input
IsCorrect Function Checks the spelling of a word or phrase. Returns true/false
IsEmail Function Performs a thorough validity check of an entered email address
IsLike Function Compares a string to a regular expression
IsOdd Function Determines if a number is odd as opposed to even
IsState Function Checks a two-letter string against all valid postal abbreviations for US States
IsWorthty Function Validates a credit card number based on standardized criteria
IsZip Function Tests a string or a long for validity as a zip code
MetricToStandard Function Translates a Metric measure into a US Standard measure
MkPassword Function Creates a randwom password of a specified length
MkPhoneNum Function Creates a formattted phone number
MkRnd Function Creates a random number of a specified length
MkSSN Function Formats a string or long to look like a Social Security Number
Padding Function Adds spaces to a string to make them all the same length
Pcase Function Returns a string in proper case
PMilTime Function Formats a time measure into proper Military time (24hr)
Pnum Function Returns a properly formated number, I.e., 1=1st, 123 = 123rd
RevArray Function Reverses the order of an array
RmChr Function Removes unwanted characters from a string
SelectionSort Function Sorts an array alphabetically (A - Z) or numerically (low to high).
Spelling_ShowIncorrectWords Function Checks the spelling of a word or phrase and returns an array of the misspelled words
Spelling_ShowStream Function Return the orginal string with misspellings highlighted
StandardToMetric Function Translates a US Standard measure into a Metric measure
StrExpand Function Expands a string by inserting spaces between each character and three spaces if it encounters a space in the string
Strip Function Removes all white spaces from a string
StripHTML Function Removes HTML code from a string
SwapDate Function Changes a US Formated date (mm/dd/yy) into an Internationally formated date (dd/mm/yy) and vice-versa
TaxTotal Function Adds sales tax (as a percentage) to a dollar amount and outputs the total
URLDecode Function Decodes a URL Encoded string

asp functions library VBScript VBSCRIPT active server pages aps iis

Back To Top
© 1998 - 2024
Version 7.21 | Advertise on this site