How to Send a WAP Push Link through Named Pipe
This sample demonstrates how to send a WAP Push link using the named pipe of the Info service.
File SendWAPPushLink.vbs used in this sample is located in the folder:
C:\Program Files\CodeSegment\SMS Studio\Samples\InfoService folder.
This script opens a named pipe instance and sends a messages that
will be placed in the SMS Studio Outbox and sent accordingly.
The contents of the SendWAPPushLink.vbs file:
PipeName = "WAPPushPipe"
set fso = CreateObject("Scripting.FileSystemObject")
set pipe = fso.CreateTextFile("\\.\pipe\" & PipeName)
pipe.WriteLine("To: +1122334455")
pipe.WriteLine("From: 5555")
pipe.WriteLine("AccountID: Emulator #1")
pipe.WriteLine("BodyType: WAP Push")
pipe.WriteLine("Body: http://wap.codesegment.com")
pipe.WriteLine("NewLine: CodeSegment")
pipe.WriteLine("<Send>")
pipe.Close
WScript.Quit(0)
How to run this sample
- Click the New button on the main toolbar and select the Info service option in the New Service dialog.
- Click the Setup button on the main toolbar to display the Info Setup dialog.
- In the Advanced tab enter the name of the pipe:
Pipe name: WAPPushPipe
- Click the OK button to close the Info Setup dialog.
- Open Windows Explorer and locate the
SendWAPPushLink.vbs file. Double-click on this file to run the script.
- Check the Outbox window to see that the message with a WAP Push link is being sent.
Related topics
Named Pipe