G-Lock Software

HomeProductsForumsFAQDownloadsRegistration













 Parse incoming email message - process unsubscribe request
... \ G-Lock Email Processor \ User Guide \ MS Windows Script General Settings

Microsoft Windows Script action allows you to execute Visual Basic Script (VBScript) and Java Script (JScript). To learn more about scripts, click here.

Click the black down arrow next to Actions and select MS Windows Script.

Type any action name in the Action Name box, for example, Script 1.

Select the scripting language from the Language box. Two languages are available: JScript and VBScript.

Type your script (operation you want to be automatically performed with your data) in the Script window. For your convenience you can insert any of the fields specified in the Field Extractor. To do this, click the right mouse button on the Script window and select a necessary field from Insert Fields menu. Global objects which names correspond to the field names in the Field Extractor are created. The access to the values of these objects is available through the Value property.

To test whether you correctly wrote your script, enter your source data into the Input Variables window and click Test. The Output Variables window shows you the result you will receive after the program finishes its work.

Stop processing rule if script execution failed - check this option if you want the program to stop processing the appropriate rule if the execution of the script fails.

Example of VBScript:

We have My Subscribers rule that processes messages with subscribe requests from our customers. Field Extractor extracts the following fields from a message: Name, Email, Action, ProgramName, Date.

Let's admit that the customer typed his name from a lowercase letter. This example of VBScript checks the subscriber's name and converts the first letter into a capital letter:

function main
Dim Result, PosNum, SpacePos, SubString, TempString
if Name.Value= "" then exit function

 Result   = ""
PosNum   = 1
SubString = ""
TempString = Name.Value
SpacePos = Instr(PosNum,Name.Value," ")
while SpacePos > 0
SubString  = Mid(TempString,1,SpacePos-1)
TempString = Mid(TempString,SpacePos+1,Len(TempString)-SpacePos)
Result = Result & UcaseFirstChar(SubString) & " "
SpacePos = Instr(TempString," ")
wend

 Name.Value = Trim(Result &  UcaseFirstChar(TempString))

end function

function UcaseFirstChar(Value)
UcaseFirstChar = UCase(Left(Value,1)) & Right(Value,Len(Value)-1)
end function

     

 

G-Lock Email Processor
  User Guide

Getting Started
Program Main Window
Working With Bounced Rule
Working with Unsubscribe Rule
Working with My Subscribers Rule
My Subscribers Confirmation Rule
Detect and Remove Spam Emails

Program Settings
General Settings
Inbox Explorer Settings

Working With Program
Creating Accounts
Creating Rules

Setting up Filters
Principle of Email Filtering
Using Regular Expressions
Filter By Size
Filter By Header/Body
Filter By Subject

Setting up Field Extractor
Field Extractor Window
Source Box
Generate Value From Mask
Create Fields From Database
Create Fields From Clipboard
Create Table In External Database

Setting up Fields Processor
General Settings
Script Syntax

Bounced Emails Processor
Processing Bounced Emails
Exclusion List

Setting up Actions

MS Windows Script
General Settings

Database Manager
General Settings
Connection Info
Custom SQL
Working With Table In Excel
Get Identity Value From Table

Write To File
General Settings

Save Attachment
General Settings

Forward Email
General Settings
Additional Settings

Send Email
General Settings
Additional Settings
HTML Settings

Log
Outbox
Inbox Explorer

See also

Services
  Registration
Affiliate
 
Support
  Users Forum
Contact us
 
Info
  Trojan Port List
Privacy Statement
Media and Press Information
 
  Add to Favorites
 
 
   
 
 
   

 

Home | Products | Forums | FAQ | Downloads | Registration