Guest Chrisksyeung Report post Posted 02/02/2016 06:56 AM Dear Sir Since we upgrade Voiceguide software , The required data log is different The New Version log below 2016-02-02 11:39:57,7,dxxxB1C4,dxxxB1C4,,,,9,12345,1,LineEvCallState_DISCONNECTED,ThankA,2016-02-02 12:30:42,7,dxxxB1C4,dxxxB1C4,,,,9,12345,1,Hangup Module,Hang Up,2016-02-02 12:34:26,3,dxxxB1C2,dxxxB1C2,,,97310762,9,22222,1,Loop Current Off (non-xfer vgm),ThankA, Where <Thanks A > is one cell on Script File Old version log file 2015/12/1 AM 07:06:11,3,,27582766,9,11513,1,2015/12/1 AM 07:06:38 How to let new version log file do not appear RED Colour message Thankls Share this post Link to post
SupportTeam Report post Posted 02/02/2016 07:25 AM Are these the .CSV script logs? The format of these did change in VoiceGuide v7 form previous versions. If you would like to extract just certain information from the ran script then one option is to crate own log file - concatenating a new line to log file at each call (usually done from the 'after hangup' script) Share this post Link to post
Guest Chrisksyeung Report post Posted 02/02/2016 08:37 AM Yes This is a CSV Script logs I know to know why dispaly different message include Device Name dxxxB1C4 , 1) I don't know how to cut the dxxxB1C4 , 2) What is after hangup' script Share this post Link to post
SupportTeam Report post Posted 02/02/2016 08:02 PM 1) I don't know how to cut the dxxxB1C4 , The Device name on which call arrived into system is saved in the Script's CSV log file. What is saved in Script's log files is not configurable. The log file reflects what happened during the call. 2) What is after hangup' script Please see: http://www.voiceguide.com/vghelp/source/html/call%20finish.htm Share this post Link to post
Guest Chrisksyeung Report post Posted 02/03/2016 06:59 AM I make a staff Attendence CSV File which only wnat to write correct staff ID on CSV File Can I control the Input data dispaly on CSV File Share this post Link to post
Guest Chrisksyeung Report post Posted 02/03/2016 07:48 AM Dear Sir How to write VB script to get staff ID after staff press one to confirm on Vgs Script Share this post Link to post
SupportTeam Report post Posted 02/03/2016 07:56 AM Probably best to just create own log file. Please see 'example 2' here: http://www.voiceguide.com/vghelp/source/html/modrunprogram.htm and the "Save information to a file" example here: http://www.voiceguide.com/vghelp/source/html/modvbs.htm Have you tried using a "Get Numbers" module (http://www.voiceguide.com/vghelp/source/html/modgetnumber.htm) to get the 'staff ID' ? Share this post Link to post
Guest Chrisksyeung Report post Posted 02/04/2016 07:52 AM Dear sir I have already use VBcscript to make a output file , I use $rvstartime to record the staff attendence , How to make this in 12 hour Format since the output file is 24hr format Thanks Share this post Link to post
Guest Chrisksyeung Report post Posted 02/04/2016 08:20 AM I have already VBscript to output the file Const ForReading = 1Const ForWriting = 2Const ForAppending = 8set fso = CreateObject("Scripting.FileSystemObject")set tsFile = fso.OpenTextFile("c:\output.txt", ForAppending, True)tsFile.WriteLine "$RV_STARTTIME,$RV_CIDNUMBER,$RV[GetID]"tsFile.Closeset tsFile = Nothingset fso = Nothing Hoe to change the Time Format to 12hr Format Share this post Link to post
SupportTeam Report post Posted 02/04/2016 09:17 AM If you would like 12 hour time then you may need to build your own timestamp string using $RV_HH etc. see: http://www.voiceguide.com/vghelp/source/html/resultvariables.htm But $RV_HH is still 24 hour time so you will need to do some scripting to subtract 12 from it if $RV_HH value is >12. (and set AM/PM flag at same time) Share this post Link to post
Guest Chrisksyeung Report post Posted 02/05/2016 02:11 AM Dear Sir Since I am not progammer , I don't know how to to do some scripting to subtract 12 from it if $RV_HH value is >12. (and set AM/PM flag at same time) Can you help me to do script ,since I have already bought new version of voiceguide I want show the $RV_starttime in AM/PM format My scipt below Const ForReading = 1Const ForWriting = 2Const ForAppending = 8set fso = CreateObject("Scripting.FileSystemObject")set tsFile = fso.OpenTextFile("c:\output.txt", ForAppending, True)tsFile.WriteLine "$RV_STARTTIME,$RV_CIDNUMBER,$RV[GetID]"tsFile.Closeset tsFile = Nothingset fso = Nothing Share this post Link to post
SupportTeam Report post Posted 02/05/2016 02:20 AM (edited) Const ForReading = 1Const ForWriting = 2Const ForAppending = 8set fso = CreateObject("Scripting.FileSystemObject")set tsFile = fso.OpenTextFile("c:\output.txt", ForAppending, True) If $RV_HH > 12 Then ihh = $RV_HH - 12 tsFile.WriteLine "$RV_DateStamp_Short " & ihh & ":$RV_NN PM,$RV_CIDNUMBER,$RV[GetID]" Else tsFile.WriteLine "$RV_DateStamp_Short $RV_HH:$RV_NN AM,$RV_CIDNUMBER,$RV[GetID]" End If tsFile.Closeset tsFile = Nothingset fso = Nothing Edited 02/05/2016 07:28 AM by SupportTeam use answer below Share this post Link to post
SupportTeam Report post Posted 02/05/2016 07:28 AM This is better: Const ForReading = 1Const ForWriting = 2Const ForAppending = 8set fso = CreateObject("Scripting.FileSystemObject")set tsFile = fso.OpenTextFile("c:\output.txt", ForAppending, True) sLog = Date() & " " & Time() & ",$RV_CIDNUMBER,$RV[GetID]" tsFile.WriteLine sLog tsFile.Closeset tsFile = Nothingset fso = Nothing Share this post Link to post
Guest Chrisksyeung Report post Posted 02/12/2016 08:20 AM After I use these one ,Const ForReading = 1Const ForWriting = 2Const ForAppending = 8set fso = CreateObject("Scripting.FileSystemObject")set tsFile = fso.OpenTextFile("c:\output.txt", ForAppending, True)sLog = Date() & " " & Time() & ",$RV_CIDNUMBER,$RV[GetID]"tsFile.WriteLine sLogtsFile.Closeset tsFile = Nothingset fso = Nothing 1) There are no AM or PM 2) How to change the output file dateformat to ( YYYY/MM/DD, AM , 1:15 ) For : 2016/2/14 PM 1:30 , CallerI ID , ,GETID Share this post Link to post
SupportTeam Report post Posted 02/12/2016 11:19 PM The Time() function should return the system time in the format specified in Windows' configurations setting. You can try changing the Windows settings. see: http://windows.microsoft.com/en-au/windows/change-dates-times-currency-measurements-display#1TC=windows-7 or you can try using other VBScript time/date formatting functions to get the exact time/date format that you require. Some more information here: https://technet.microsoft.com/en-us/library/ee198902.aspx http://www.w3schools.com/asp/vbscript_ref_functions.asp http://www.w3schools.com/asp/func_formatdatetime.asp http://stackoverflow.com/questions/7011357/how-do-i-get-the-date-time-vbs Share this post Link to post
Guest Chrisksyeung Report post Posted 02/16/2016 02:05 AM I have already create script which is OK but How to create space replaced the comma by Txt) Tab-separated columns Below iscript Const ForReading = 1Const ForWriting = 2Const ForAppending = 8set fso = CreateObject("Scripting.FileSystemObject")set tsFile = fso.OpenTextFile("c:\Program Files\VoiceGuide\Scripts\Meter Reading\IVR2016.txt", ForAppending, True)If $RV_HH > 12 Then ihh = $RV_HH - 12 tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD PM " & ihh & ":$RV_NN:$RV_SS,$RV_CIDNUMBER,$RV[GetID]"Else tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD AM $RV_HH:$RV_NN:$RV_SS,$RV_CIDNUMBER,$RV[GetID]"End IftsFile.Closeset tsFile = Nothingset fso = Nothing Share this post Link to post
SupportTeam Report post Posted 02/16/2016 03:17 AM Do you just need commas instead of spaces in the saved data? or something else? Could you please describe n more detail what is required. Share this post Link to post
Guest Chrisksyeung Report post Posted 02/16/2016 03:30 AM use TAB delimiter-separated values between variable Share this post Link to post
SupportTeam Report post Posted 02/16/2016 03:56 AM The TAB character in VBScript is represented by this constant: vbTab so you can modify the lines like this: tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD" & vbTab & "PM " & vbTab & ihh ":$RV_NN:$RV_SS" & vbTab & "$RV_CIDNUMBER" & vbTab & "$RV[GetID]" More information here: https://technet.microsoft.com/en-us/library/ee198842.aspx http://powerasp.net/content/new/vbscript-constants.asp Share this post Link to post
Guest Chrisksyeung Report post Posted 02/16/2016 04:22 AM This wrong result below 2016/02/16 AM 12:18:34” & vbTab & ”” & VbTab & ”12345 Share this post Link to post
SupportTeam Report post Posted 02/16/2016 07:25 AM This looks like the "AM" version, not the "PM" version, recommend checking if you have the quotes in the right places in the "AM" expression. Share this post Link to post