Hi. This is a small example of how to use scripting when working with the 2 way sms system i nowsms. This example should get you started on making your own creative services using nowsms. I have done a lot now and is still writing more and more advanced features into it so that many more services can be sold to our customers.
Enough said here's the example using wscript.
Open nowsms and go to the 2 way sms tab. Type in a keyword or just an asterix in the sms command prefix field. In the Command to excute do something like this:
Set Args = WScript.Arguments For I = 0 to Args.Count - 1 LogTxt = LogTxt & Args(I) Next Set Args = nothing
writelog(LogTxt)
public function writelog(logstr) Dim fsl,flog Set fsl=CreateObject("Scripting.FileSystemObject") if Not (fsl.FileExists("c:\temp\NowSMS\TEST.log"))=true Then Set flog=fsl.CreateTextFile("c:\temp\NowSMS\TEST.log",true) flog.WriteLine(now() & " " & logstr) flog.Close Else Dim fll Set fll=fsl.OpenTextFile("c:\temp\NowSMS\TEST.log",8,true) fll.WriteLine(now() & " " & logstr) fll.Close Set fll=Nothing End if Set flog=nothing Set fsl=nothing End function
save it given the filename tou wrote in the Command to execute field. eg. incall.vbs
Now when somebody sends a sms with your selected keyword, nowsms will execute the vbsfile. In this example it will put all into a logfile.
Thats it basically.
Now this 2 way sms tool is very usefull. Just imagine what you can use it for.
Hope this little thing will help some outthere to get started..