Guest Chrisksyeung Report post Posted 03/08/2016 06:11 AM Dear Sir I use Version 7.0 and use VB script to make Caller ID , But only one record appear OUTOFAREA Below is VB script , How to change script to mark OUTOFAREA to Emtpy field to CAllerID [save Data to File VBS_7]Type=Run VB ScriptDispSize=69Txt=Save entered data to a file using VBScriptVbsFileToRun=VbsWait=1VbScript=Const ForReading = 1Const ForWriting = 2Const ForAppending = 8set fso = CreateObject("Scripting.FileSystemObject")set tsFile = fso.OpenTextFile("c:\Program Files\VoiceGuide\Scripts\Meter Reading\IVRattendence.txt", ForAppending, True)If $RV_HH > 12 Then ihh =right("0" &cstr($RV_HH - 12),2) tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD PM " & ihh & ":$RV_NN:$RV_SS" & vbTab & "$RV_CIDNUMBER" & vbTab & "$RV[GetID]"Else tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD AM $RV_HH:$RV_NN:$RV_SS" & vbTab & "$RV_CIDNUMBER" & VbTab & "$RV[GetID]"End If Share this post Link to post
SupportTeam Report post Posted 03/08/2016 08:25 AM Try this: Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 set fso = CreateObject("Scripting.FileSystemObject") set tsFile = fso.OpenTextFile("c:\Program Files\VoiceGuide\Scripts\Meter Reading\IVRattendence.txt", ForAppending, True) sMyCid = "$RV_CIDNUMBER" if (sMyCid = "OUTOFAREA") sMyCid = "" End If If $RV_HH > 12 Then ihh =right("0" &cstr($RV_HH - 12),2) tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD PM " & ihh & ":$RV_NN:$RV_SS" & vbTab & sMyCid & vbTab & "$RV[GetID]" Else tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD AM $RV_HH:$RV_NN:$RV_SS" & vbTab & sMyCid & VbTab & "$RV[GetID]" End If Share this post Link to post